Wednesday, July 05, 2006

Flash lite developing. Performance

The performance of your program is one of the main things that will affect the user’s experience. Thus you need to think about it all the time when you create your game. Here are some trics on how to make your program run smoother:
1. Shortening variable names can help if you are using hundreds of name/value pairs. It will not make a big difference with 50 or so variables.
2. Changing vectors to bitmaps can help not in all cases. You need to test both formats on the actual handset to see if the performance improves. It has been noticed that bitmaps work better for static content. If you are using bitmaps, remember the resolution and scalability problems. With Flash Lite 2.0 images can be easily loaded during run time to a specified level, so even though it requires some work, there is a solution to it.
3. Dont do a lot of vector gradients, alphas, and curves.
4. Keep the amount of action-script loops and the amount of code executed in each loop to a minimum.
5. Keep the amount of simultaneous animations on the screen to a minimum, and animate only a few objects at a time.
6. Try to use only event sounds if possible.