Computer Science Canada Restarting and Exiting |
Author: | Krocker [ Wed Dec 08, 2010 1:34 pm ] |
Post subject: | Restarting and Exiting |
hiya, how do i make a game that askes the player at the end whether they want to restart the game or exit. how wouldi make the game restart and or exit on command of a push button (parallelget) |
Author: | Zren [ Wed Dec 08, 2010 1:56 pm ] | ||
Post subject: | RE:Restarting and Exiting | ||
Well you'd need to think. What programming structure allows you to repeat something hmmmm? Like, I want to play this game FOREVER man. /snide comments. If your game uses a main game loop, envelop it in another loop so that it begins from the bigining? Stick a menu in there, and presto! My advice is to remember to reset your variables to default, and stick things in procedures.
|
Author: | Krocker [ Sun Dec 12, 2010 11:04 am ] |
Post subject: | RE:Restarting and Exiting |
uh? i dont get it. srry, im fairly new to turing, so ya. also, i have many loops in the game cause it needs to get value :=parallelget. so ya |
Author: | TokenHerbz [ Sun Dec 12, 2010 1:06 pm ] | ||
Post subject: | RE:Restarting and Exiting | ||
well you have a loop with your game, and put that into a procedure so you can call it at any time. it exits when game is over. you put that in another loop where it will only exit if you DONT want to restart the game, otherwise it will LOOP your game proc, thus restarting it. any easier understanding set up would be:
|