I have a very simple prototype of a farmville-style mechanic that hits a wall pretty quickly on the performance side. The user clicks on the canvas to create a small plot of dirt which will wait 5 seconds, turn yellow, wait 5 seconds, and turn green. The problem is that after adding about 14 of the plots, the frame-rate will just plummet and the game becomes unplayable.
The brown, yellow and green plots are each a separate object. The brown and yellow objects each have a timer, the green does not. When a timer is triggered, the next object is spawned and the previous object destroys itself (brown spawns yellow, yellow spawns green, green has no timer - spawns nothing).
Which part of my design is leading to this performance "crash"?
The game:
gregorygiles.com/dustbowl/index.html
picture of the event sheet:
imgur.com/a/piriy
project:
sendspace.com/file/o26nkf