← All posts
← →

Space War 3: the third version, this time in Unity

2012–2017

I wrote the first Space War in Pascal in 1999: two little ships shooting at each other. In 2000 came Space War 2K, one engine for three games. And in December 2012, by then working in Unity, I started on the third version.

Space War 3 in the browser: a ship, planets with balloons, asteroids

Space War 3, the 2017 WebGL build. I ran it again for this post.

How it started. The first commit, 15 December 2012: “Ship fly 2D polygons”. In the second I brought over the resources from Space War 2K. Within two weeks the game had:

  • a gun, bullets, two ships and a health bar;
  • engines, collision damage and random respawn;
  • a minimap;
  • a looped space.

The space worked like in old games: fly off the right edge and you appear on the left. So that a ship near the edge was visible on both sides, I put eight extra cameras around the main one. Around New Year came rockets, with splash damage and homing.

In January 2013 there was AI, a Bot Wars mode where bots fight each other, scores and a main menu. On 13 January I tagged it version 0.1. In spring I made a Flash build. The menu still plays the “Loading…” intro in the background, which I rendered in 3ds Max for Space War 2K in 2000.

Space War 3 main menu over the Space War 2K intro

Modes: HotSeat — two players on one keyboard, Single — against up to five bots, and Bot Wars.

A team on enthusiasm. In 2014 Unity got proper 2D. I moved the game to 2D colliders and replaced the eight cameras with a border around space. I added an on-screen joystick for Android. In March Pavel joined: he did particle systems, normal-mapped asteroids and new ships. The ships, the asteroids and a flying factory on balloons were drawn by Liza.

We agreed on Skype. I wrote a short agreement:

  • the developer doesn’t share the sources;
  • he has the right to be in the credits, to access the repository and to leave at any time;
  • all content belongs to the project’s author;
  • pay isn’t guaranteed until the project breaks even.

Pavel replied: “that’s how I pictured it, pure enthusiasm and nothing more along the way.” By May 2014 the game was up at spacewar.kindex.lv.

Ship sketches, the flying factory and a pencil sketch of a platform

Art from 2014: ship sketches, the factory on balloons and a sketch of a platform on paper.

The second run. For the next two years the project only moved to new Unity versions. In November 2016 I sat down with it again and in two months added:

  • new explosions and a HUD;
  • a sniper bullet, ricochets, a shotgun;
  • med packs and random ammo boxes;
  • a banana and a super banana — a nod to Worms;
  • a remote-controlled rocket, mini rockets, an atom bomb.

The bots learned strategy: they picked up ammo, remembered who had attacked them and took revenge. In January 2017 the ships got abilities that ran on energy: flaps for sharp turns, invisibility, a shield and a teleport. A new ship, “Grisha”, arrived too. The last commit is from 14 January 2017: “Teleport. Energy”. Just before it came a stub for network play, which never got further.

A fight against five bots: rockets, an explosion, ammo boxes.

A rocket explosion by an asteroid

I never finished it: there are no levels and no network. But you can fly, shoot and fight the bots. Three versions of one game over 18 years: Turbo Pascal, my own engine in Free Pascal, and Unity. In each I solved the same problems again: turning the ship, collisions, endless space. And each time with better tools than the last.