Game is really laggy, how do i fix it?

choppedupmonkey

  • *
  • Posts: 602
Hello friends,

My game is very laggy on flash, but not as bad on android. i have done where whenever an actor leaves the screen to kill it and that helped a little, but how do i make it better? it just is very slow.

dtrungle

  • Posts: 1938
Heya,

Suggestions:
-reduce the amount of actors active
-depending on your game, try changing the physics settings , or disable physics for actors that don't need it
-inspect your codes for performance drainers, more specifically these - always, collisions, timers
-test on a different computer, could be something wrong with the flash application
-lower the screen size for flash

Last thing you can do is to debug it by disabling/removing codes/actors in order to isolate the cause of the lag.

I haven't been around for a long time so if something is inaccurate please let me know.

Bhoopalan

  • Posts: 1018
Heya,

Suggestions:
-reduce the amount of actors active
-depending on your game, try changing the physics settings , or disable physics for actors that don't need it
-inspect your codes for performance drainers, more specifically these - always, collisions, timers
-test on a different computer, could be something wrong with the flash application
-lower the screen size for flash

Last thing you can do is to debug it by disabling/removing codes/actors in order to isolate the cause of the lag.

I haven't been around for a long time so if something is inaccurate please let me know.

You are up to date as far as I see ;)

Additionally... check if continuous collision is turned on. You most likely won't need it and turn it off.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

MadManAdam

  • Posts: 371
This is probably obvious but just incase you overlooked it remove any debug statements in your code.

CanadianHobo

  • Posts: 24
I am not sure for this one: even if you do not have any collisions on, enabling the continuous collision still seems cause lag.