Computer Science Canada

Clear screen for new level

Author:  codergirl [ Sun Jun 03, 2018 2:38 pm ]
Post subject:  Clear screen for new level

I'm writing a platform game right now and what I want to do is when a player reaches a certain object, and the level is completed, the screen clears and a new level appears.
How would I go about clearing the screen?
I have a loop with all my code in it but if I try doing an if statement with cls in the loop it does nothing
Help please!!!

Author:  Insectoid [ Mon Jun 04, 2018 9:33 am ]
Post subject:  RE:Clear screen for new level

You don't just need to clear the screen, you need to display the new level data. A good method to start with is to completely exit your loop, and start a new loop with all the code for level 2 in it. One you figure that out you'll want some more advanced techniques that will save you time and code but this will work for now.

Author:  codergirl [ Wed Jun 06, 2018 6:45 pm ]
Post subject:  Re: Clear screen for new level

Ok I figured it out, thank you!


: