

-----------------------------------

isaiahk9

Sat May 24, 2008 8:52 am


Recurrsion in main menu

-----------------------------------

In my main menu for my game, there is the main screen.  From the main screen you can go to the instructions ("instructions.t") or the credits ("credits.t").  Problem is that you can go back from the credits and instructions to the main menu, and that is recursion according to Turing - it cannot be done without error.  It can be done in Java, but Turing just sends an error.  Does anybody know how to make it so that I could still go from the file "mainmenu.t" to "instructions.t" or "credits.t", and then go back?
thanx


-----------------------------------

zylum

Sat May 24, 2008 5:00 pm


RE:Recurrsion in main menu

-----------------------------------

First off, recursion can be done in turing (there is a tutorial on it). Second, it would only be (mutual) recursion if it involved one function calling another and the other calling the first again and so on. This is not how you should be implementing your game anyways. Your instructions method or credits method should be called from the main loop and then return or even change a game variable which changes the game's state. There are many ways of accomplishing this, mutual recursion isn't one of the better ones.


-----------------------------------

isaiahk9

Sat May 24, 2008 6:15 pm


RE:Recurrsion in main menu

-----------------------------------

thanx.  Looked in tutorials, found what I wanted.  kind of ironic, recursion was the problem, not what I wanted.

