07-24-2017, 08:24 AM
The biggest cause I found that lags the game is collision, overuse of layers, and failure to recycle actors (Actors are recycled in modern versions of the engine by default).
It's best to optimize the game the best you can for the engine, such as reducing as much if/otherwise statements a possible, and removing continuous collision. It's best to enable the debug FPS monitor to see how much memory is actually being used on where. Scripts that don't need to be used anymore should just flat out be stopped. It's tiny things like that which make the engine run better.
The Stencyl engine itself always loads all the graphics and sound on launch, this does reduce loading time, but kills a chunk of ram. That's why atlas use (think of it like bank swapping) is important. As it cuts down the memory and CPU use massively.
It's also best to avoid using the flash compiler for the engine, as it's nothing but a bloat hog (like flash is).
It's best to optimize the game the best you can for the engine, such as reducing as much if/otherwise statements a possible, and removing continuous collision. It's best to enable the debug FPS monitor to see how much memory is actually being used on where. Scripts that don't need to be used anymore should just flat out be stopped. It's tiny things like that which make the engine run better.
The Stencyl engine itself always loads all the graphics and sound on launch, this does reduce loading time, but kills a chunk of ram. That's why atlas use (think of it like bank swapping) is important. As it cuts down the memory and CPU use massively.
It's also best to avoid using the flash compiler for the engine, as it's nothing but a bloat hog (like flash is).