topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 7:22 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: NANY 2012 Release: Kyrathaba's Hangman  (Read 135232 times)

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 588
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #75 on: July 10, 2011, 11:04 AM »
I haven't played, but that sounds like the wrong solution to me. How is someone going to type the altered apostrophe? (That 'directed' apostrophe has its roots in Word, and its automatic quote function.) Keyboards don't have that character, so unless you use some fancy default Windows logic that can convert it to a normal apostrophe, (or some code of your own,) you haven't fixed the actual problem of not being able to guess the proper character yet.

Since you seem to aim for the english market, I'd recommend a plain latin-1 encoding to store your guess texts. You probably use UTF-8 right now, or some other Unicode variety. Even those have a few characters you may not be able to type, but there's far less chance on this sort of mishaps that way; Unicode has tons of look-a-like characters.
« Last Edit: July 11, 2011, 12:11 PM by kyrathaba »

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #76 on: July 10, 2011, 12:07 PM »
Ooh, an update while I slept.  Awesome.  :Thmbsup:

worstje, I think you missed this part:

Apostrophes are supposed to be among the punctuation marks that are automatically shown in plain-text when a new puzzle is presented (i.e., you  shouldn't have to guess them).

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 588
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #77 on: July 10, 2011, 12:57 PM »
Yup, I did indeed miss that. :) However, now that I know that, I am of the opinion Kyrathaba's going about it the wrong way: rather than listing the characters that should be displayed automatically, I would list the characters that are guessable. That way, accented characters, hyphens, middle dots, double-arrow-quote-thingies, etc - they'd all be displayed. The characters one would like to guess are usually as simple as a-z and proably 0-9.

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #78 on: July 10, 2011, 01:36 PM »
Oh wow! I just had one heck of a lucky game. Several of the puzzles I could actually remember from earlier games, because I've been playing so much.
It probably doesn't hurt that I grew up watching "Wheel of Fortune" every night either.
Or that I can type around 75 WPM. (Some of those puzzles got finished with very little time left on the clock).

The puzzle that finally did me in was the occupation "Doctor".

Anyway, I can't actually imagine doing better any time soon. Though, I won't give up trying.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #79 on: July 10, 2011, 02:39 PM »
The characters one would like to guess are usually as simple as a-z and proably 0-9

And those are the only ones players have to guess in "Kyrathaba's Hangman", unless there's a bug left in the code somewhere.

Oh wow! I just had one heck of a lucky game.

Congratulations!  I just had a look at the scoreboard, only to see that your new high-score, and by far the highest on the board, is 453110.  Wow!  That will give hamradio some competition, though I daresay ham is up to the challenge :)

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #80 on: July 11, 2011, 11:21 AM »
Tonight I will save the phrases in Latin vs UTF8, and will do an update.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #81 on: July 11, 2011, 01:44 PM »
Welcome to djwillie, our 46th competitor to join the NANY 2012 Hangman Highscore Contest.

Only a small fraction of the competitors appear to be DonationCoder members. Remember, only members can win prize money.
« Last Edit: July 11, 2011, 06:12 PM by kyrathaba »

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #82 on: July 12, 2011, 01:42 AM »
Finally downloaded and started to play my first game and got an error right off the bat...

Don't know if it will help, but this is the error details (error screenshot attached at bottom):

Details
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Kyrathasoft.Hangman.hangman.setRegularThemedPuzzle()
   at Kyrathasoft.Hangman.hangman.randomlySetSelectedPuzzle()
   at Kyrathasoft.Hangman.hangman.setSelectedPuzzleForIndividualWord()
   at Kyrathasoft.Hangman.hangman.selectIndividualWordOrPhraseAsPuzzle()
   at Kyrathasoft.Hangman.hangman.startNewGame()
   at KyrHangman.Form1.instantiateAndRunGame()
   at KyrHangman.Form1.gameStartAttempt()
   at KyrHangman.Form1.toolStripMenuPlay_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.MenuStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.235 (RTMGDR.030319-2300)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
KyrHangman
    Assembly Version: 1.0.4.0
    Win32 Version: 1.0.4.0
    CodeBase: file:///C:/Program%20Files/Kyrathasoft/KyrHangman/KyrHangman.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.235 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.232 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
kyr
    Assembly Version: 1.0.2.3
    Win32 Version: 1.0.2.3
    CodeBase: file:///C:/Program%20Files/Kyrathasoft/KyrHangman/kyr.DLL
----------------------------------------
KyrHangmanLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/Kyrathasoft/KyrHangman/KyrHangmanLib.DLL
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




EDIT - I continued and after the second game ended the third game came up with the same error (perhaps it is the particular puzzle chosen?).  Anyway, I got the error and when I hit continue, it let me try continue with the game, but it didn't clear the old solution to present the new puzzle.  However, when I tried the answer for the old puzzle, it failed, so it at least loaded a new one, just isn't displaying it. Wrong - just noticed it is the old puzzle.  All the letters are already gone, but it is asking for the new ones.  Enter a blank and it is a bad guess just like a wrong letter.
« Last Edit: July 12, 2011, 01:51 AM by steeladept »

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #83 on: July 12, 2011, 02:08 AM »
Another bug I am finding is not all letters show from puzzle to puzzle.  They are not selected, but they are not listed if you are a mouse user.  And if you type the letter in the box (or highlight the carrot and type it in) then the letter works and shows in the right places, but the letter shows twice in the guess box.  Not an issue in processing (it works right), just an observation.

Another observation - especially during timed games - keyboard input is MUCH Better! :P

