
-----------------------------------
rocknroller
Sun Jun 08, 2008 1:13 pm

Need help with a quick code
-----------------------------------
Hey guys im just starting turing and I need your help with a quick code

Im just wondering how you would make something for a game at the beginning that says

1. Play
2. Instructions
3. Exit


Then they would enter 1,2, and 3 and it would go to the page they wanted

Sorry if this is a "newbie" question im just kind of new to this stuff

-----------------------------------
apomb
Sun Jun 08, 2008 5:09 pm

RE:Need help with a quick code
-----------------------------------
a) if you're just starting turing, why are you trying to make a game
and 
b) make a loop, outputting those options to the screen, then inside that loop make a decision structure (if then else) that does something based on input from the user

-----------------------------------
syntax_error
Sun Jun 08, 2008 5:15 pm

RE:Need help with a quick code
-----------------------------------
Just to add you can also use another decision structure, called the case structure for more information please use the turing walkthrough since it has a a plentiful of examples.

-----------------------------------
talyboy
Sun Jun 08, 2008 5:35 pm

RE:Need help with a quick code
-----------------------------------
or you could just use a get statement and using an if structure decide what happens then.

-----------------------------------
maxudaskin
Sun Jun 08, 2008 5:44 pm

Re: Need help with a quick code
-----------------------------------
[Mod Edit: No need to do it for him]

-----------------------------------
jeffgreco13
Mon Jun 09, 2008 9:26 am

Re: Need help with a quick code
-----------------------------------
Oof, if this is giving you problems then you have a long journey ahead of you if you're going to make a game.

I think you should go read a little, no, A LOT more, if you're going to make a game worth making.

Don't mean to insult but I don't think you should jump into something like this just yet.

-----------------------------------
Insectoid
Mon Jun 09, 2008 11:13 am

RE:Need help with a quick code
-----------------------------------
I think I should add, the game is first priority. The menu comes after.

-----------------------------------
pkjr92
Thu Jun 12, 2008 9:10 am

Re: Need help with a quick code
-----------------------------------
Yeah, I when I first used turing, I was confused about how it worked too.  It's not like VB where you can move from form to form, you only have one active user-controlled run window and unless you get into procedures, it is better just to flash up the instructions at the beginning of the game, and then go straight to playing it.

-----------------------------------
Aziz
Thu Jun 12, 2008 9:14 am

Re: RE:Need help with a quick code
-----------------------------------
Don't give him the answer, maxudaskin =/. And yes, the Turing Walkthrough thread first in this case, because he's going to have to struggle over that first before he can learn ANYTHING about making a game.
