Optimizing Game Graphics

8 posts

Flag Post

A game ive created has been getting pummeled with bad comments, saying that their browsers crash because of the flash game and it freezes up and stuff around level 24 when alot of enemies appear on screen. Does any1 know how to lower the quality not only by right clicking and lowering quality, but in general, such as tips to decrease game lag, using jpegs, sprites, actionscript shortcuts, etc.? It would be a great help ;) tnnx

 
Flag Post

Which game? Also, if you are having problems, can you rig some sort of cheat code or just make a level 24 version?

 
Flag Post

Possibly the single biggest improvement you can make is using cacheAsBitmap if you aren’t already. If you have some art which isn’t animated, and doesn’t scale, put movieClipName.cacheAsBitmap = true, and flash will save the rendering as an internal bitmap which it can plonk down much faster than having to redraw the vector art from scratch every time.

But only use it on stuff that isn’t going to change often, cause otherwise it’ll have to render the vector art ANd cache it every frame and that will actually slow things down. You can also only use it on clips smaller than 2880×2880 (a cached clip that size will use 40 megs of ram)

 
Flag Post

I suspect that all bitmap graphics (gif, jpg, png…) get blown to a decompressed bitmap before use.

You can change the display quality without asking the user to right-click using the _quality attribute.
I’ve seen people say that you can set the quality on individual movieclips independently. However, when I tried this it only ever set the global quality.

How many enemies are we talking about? How big? Are they rotated or scaled? Do they use one or many bitmaps, or vector graphics? And are you sure it is the graphics which slow it down – maybe your code is inefficient? Do you have one script which moves them all (good), or have you put call-backs on every movieclip (bad)?

Generally what you should do is perform trials on your code, try to work out what is slow, then optimise that.

 
Flag Post

ohhhh, i lke the bitmap method REALLY speeded things up instad of when i use the 2 color shading tool, and each of my movieclips have a code that moves them and then a code inside of them telling them what to do when they die, so i think it might be my code. Thanx for the tips tho really helped

 
Flag Post

I wish I had known about cacheAsBitmap before.

Myself I had to use a combination of PSP and screenshots to turn my vector into bitmaps (crys),

Oh well.

 
Flag Post

there seems to be a diffrent problem, a leakage of some sort.
are you properly removing all the MovieClips?

 
Flag Post

Don’t put too much movieclips at the same time.

200+ movieclips on the screen could be a burden for a new PC.