Perhaps in a future revision you can consider tracking if input was via mouse or keyboard to differentiate high scores?  I am not a mouse person in general, but when checking stuff out like this I find that is where most things break (at least in my programs). 
« Last Edit: July 12, 2011, 02:31 AM by steeladept »

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #84 on: July 12, 2011, 07:19 AM »
@steeladept:

Thanks for downloading and playing!  I'm sorry that it messed up for you, and thank you so much for the bug report!

the third game came up with the same error (perhaps it is the particular puzzle chosen?).


I am thinking that, because the game works without this error for many puzzles, it must be that some particularly long puzzles are causing this.  I've changed the maximum phrase length from 300 to 400, and I'm adding some error-catching to suspect methods:

public const int MaxPhraseLength = 400;

           } catch (Exception loadHangFileException) {
                MessageBox.Show("Error in method loadHangmanFile()", loadHangFileException.Message);
            }

           } catch (Exception instantAndRunEx) {
                MessageBox.Show("Error in method instantiateAndRunGame()", instantAndRunEx.Message);
            }


but the letter shows twice in the guess box

I've updated the guess-handling code to check and see if the correct or wrong guess is already shown (this should prevent duplicates; let me know if any continue to happen):

       private void addWrongGuess(string wrongGuess) {
            if (!WrongGuesses.Contains(wrongGuess)) {
                _wrongGuesses += wrongGuess;
            }
        }

        private void addUsedGuess(string usedGuess) {
            if (!UsedGuesses.Contains(usedGuess)) {
                _usedGuesses += usedGuess;
            }
        }


Another bug I am finding is not all letters show from puzzle to puzzle.  They are not selected, but they are not listed if you are a mouse user.

I think this is a control-repainting issue.  When this happens, try scrolling the vertical scrollbar the entire extent of the combobox and see if the letters don't seem to magically reappear.  I'm working on a fix for this.

Perhaps in a future revision you can consider tracking if input was via mouse or keyboard to differentiate high scores?


I've noted the suggestion for a possible future version, and thanks!

 
I am not a mouse person in general, but when checking stuff out like this I find that is where most things break (at least in my programs).

+1.


Summary: hopefully, the 100-character increase in maxPhraseLength will fix the most glaring error.  However, I've added error-handlers to a couple of highly suspect methods, which will pop up a much more info-rich messagebox and help me track down the bug, if it persists.  Hopefully, the extra checking I've added to the missed versus correct guesses will solve that annoying bug too.  Thanks again for taking the time to post, steeladept, and please let me know the results if you update to v1.0.4.1.  You can update to the new version from within the program: "About"->"Update".

hangBetaTesters.png
« Last Edit: July 12, 2011, 07:30 AM by kyrathaba »

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #85 on: July 12, 2011, 09:11 PM »
Eh, I'm not worried about it messing up my game - I am not a word game kind of person (as in I totally suck at most all of them) :-\  I am just looking where I always run into troubles with my own programs and found several for you to check out. :Thmbsup:

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #86 on: July 12, 2011, 09:21 PM »
Again, I really appreciate your feedback.  Makes all the difference!  :up:

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #87 on: July 13, 2011, 02:27 PM »
Everyone welcome podracer, our 51st Hangman contestant!  I've sent him/her an email, inviting them to visit our forum.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #88 on: July 14, 2011, 07:08 AM »
Watch out, thancock20!

It looks like Aquanoid poses a real threat to your reign:

hangAquanoid.png

hamradio

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 884
  • Amateur Radio Guy
    • View Profile
    • HamRadioUSA.net
    • Read more about this member.
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #89 on: July 14, 2011, 12:52 PM »
Whew now to take a good break from it...

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #90 on: July 14, 2011, 02:31 PM »
Ooh! 

Hey thancock20, are you gonna let that stand!?  Check the online scoreboard...

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #91 on: July 14, 2011, 08:07 PM »
This is getting ugly, folks!  It's a dead-heat!

hangGettinUgly.png

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #92 on: July 17, 2011, 09:16 AM »
There are just two weeks remaining until the first high-score prize is given out!  As of this posting, hamradio has the lead, trailed closely by thancock20, benubird, and Aquanoid!

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #93 on: July 21, 2011, 08:02 PM »
It's the return of the dreaded little box (for the degree symbol this time):

hangman error 2.gif

It didn't actually cost me the game this time though, because I died trying to guess the correct numbers.  Those puzzles with numbers in them are a definite weakness of mine.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #94 on: July 21, 2011, 09:13 PM »
Thank you for the bug-report.  The bug has been squashed: version 1.0.4.2 is the fix.  You may use "About"->"Update" from within the program to update to the fixed version.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #95 on: July 21, 2011, 11:25 PM »
I don't expect any more bugs related to apostrophes or rare symbols (fingers crossed).

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #96 on: July 26, 2011, 09:44 PM »
There is less than one week until the first montly high-score prize is awarded!  Right now, hamradio is in the lead to receive it.

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #97 on: July 29, 2011, 07:34 AM »
Just two days remaining before the first $5 of DonationCredits is disbursed to the high-scorer.  That is, at the time of this post, hamradio!!

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #98 on: July 30, 2011, 03:12 PM »
I'll award the DonationCredits when this count falls below 129 days...

kyrathaba

  • N.A.N.Y. Organizer
  • Moderator
  • Joined in 2006
  • *****
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: NANY 2012 Pledge & Early Beta: Kyrathaba's Hangman
« Reply #99 on: July 31, 2011, 02:29 PM »
Congratulations to hamradio for winning the July high-scorer spot.  Your DonationCredits have been delivered :D