PDA

View Full Version : Help:Game lagging problem



antialan81
March 16th, 2005, 04:20 PM
Hello,
I have created a shooting game. At the first level it runs ok.
But when it reach the second level it have the lagging problem.
I am very confusing about it.
At first I thought it was the long scripting problem
but after i shorten the action script the lagging problem still there.
My flash game is all created using flash, i didn't use any jpeg.
The attachement of notepad is my file size report.
Could somebody tell me what is the possible mistake
that make the game lag at second level?
Thanks a lot.

yhack
March 16th, 2005, 05:12 PM
Maybe its your computer. Post your game up here as a swf

frost_oni
March 16th, 2005, 05:15 PM
er....how about too much objects present on the screen? maybe the objects that you thought you set to be removed aren't removed at all. i usually use a kill function to remove everything on the screen and re-attach them. it's easier to live with this.

ChaosKindred
March 16th, 2005, 07:15 PM
also, make sure that variables declared in functions that you arent using elsewhere or not included in the return syntax are declared with var b4 them, that will destroy the vars after the function has passed increasing in speed dramatically. also if you're using for loops to loop inside an array replace them with for ... in loops, post your .fla and we'll really be able to help you