Blargh disappeared since March 13th. OwnerOfSuccuby Wrote:Do you use any optimization in the first level ? What is its fps - becouse i have no lugs at all it works very fast and good. I want to understand a reason why some times when moving level textures it lugs and how to make it no lug at all. As i understand you just move all the map there with a lot of vector graphics - but why do not it lug then ?
Its LAG, not lug.
For about moving textures, you have to be sure of those things:
1 - you should not move tons of Movie Clips that has inner movie clips inside. You can have, say, a giant MC (background) with some GRAPHIC symbols (not Movie Clips) or a few MCs (with code). That is fine. WHen you use Background MC with Grass MC inside, with tons of small grass leaves inside (child movie clip) with even more children, this makes the game slow/ it lags.
2 - Check your curves/points count! When you use a large grass painted using BRUSH, its almost certain it will have 3000 or even 10.000 curves. When you create clones/duplicates of it to populate the entire background, you can reach 100.000 easily. In the game I'm making, I try to use a 500 or even less, 100 curve objects. Then 20 objects will sum up 2,000 curves only.
3 - Sub movie clips inside background without stop() -> make sure that movie clips you dont use in the background and other areas are stopped. Sometimes they loop playing.
4 - Giant invisible MCs. These cause slowdown. Either diminish their size or use visible=false. NEVER use alpha=0 if you want the movie to be totally invisible. If you need to use transparency, then use alpha in smaller MCs. Visible=false is faster than alpha=0.
5 - Try to cast new objects using attachMovie/loadMovie (that is, at compile/execution time) instead of putting MCs in the stage at production time.
6 - Never change 'Display', then 'Blend mode' (on the right, Properties pane). Using blending modes for background (like 'layer', 'darken', 'screen') lags the game.
7 - Try not to use many gradient effects (you know, painting with a gradient, different color with a smooth coloring). These slows the game down.