Engine and game starting to take shape

I’ve slowed down a little recently, but every thing is still moving forward! There are still somethings that must be done to complete the game (main menu, score, lose condition, sound effects, music fading in and out…), but the engine is almost “complete”! Though it’s far from finished…

Here’s a image of a test I’ve just made:

ReLoneliness_4_2I disabled collision until there were more than a thousand sprites on the screen (every one moving around). It run, on 30 FPS, with no problems ranging from 16% to 24% CPU* usage (more or less… it floated a lot more, but that was the mean I noticed). Then, when I enabled collision once again… over 90% CPU usage. xD Colliding every sprite with each other was really stupid… but when most of them weren’t active, it run smoothly once again! (even with more than a thousand sprites on memory)

Well, I’ll implement collision using a quad-tree eventually, but I’ll try yo finish the game before! And then I want to do another game for the October challenge using this engine! (this game isn’t something that would sell…)

Now, back to work…

*Two notes here:

  • My computer is an AMD Athlon 64 TF-20 (1.6GHz), so I found this result quite great! I can only imagine it running on a better computer (and at 60 FPS).
  • All those 11 threads weren’t explicitly instantiated by me. Before I added the audio sub system, there were 4 threads: the main one, one for the SDL Timer, and another two for who knows what (something related with graphics, since I’m also using OpenGL and the glew lib). Every other thread was created after the audio sub system began running. So, except for using something I don’t completely understand, I’m not doing any crazy stuff with 11 threads! xD