markromanmiller / triangle-attack

Attack of the Triangles is a tower defense game built in Python and Pygame during a twelve-hour hackathon and packaged afterwards
1 stars 2 forks source link

Two Differing Game Clocks #3

Closed markromanmiller closed 10 years ago

markromanmiller commented 10 years ago

Enemies move and towers fire relative to the system clock, but lasers last exactly 20 game loop steps. When there are many enemies [and therefore many lasers] this is enough to affect game performance. To fix: lasers should be linked to a system time in ms and removed when the time elapsed is too long.

markromanmiller commented 10 years ago

Fixed. Lasers now last .3 seconds (line 10 in TowerManager)