Big! Update
-
-
This is coming along great!
-
Amazing stuff dude.
To attempt to answer your question, you might be able to use true/false flags to move through the different stages:
// main loop loop splashScreen() mainGame() gameOver() repeat function splashScreen() while !startGame loop clear() j = controls(0) // show Skater Kid title // on A button press, startGame becomes true, breaking us out of this loop and moving into the mainGame() update() repeat return void function mainGame() while !gameOver loop clear() // at some point, gameOver becomes true, breaking us out of this loop and moving into gameOver() update() repeat return void function gameOver() while !restartGame loop clear() // at some point, make restartGame true and break out of this loop, then we can reset our important variables update() repeat // when we break out of the loop we are here, and so can do something like: restartGame = false gameOver = false startGame = false playerPosition = blah blah score = 0 // etc etc return void
I hope this helps you to think about how to structure your program. As always, there are many, many ways to skin a cat - the example I've given is by no means the established way. It will work, however!
-
@Dave I understand it so it works for me thanks :)
-
@waldron why,
j controls(0)
I use, c controls(0)
Just a different way to categorise?
My noobnes is showing I know -
@waldron Yep makes absolutely no difference. I always start using
c
, then I'll be usingj
later in my code wondering why it doesn't work! It's literally just a habit thing.Although, using
c
does mean you can freely usej
in nested loops without worrying. I had that one recently, doing nested loops like:for i = 0 to 10 loop for j = 0 to 5 loop repeat repeat
Completely forgetting that
j
is my global controls variable...Moral of the story, use
c
, don't listen to me. -
@Dave haha gotcha think I'm starting to get to jist, considering I knew 0% a month ago to 2% now lol thanks
-
@waldron The fact that you knew nothing and now have the beginnings of a totally original, awesome little game in Fuze is just beyond fantastic. Ah! At 2%, you'll be catching me up in no time. I think I'm just about at 3%. Haha :)
-
@Dave maybe only 0.2% then, but i would be nowhere near that without fuze i just purely love it.