;

PDA

Click to See Complete Forum and Search --> : Performance Tips


ForumNewbie
04-29-2003, 03:26 PM
Hi Forum,

I've been struggling a bit with performance on some of my in-progress games. Does anyone have any contributions for a thread dedicated to tips on good 3dfa practice for optimum performance?

I'll pose a few questions as a starter, that would certainly help me:

Are there any performance differences between using large script loops, versus small scripts and the use of 'functions'?

What are the best types of image file to use for the fastest animation speed and the lowest SWF file size (png,tif,bmp,jpg)?

What are the differences in performance to using sounds that are set to 'Export in SWF', 'Download External mp3' or 'Stream an External mp4'?
ie. What effect does this have on the movie loading time, versus the movie running speed?

Any tips on these questions, or any other performance ideas would be mightily useful !

Morgan.

carnwath
04-29-2003, 06:05 PM
Generally..

Have SIMPLE routines to handle keystrokes and set a global (main) variable and then exit, Don't do major processing in the keystroke code unless it produces a benefit.

Have a fast 30/sec action loop to detect mouse position, set a variable and exit, same reasoning.

Avoid functions which call other nested functions during the game simulation, single function calls with few parameters keep the main simulation loop tidy without any time sacrifice

Do use nested functions when its the fastest way to calculate a result versus say a slow bubble sort of data in an array

Have a parameter set which when true allows deep subroutines with lots of iterations to be allowed execution.

Sometimes as in chess or other math intensive games there is no alternative but to execute long code iterations and the best thing you can do is flag on screen a red light indication to the user that something is running, That can be an advantage too - users want to see the computer 'thinking' in some ganmes.