HANGMAN thread continues in GAMES.
Forum rules
This section is for testing Commander X16 programs and programs related to the CX16 for other platforms (compilers, data conversion tools, etc.)
Feel free to post works in progress, test builds, prototypes, and tech demos.
Finished works go in the Downloads category. Don't forget to add a hashtag (#) and the version number your program was meant to run on. (ie: #R41).
This section is for testing Commander X16 programs and programs related to the CX16 for other platforms (compilers, data conversion tools, etc.)
Feel free to post works in progress, test builds, prototypes, and tech demos.
Finished works go in the Downloads category. Don't forget to add a hashtag (#) and the version number your program was meant to run on. (ie: #R41).
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
Re: HANGMAN IN BASIC... COMING DOWN THE HOME STRETCH
I'm thinking my first project tomorrow evening is REMOVE_REMARKS... I expect that code to take me an hour at most. Tonight I played with the Output code of BASLOAD and removed quite a few remarks from the Output code. I didn't get all of them and I found my remarks are consuming very close to 1k........ That's significant. I expect the REMOVE_REMARKS to be pretty straightforward, But I should make it go ahead and load the emulator and BASLOAD. If I can figure it out (maybe stuffing the Emulators Keyboard Buffer). I might make it completely automated.
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
HANGMAN. THE REAL HOME STRETCH.
Had a very productive coding Evening.
Made the Initialization screen much more informative. Almost out of necessity. I'm Loading 2 Machine code modules and I'm doing some tricky stuff with Memory. Probably because I'm rapidly approaching the limit of Basic Ram, it seemed to make a difference what order I did things in !!!.
The more informative Init screen was so I could see where my code was going wrong.
I got that all sorted and it now loads BVSAVE700.BIN (for saving the Graph Screen to file. Written by Xark).
Its also loading MooingLemurs ZSMKIT. (ZSMKIT8C00.BIN).
This had to be done near the beginning of the code because of the memory management stuff, so I had to load it now even though I'm not doing anything with it yet. After this load and variable init I'm at just under 13k of BASIC Ram left as reported by FRE(0).
Neither of these Machine Language modules are necessary to run the program !!. But if they are not present the program does lose those functions.
(For ZSMKIT this will mean no Background music, for BVSAVE700.BIN this means it won't be able to save the background screen, it will have to be redrawn everytime.)
The program does now Require HWORDS1.DAT & HWORDS2.DAT which must be located in a WORDS folder directly below the HANGMAN main folder. The program will report if these are missing and end with an error message. (I've also got some currently unused hooks in the code to easily add HWORDS3.DAT, HWORDS4.DAT.... etc.) Additional files will not be required but will be used if present. BTW, that's the very next code I will implement. The first 2 word files will remain mandatory !
This code requires BASLOAD if you want to play with the source code other than just looking at it.
There is a loadable "HANGMAN.PRG" included.
This code is doing a lot more behind the scenes than before. But when you run it the difference will be it now will pick a Random word from the HWORDS?.DAT rather than from the user. You can't play it through yet. But I hope late Tomorrow or Saturday you will be able too .
The User INPUT code is still in the code for 2 player head to head, when I get to that.
LATEST CODE FILE
P.S. Now that I'm actually loading ZSMKIT, you should probably do a RESET between program runs. I haven't yet figured out how to cleanly unload ZSMKit and get BASIC Ram back to its normal state. It will probably crash on a 2nd run. BVSAVE700 is loaded to "Golden Ram" so I didn't have that problem before. Getting BASIC Ram back to normal without a RESET is on my checklist for version 1.0 but maybe not for BETA 0.0.1
Made the Initialization screen much more informative. Almost out of necessity. I'm Loading 2 Machine code modules and I'm doing some tricky stuff with Memory. Probably because I'm rapidly approaching the limit of Basic Ram, it seemed to make a difference what order I did things in !!!.
The more informative Init screen was so I could see where my code was going wrong.
I got that all sorted and it now loads BVSAVE700.BIN (for saving the Graph Screen to file. Written by Xark).
Its also loading MooingLemurs ZSMKIT. (ZSMKIT8C00.BIN).
This had to be done near the beginning of the code because of the memory management stuff, so I had to load it now even though I'm not doing anything with it yet. After this load and variable init I'm at just under 13k of BASIC Ram left as reported by FRE(0).
Neither of these Machine Language modules are necessary to run the program !!. But if they are not present the program does lose those functions.
(For ZSMKIT this will mean no Background music, for BVSAVE700.BIN this means it won't be able to save the background screen, it will have to be redrawn everytime.)
The program does now Require HWORDS1.DAT & HWORDS2.DAT which must be located in a WORDS folder directly below the HANGMAN main folder. The program will report if these are missing and end with an error message. (I've also got some currently unused hooks in the code to easily add HWORDS3.DAT, HWORDS4.DAT.... etc.) Additional files will not be required but will be used if present. BTW, that's the very next code I will implement. The first 2 word files will remain mandatory !
This code requires BASLOAD if you want to play with the source code other than just looking at it.
There is a loadable "HANGMAN.PRG" included.
This code is doing a lot more behind the scenes than before. But when you run it the difference will be it now will pick a Random word from the HWORDS?.DAT rather than from the user. You can't play it through yet. But I hope late Tomorrow or Saturday you will be able too .
The User INPUT code is still in the code for 2 player head to head, when I get to that.
LATEST CODE FILE
P.S. Now that I'm actually loading ZSMKIT, you should probably do a RESET between program runs. I haven't yet figured out how to cleanly unload ZSMKit and get BASIC Ram back to its normal state. It will probably crash on a 2nd run. BVSAVE700 is loaded to "Golden Ram" so I didn't have that problem before. Getting BASIC Ram back to normal without a RESET is on my checklist for version 1.0 but maybe not for BETA 0.0.1
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
THE HOME STRETCH FOR REAL.
Just documenting changes in features that will be released. I'm on the start of an all-nighter coding. Wish me luck, my aged a** hasn't done that in a long time.
Removed the requirement for HWORDS2.DAT, HWORDS1.DAT is still required. (Each has 300 words, so now if you accidentally delete one of them just make sure the remaining one is named HWORDS1.DAT. You'll still be able to play but without as many words available.) The code is also in place so that HWORDS3, HWORDS4, HWORDS5. etc... will be used also if available. A count of files found is displayed on the initialization screen.
Put the option to exit and reset on the Main Game Menu screen.
Working on a Demo mode if all you want to do is see the Graphics and animations.
Removed the requirement for HWORDS2.DAT, HWORDS1.DAT is still required. (Each has 300 words, so now if you accidentally delete one of them just make sure the remaining one is named HWORDS1.DAT. You'll still be able to play but without as many words available.) The code is also in place so that HWORDS3, HWORDS4, HWORDS5. etc... will be used also if available. A count of files found is displayed on the initialization screen.
Put the option to exit and reset on the Main Game Menu screen.
Working on a Demo mode if all you want to do is see the Graphics and animations.
Re: THE HOME STRETCH FOR REAL.
Good luck! Put on some music, stay hydrated, look away from the screen regularly, eat a good breakfast when the sun comes up, then sleep all day.ahenry3068 wrote: ↑Sat Oct 21, 2023 1:48 am I'm on the start of an all-nighter coding. Wish me luck, my aged a** hasn't done that in a long time.
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
ALL NIGHTER RESULTS.
Only made it to 2:15 but. Hangman is playable.. sort of. Haven't got the 2 player code fully implemented but its most of the way there. However, after Initialization I'm setting < 12 kb on FRE(0). And I had some odd bugs crop up after playing a couple rounds. (Like the Noose not drawing properly and I've had that code settled for a couple months now). Only thing I can think of is some memory management errors within BASIC itself. I'm to tired to really dive into the code for troubleshooting, so I'm not doing a post now. Tomorrow the first thing I'm going to do is work on making the code smaller. For one I'll get rid of the VERA Palette Data and just rely on loading it from disk. Then we will see how things wash out. Must sleep now. I'm kinda surprised I made it to 2:00 am. But I did get some code done.
Another thing I will do is go over the fine tooth comb and reuse variable names wherever possible. Eliminating unnecessary variables in memory. A lot of times I'll pick unique variable names for FOR..NEXT loops to avoid collision if its in a GOSUB (In BASIC if the calling code is using the same loop control variable it causes Issues). It's time to go in the other direction and manually make sure there are no variable Name collisions. I should be able to get by with Just X,I & J.
Another thing I will do is go over the fine tooth comb and reuse variable names wherever possible. Eliminating unnecessary variables in memory. A lot of times I'll pick unique variable names for FOR..NEXT loops to avoid collision if its in a GOSUB (In BASIC if the calling code is using the same loop control variable it causes Issues). It's time to go in the other direction and manually make sure there are no variable Name collisions. I should be able to get by with Just X,I & J.
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
HANGMAN... ITS PLAYABLE!!
I'm happy with how its coming together. This isn't DOOM or WOLFENSTEIN but I want it to be something fun to play around with. I'm considering this a very early BETA. 1 Player against the Computer works. 2 Player with the Computer picking words works. HEAD to HEAD mode works. In H2H mode each player will enter a Word and Optional clue manually for the other player to solve. Score is kept only during continuous game play, nothing is saved to disc. There is a DEMO mode on the menu but this currently does nothing but Exit the program. ESC Key from within Game Play takes you back to the Main Menu. (It doesn't currently prompt, it will later).
When you unzip this the *.BIN files and HANGBG.DAT go in the same directory as HANGMAN.PRG.
The directory WORDS should be in that directory also HWORDS1.DAT & HWORDS2.DAT will be in this directory. Only HWORDS1.DAT is required for HANGMAN to run, but together I've started with 600 words.
PLEASE LEAVE COMMENTS !!! SERIOUSLY. THIS IS STILL BETA AND I WANT IT TO BE FUN
HERE IS THE GAME. (FIXED FILE BUG ON HARDWARE)
(BASLOAD STYLE Source file is HANGMANB.BAS, Loadable Program is HANGMAN.PRG) P.S. ZSMKIT is R44 or > only. Right now I'm loading it into RAM but not initializing any of its routines or actually using it. So this particular code should still actually run on at least R42 or maybe R43. Once I initialize ZSMKIT that alone will make this an R44 or greater program
FIXED ON HARDWARE NOW !!
When you unzip this the *.BIN files and HANGBG.DAT go in the same directory as HANGMAN.PRG.
The directory WORDS should be in that directory also HWORDS1.DAT & HWORDS2.DAT will be in this directory. Only HWORDS1.DAT is required for HANGMAN to run, but together I've started with 600 words.
PLEASE LEAVE COMMENTS !!! SERIOUSLY. THIS IS STILL BETA AND I WANT IT TO BE FUN
HERE IS THE GAME. (FIXED FILE BUG ON HARDWARE)
(BASLOAD STYLE Source file is HANGMANB.BAS, Loadable Program is HANGMAN.PRG) P.S. ZSMKIT is R44 or > only. Right now I'm loading it into RAM but not initializing any of its routines or actually using it. So this particular code should still actually run on at least R42 or maybe R43. Once I initialize ZSMKIT that alone will make this an R44 or greater program
FIXED ON HARDWARE NOW !!
- Attachments
-
- 20231022_043121.jpg (2.77 MiB) Viewed 215935 times
-
- 20231022_042955.jpg (2.56 MiB) Viewed 215935 times
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
HANGMAN. FORMALIZED, ToDo for release candidate.
I haven't done any programming this Evening at all. I just did an exercise in Self Discipline and Itemized what I need to do to get HANGMAN in a State to call it 1.0. I don't often do this, my usual programming approach has been pretty open ended.
Now I have a FORMAL TODO list to go from what I have now to VERSION 1.0. I have a couple open ended items on the list but I'm going to try to more strictly define them as I whittle the list down. The list Items are numbered but I don't necessarily plan on working on them in that order. It's most important that I stick to working on listed features and not go out on a Tangent.
I'm very interested in end user feedback. I'm leaving this TODO list open for changes for 1 week from now. ( Sun, 22 Oct 2023). Any changes to be based on other user or developers suggestions. I plan on not too many more posts on this thread. When I close it I plan on opening a thread on DOWNLOADS/GAMES with whatever BETA state HANGMAN is in a week from now. From there I'll post the work on the BETA as it becomes closer to 1.0.
HERE'S MY FORMAL TODO LIST
Now I have a FORMAL TODO list to go from what I have now to VERSION 1.0. I have a couple open ended items on the list but I'm going to try to more strictly define them as I whittle the list down. The list Items are numbered but I don't necessarily plan on working on them in that order. It's most important that I stick to working on listed features and not go out on a Tangent.
I'm very interested in end user feedback. I'm leaving this TODO list open for changes for 1 week from now. ( Sun, 22 Oct 2023). Any changes to be based on other user or developers suggestions. I plan on not too many more posts on this thread. When I close it I plan on opening a thread on DOWNLOADS/GAMES with whatever BETA state HANGMAN is in a week from now. From there I'll post the work on the BETA as it becomes closer to 1.0.
HERE'S MY FORMAL TODO LIST
Last edited by ahenry3068 on Tue Oct 24, 2023 9:23 am, edited 1 time in total.
Re: HANGMAN. Now Playable !!(Current is last post in this thread)
Looking good here, on H/W. did 7 rounds, solid.
Maybe on the screen it should show the difficulty? I forget which one I picked.
Also I was thinking of a game-mode where if you guess a correct letter, one part is taken back (i.e. you get one guess back). That may be pretty hard to do actually (to "un-draw" a part). I'd call this "Gen-E-Z Mode" I'm teasing!!!
Maybe there could be a HINT mode option? Like for vowels only maybe - if the word has a vowel, maybe reveal one. Used once per round?
I was reading up on the history of hangman. Seems it came about around 1880s, and the "original" was in categories (like animals).
Good stuff, the most epic newly-developed BASIC program written in 2023
Maybe on the screen it should show the difficulty? I forget which one I picked.
Also I was thinking of a game-mode where if you guess a correct letter, one part is taken back (i.e. you get one guess back). That may be pretty hard to do actually (to "un-draw" a part). I'd call this "Gen-E-Z Mode" I'm teasing!!!
Maybe there could be a HINT mode option? Like for vowels only maybe - if the word has a vowel, maybe reveal one. Used once per round?
I was reading up on the history of hangman. Seems it came about around 1880s, and the "original" was in categories (like animals).
Good stuff, the most epic newly-developed BASIC program written in 2023
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
Re: HANGMAN. Now Playable !!(Current is last post in this thread)
Looking good here, on H/W. did 7 rounds, solid.voidstar wrote: ↑Mon Oct 23, 2023 5:47 am Looking good here, on H/W. did 7 rounds, solid.
Maybe on the screen it should show the difficulty? I forget which one I picked.
Also I was thinking of a game-mode where if you guess a correct letter, one part is taken back (i.e. you get one guess back). That may be pretty hard to do actually (to "un-draw" a part). I'd call this "Gen-E-Z Mode" I'm teasing!!!
Maybe there could be a HINT mode option? Like for vowels only maybe - if the word has a vowel, maybe reveal one. Used once per round?
I was reading up on the history of hangman. Seems it came about around 1880s, and the "original" was in categories (like animals).
Good stuff, the most epic newly-developed BASIC program written in 2023
Thank you.
Maybe on the screen it should show the difficulty? I forget which one I picked.
It kind of does. In Easy mode the Gallows and Noose are both counted as body parts. Giving you 2 more choices per round. In Medium only The Noose. In HARD Mode the Gallows and Noose are both drawn before you start. The default mode is MEDIUM unless you change it.
Also I was thinking of a game-mode where if you guess a correct letter, one part is taken back (i.e. you get one guess back). That may be pretty hard to do actually (to "un-draw" a part). I'd call this "Gen-E-Z Mode" I'm teasing!!!
Actually wouldn't be that Hard. Just a RECT In the Sky or Grass color to "Erase the body part". The face might be a little tricky as I would have to redraw the Noose afterwards. I'll consider this actually. Maybe for VER 1.5
Maybe there could be a HINT mode option? Like for vowels only maybe - if the word has a vowel, maybe reveal one. Used once per round?
Taken under consideration. Maybe only available in EASY mode.
I was reading up on the history of hangman. Seems it came about around 1880s, and the "original" was in categories (like animals).
This I was already considering. The work here is building the WORD.DAT files. If the .DAT files get built I would just have to "point" hangman at a different folder to get the words. I spent about 2 days just building the 2 .DAT files I have.
- ahenry3068
- Posts: 1132
- Joined: Tue Apr 04, 2023 9:57 pm
WORKING HANGMAN TODO: New Pre-Beta
Working the TODO List. 2 Items down. 1 other partial. All Menu Items now function as expected (at least I think, thats why we do Betas). The Drawing Demo mode also serves as a way to shuffle up the CLOUDS and GRASS in HANGBG.DAT, Clouds and Grass are randomized on Drawing and the Demo Mode will create a new HANGBG.DAT as long as BVSAVE700.BIN is present.
TODO is now included in the Zip file, with my notes as to progress.
NEW CODE FROM TONIGHTS SESSION (EDIT: If you previously downloaded from this post, its the same file, just changed the name for descriptive purposes)
SCREENSHOTS
TODO is now included in the Zip file, with my notes as to progress.
NEW CODE FROM TONIGHTS SESSION (EDIT: If you previously downloaded from this post, its the same file, just changed the name for descriptive purposes)
SCREENSHOTS
Last edited by ahenry3068 on Wed Oct 25, 2023 8:55 pm, edited 1 time in total.