More
My asteroids game was going really slow. I thought it was because of all of the particles and projectiles not being trashed by memory garbage collection. Turns out I was sorta right. What was really happening is that I had an event that was firing every frame for every object, even dead ones, and that was piling up in the background. So, I put in a line that killed the call when the object dies. Lo and behold, it worked…then I added a bunch more crap and slowed it down again. Here it is: Asteroids. I added tracking so there are targets over each asteroid. Unfortunately it doesn’t work correctly when the screen size changes from 800×600 to something else the HUD doesn’t draw correctly so the tracking and the site get fucked up. Another addition is that when you destroy one of the smallest asteroids, a big one is created in the distance. In this way it starts of easy and the gets ever so slightly harder as you go. Also, there’s now a score count at the top.