Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Reset Command?

Author
Message
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 22nd Aug 2011 03:16
Hey guys,

Is there a command to reset the program?


Cheers.

God help me, Please.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 23rd Aug 2011 06:10
What do you mean? If you mean reset at game over or such no, you have to do that yourself by changing any variables etc that you have used back to the required settings. But I could be misunderstanding the question. I don't think there is a way to close and restart if that is what you mean.

http://s6.bitefight.org/c.php?uid=103081
The Zoq2
14
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 23rd Aug 2011 08:23
Goto home and Home at the top...

But you would have to delete all sprites and set all variables again

Srry about my english im from sweeden
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 23rd Aug 2011 10:01
Goto = No!!!!!!!!!!!!

My signature is NOT a moderator plaything! Stop changing it!
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 28th Aug 2011 06:06
Restarting your program is actually part of your logic, i.e.:

WHILE MAINLOOP=1
`
LOAD IMAGE
`
WHILE GAMELOOP=1
`
GAME LOGIC
`
ENDWHILE
`
DELETE IMAGE
`
ENDWHILE

As you can see, as your program ends the game loop and then loops around the master/main loop, your resources are managed in the outer loop. It's always a good idea to ensure your variables are reset at the right point in your nested loops, and that you delete any resources once you have finished with them, to keep your code clean and symmetrical. It's takes a little extra time, but you'll be thankful a few days/weeks down the road when you are trying to find memory hogging code and going back to reset variables you forgot about early on.

I drink tea, and in my spare time I write software.

Login to post a reply

Server time is: 2024-04-25 11:09:09
Your offset time is: 2024-04-25 11:09:09