Monday 11 August 2014

I'm Back in the Game!

So now that I've pretty much given the SpaceEditor as nearly finished and very usable, I went back to the game code (C++ yey!) and have been trying to make it support all the objects and features that you can create on the editor. That means parsing the SpaceEditor files and implementing the objects and behaviours. So far I've got Rocket, Astronaut and Alien, Planets, Suns, SunFlares, Zoom Spots and image layers. Most of these can be triggered on a scripted condition like "add a new spaceman two seconds after the player delivers the previous spaceman" or "fire up some sun flares every 60 seconds". This lets me script the level quite nicely from the editor, load it up and watch it happen in the game.

I also added basic scripted movement: go from here to there at a given speed. This way I can make an object (Asteroid, Planet, UFO, PowerUp, anything...) run across the level under certain conditions.

The Sun objects are nicely rendered using a couple of particle emitters. I'm really pleased with the results of this, if a little processing intensive. Same goes for SunFlares. And the layered transparent star fields giving us a nice parallax effect.




Then I got bored of creating game objects (still missing the Comet, Flying Saucer, generic Sprite, Black Hole, Coin, Star and PowerUp) and went on to detect the collision impact of the rocket onto a planet. That triggers a small dust cloud particle emitter, but a very small collision will in fact lose the player a life so I need to make it into a full blown explosion.

But losing lives... this made me think I needed to get the full game flow together: main menu, options, level selection, pause!... The looks are far from final, but at least now I start to get the game vibe.