Monday 16 June 2014

Save the World!

I can now save the worlds and load them back, mostly in the format that the game reads. However the editor has grown much more powerful than the game and many things the editor has aren't supported yet.

Objects can rotate and move from one place to another; most can be scripted on some events, and I've also added the ability to read keyframe animations from the texture and the editor will animate those as well.

These images show a couple of test levels that were just read back from file. I also moved the add-object palette up to the toolbar.



Tuesday 3 June 2014

Rockets, 1-Ups and Blackholes!

I've added a number of objects to the palette! These were all in my plans, but now I've sort of committed to letting the editor set the scene AND the game level script - when each object shows up, where the little space guys want to go, where the objects move to and at what speed; that sort of thing. The drawings on the world editor are vector drawn in code using NSBezierPath; that was a fun - if time consuming - exercise involving pen and square paper. 

Here's the object palette and what the objects look like on the map if we don't assign any textures to them:

    

The inspectors have also grown quite a bit. There's a ScriptableSpaceObject base class now which holds the common stuff in most of these objects, then particular implementations on top of that. There's also a view controller for each of these inspectors. Here's "Planet":

    

On this screenshot, two objects - a power-up and a blackhole - are showing some planned scripted movement. And there's an image layer on the back, which is being tinted blue. Any object can be tinted with a colour; I'm not sure what I'll use this for, but it seemed cool. Maybe there will be teams, or different races one day.