cassius Posted November 9, 2012 Posted November 9, 2012 When my main character is killed my game ends.I don't want the user to have to re run the game at this point I want it to go back to start point automaticaly.Can I use goto a label at top of program or is that out of scope for the goto function? I am not using a gui at the moment. (c language). Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
ParaToxic Posted November 9, 2012 Posted November 9, 2012 I would advise you not to use goto at all.It is better to make a kind of state Manager and switch to an other point to start the game from this point Quote
gamecreator Posted November 9, 2012 Posted November 9, 2012 Agreed with PT for most cases but if your game's not too complex, you may be fine with a goto. Quote
cassius Posted November 9, 2012 Author Posted November 9, 2012 eah thanks. would have to reset some flags probably. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.