Author Topic: Restart Game  (Read 3038 times)

0 Members and 1 Guest are viewing this topic.

Offline collechess

  • LV3 Member (Next: 100)
  • ***
  • Posts: 93
  • Rating: +22/-2
    • View Profile
Restart Game
« on: September 11, 2011, 02:25:51 pm »
     In the second Axe game I made, I let the user restart the game inside the program.  However, I lost the newer version of that program, and I forgot how I did it.  So my question is, how can you get a program to restart the game loop without making the whole game loop inside a repeat loop or subroutine.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Restart Game
« Reply #1 on: September 11, 2011, 02:42:05 pm »
Maybe you could have a label just before the loop starts/variables initialized (Lbl ST or something) which the program Goto's upon the keypress.
« Last Edit: September 11, 2011, 02:42:22 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Restart Game
« Reply #2 on: September 11, 2011, 02:56:20 pm »
Yeah, just use Goto. It's perfectly fine in Axe, unlike in TI-BASIC.




Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Restart Game
« Reply #3 on: October 30, 2011, 12:59:47 pm »
or get fancy, and throw in a menu. and send it back to there
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Restart Game
« Reply #4 on: October 30, 2011, 01:02:12 pm »
Yeah, just use Goto. It's perfectly fine in Axe, unlike in TI-BASIC.
Except if you are inside a subroutine, because it will always wait for a Return
« Last Edit: October 30, 2011, 01:02:26 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s