🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
game plan (or whatever you call it)
ok I want to create a simple hangman game
and I want to get a good start, so I made a simple game plan
is this the right way to start a project, any suggestions are more then welcome!!!
Hangman game
------------
A) main initialization
----------------------
B) intro
--------
- title screen
C) initialize
-------------
- get a random word
- misses = 0
D) main loop
------------
- create display
* display hidden word like this : *******
* display the letters that you already picked
* display how many misses you already have
* display hangman accoarding to your misses
- ask for a letter
- check if letter is in word
* if so change the hidden word like this : ***r***
* if not increase counter "misses"
- check if word is complete
* if complete goto outro
* else restart main loop
- check if you have a complete hangman
* if complete goto outro
* else restart main loop
E) outro
--------
- check if you guessed the word or not
* if you guessed it => "you won!"
* else => "you lost"
- ask for a new game
* if new game then goto C) initialize
* else exit
thanx in advance for any advice
Edited by - da_cobra on October 20, 2001 6:05:25 AM
I got some advice: don''t redraw the entire screen.
Just update the parts you change. When a letter is guessed, remove the corresponding asterix, and replace it by the letter. When a letter is chosen, just put it in the "chosen letters" place. When the hangman gets bigger, just draw the part.
Don''t empty and redraw your whole screen. Seems to be a bit... pointless to me :D
Just update the parts you change. When a letter is guessed, remove the corresponding asterix, and replace it by the letter. When a letter is chosen, just put it in the "chosen letters" place. When the hangman gets bigger, just draw the part.
Don''t empty and redraw your whole screen. Seems to be a bit... pointless to me :D
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement