Game Development Community

Will levels run in the background?

by Matthew Medina · in Torque Game Builder · 01/13/2007 (12:26 am) · 2 replies

Hi, I was just wondering if I'm correctly loading levels when progressing through the game. I'm afraid I might do something wrong, and all the previous levels will still be running in the background as you progress, using up resources and making it eventually run slow or crash.

This is how I currently have it set up:

sceneWindow2D.schedule(1000, loadlevel, "Game/data/levels/Level2.t2d");

If you collect the goal on the level, it does an onCollison function, and loads the specified level, then on the next level the same thing, and so on.

So I'm wondering if this will erase the previous level, or leave it playing in the background.

#1
01/15/2007 (11:56 am)
LoadLevel should automatically call endLevel on the currently running level.
#2
01/15/2007 (12:41 pm)
Okay, thank you.