Friday, 26 September 2014

A Dash of Color

I had a go at painting the Rocketship. The Rocket was initially - maybe some two years ago - created in 3D in Blender, then exported to bitmaps; I loaded those into a vector graphics editor and drew it with black vector lines, and again exported that to bitmap form as a 4x3 texture atlas and yesterday I shaded and painted the bitmaps by hand. Here's what it looks like now with an unpainted image for comparison:



And with a passenger on board the lights come on and you can see a silhouette of a character through one of the windows:



This is the most basic addition to the set of objects: a Sprite. In this demo level I have it as a satellite but it can be any image or animation, static or moving. In SpaceEditor you can also assign a diameter and a density to it, so it will bump into the Rocketship and cause damage.



What you see here is a Teleport object! I added it last minute to the SpaceEditor and to the game. In the editor you create two or more of these, and in each you specify where it teleports the Rocketship to, so they can be linked in any way we want. Rocket gets in on one side, pops out on the other side with the same speed and orientation.



Monday, 15 September 2014

Flying Saucers with Freaking Lasers on their Heads!

The Lasers burn through your energy level, faster in Hard difficulty mode, slower in Easy. 



But you can shield yourself behind planets:


Friday, 12 September 2014

We are not alone.

Replaced the old sparkly sun flare with a new supernova shockwave style effect. This is because I quit the idea of colliding particles with planets so the Rocket could hide behind planets. This way, if he's in range, he'll get hit.



Added a Flying Saucer UFO! Flight from A to B always follows a wiggly nearly random line. It pitches and rolls too!


Thursday, 11 September 2014

A Couple of New Features!

The Rocketship turns red with heat from the Sun:



Showing the total score, running taxi ride fare (countdown), score multiplier and destination planet up at the top left, number of lives and fuel down at the bottom:


Picking up Stars give you score multipliers:


We can now see the little guy through the window when we a client has boarded the rocket:


Power-Up! Displays an image of choice with animated "electron" particles around it. Fuel goes up when picking it up. All these objects are configured in the SpaceEditor:


Black Hole object! Immense pulling forces drag the rocket into it: 


End of level screens with different buttons for when you complete or fail a level, in campaign or arcade modes:


Can start in Arcade (no lives, you can pick your own level if you've unlocked it) or Campaign (3 lives for completing the whole Galaxy sequence and score accumulates):


Objects like this planet can move and rotate, as configured in SpaceEditor: 



Devastating Comet!


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.




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.

    

     


Thursday, 22 May 2014

Inspecting objects

I have wired up the inspector panels for the objects, meaning I can now edit their dimensions precisely, tint them, pick textures and whatever other properties are needed! It almost-almost only needs saving and loading now, in fact, that's the next step! Before that, though, I'll need to break up the level loading in the game from two separate files: the static scene composition, and the character scripting, because I think this editor will only be able to create the static scenes.

I've also done away with the green wireframes!



Thursday, 8 May 2014

Playing God

I can now create 3 types of objects: Planets, Coins and Stars. I'm not sure what the coins and stars will be used for, but the general pattern is there are 3 stars per level which are difficult to get to but don't stop you from finishing any level; and you collect coins to buy stuff like power-ups or rockets.

Objects can be dragged or resized using the handles on them, but they don't yet snap to the grid.

I added an object management table in the Objects side bar, but the objects don't yet belong to any layer nor can they be turned ON/OFF.

NSBezierPath is cool to work with to programmatically draw vector graphics. I drew the stars and the coins in Excel art and picked the coordinates visually - that reminded me of how I used square paper to draw graphics for the ZX Spectrum.



The Level inspector also has working World dimensions:


Friday, 2 May 2014

Building up a Game Editor

Starting to get the hang of Cocoa. The grid options window works great and I've added tabs on the sidebar for different purposes. Objects is where you instantiate game objects from; Layers is for creating and selecting Sprite and Image layers; Inspector is where you go to change the game object's properties; and Level has some general level properties. Doesn't do much yet, though!...