This week I got a chance to sit down and get my first attempt at a particle system working. The thing that slowed me down was only having an Update all actors loop. Since I was spawning particles on things like death of an asteroid I was invalidating my iterators. Rather than switching the container I was using etc. I decided getting a event or messaging system going would be better.
Now my main update looks like this:
- Update tuning variables from Lua
- Process message queue (this is new)
- Handle input
- Update all actors
- Special collision death loop (this will be rewritten to use messages)
- Game end condition check (this will be rewritten to use messages)
I am starting to think that if I had actually created a messaging system up front then I would have had an easier time over the last few weeks. Doing this system has made me re-assess if doing it right from the beginning is actually better or not. Next steps are to get some fun particles going in game so I get some visual progress and perhaps some sound FX as well! Then I might look at getting my custom message classes into Lua since I think that might actually save me a serious amount of time. I’m hoping that in the next three weeks I will have a rough working version of my ship vs. inanimate object combat working and looking good.
The bad news is that my laptop is really starting to slow me down. I sort of noticed that it only lets me have two simultaneous keys down awhile ago but it didn’t really affect anything. Now that I want to accelerate, turn and shoot it is getting very annoying. I currently fear that this is a hardware issue. Anyone know how to find out about key press limits? I cannot even find anyone else complaining about it so I think something might be wrong with my laptop. I ran into huge issues when I was trying to indulge in some retro Myth 2 gaming. Keys would get stuck for several seconds rather than updating smoothly. Looks like I should pinch pennies and buy a new laptop. Front runners are the Dell XPS line and a MacBook. Any recommendations?