Archived

This topic is now archived and is closed to further replies.

game plan (or whatever you call it)

This topic is 5899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites