Hi guys!
I have a flash game project that i have been working on. Everything looks alright using my desktop PC. However, when i had to use my netbook one day to make some urgent changes, i found out that the overall performance is a lot slower!
The game is basically a shooter game where you shoot bad guys and avoid hitting civilians. So there is a street, bad guys / innocents spawn on either the left or the right of the screen, then move to the opposite side.
The way i set it up was having a timer to do my animations for the good and bad guys, updating the screen every 20milliseconds. One of my concerns is that the code in this time is quite long. During each scheduled screen update, i loop through all the good and bad guys, determine their state (Walking, Running, Dying, etc), then perform the necessary animation.
Additionally, i have another timer for my projectile animation. On mouse click, the user throws a ball into the screen, and hits/misses targets. So, on mouse click, i start the projectile timer, updating my ball every 20 milliseconds. During each of these updates, i do a hit-test-object on the good guys and bad guys in the screen to see if anything gets hit.
Do you guys see any parts where i can change so as to improve the overall performance? Thanks guys!