PDA

View Full Version : Unloading and Loading during a level to reduce lag


phinnycupcakes
12-31-2008, 02:07 AM
Lets face it,. If you're working on a detailed sidescroller game, and if you have everything loaded in a level that you are playing on, then the game is going to run really slow. So I would load and unload movieclips and graphics when the character gets to a certain point where said movieclips and graphics are offscreen.

thing is, the way my game works is that it moves _root._x to move the character. If I have movieclips unloaded, when I load them will they move as the root did so they will be in the correct spot in relation to the root's current position? Or will I have to code in the X and Y needed for the MC to load based on the root's displacement?

So thats really my question. Will unloaded objects still move when _root moves?

orange gold
12-31-2008, 03:45 AM
on the very bottom layer add a square make it a symbol
the monsters say if hitTest with that symbol they are the high detail monsters but once they are no longer hitting / touching hat square (there off screen) they still move but are set to _visible = false


just throwin an idea?