Invasion Legacy

Date
Spring 2012
Tech
Cocos2d, Objective-C

During freelancing in 2012, the urge to write a game came back and I spent a good few weeks powering through.

Objective-C proved to be a nuisance in parts, and unit data was stored in SQLite, but it was certainly coming along.

This wasn't using Unity, but Cocos2D, which did a lot of the engine and maths gruntwork, but that was it. AI pathfinding, and pretty much everything else was from scratch.

If you've not played War of the Worlds before, then you get an overworld map which is split into sectors (or counties). Time progresses in this map, and you can research new units, buildings, weapons etc, and also deploy units between sectors. Units would take longer to reach sectors based on resources, and which units they were, which could seriously work against you as you had no idea where enemies were moving.

The battle map is pretty much typical RTS - you vs the enemy, often with a base. It's also the only place where you can build buildings (as you'd need to tell it where you want the buildings).

The hardest part of all was placing the units at certain start points in the map. I wrote an algorithm which would take a start point, and place units in a spiral pattern outwards until they'd all been placed, taking into account scenery. It was tricky to get right, and the end result was fairly lacklustre as it meant units would start in this very predictable rectangle.

This was a good opportunity to have a go at writing A* pathfinding too.

Back to projects