Multiple game loops?

Blitz3D Forums/Blitz3D Beginners Area/Multiple game loops?

Hi, thanks for the replies

I know how to write my code so it all runs in a single loop, I just want to know if could get away without doing so.

The game is sort of a 'Bejeweled' clone.
When you line up 3 or more chips, they get removed from the board which is where I jump to a function which handles the removal. Because it's all animated it takes about 1 second to perform.

I also gave the game a bomb chip. If you remove a line of chips containing a bomb, then the whole row and column where the bomb was located explodes taking out all those chips. The function which handles this takes about 3 seconds to perform all the animation.

When each of these functions gets called it becomes the main loop taking over the job of clearing the backbuffer, redrawing it and flipping it, so instead of running for one frame and then returning, it keeps running until the animation is complete and then returns. My main loop doesn't really do anything besides update the mouse cursor and wait for the users input.

I guess it's the type of game that makes this possible since after you make a move you just sit and watch the results, then you make your next move and so on. If it were an arcade game requiring continuous user input it would never work doing it this way.

It works, I just wonder if the Blitz compiler could end up getting confused if I put in one too many loops, although there's never more than one loop running inside another.

I guess what I was fishing for was an absolute:
"NO!!!, you'll crash everyone's computer and bring down the whole internet doing it that way!!!"

:)
Regards,