Space Battle

Space Battle is a Flash game that I released on 20 Jan 2007 which is a top-down free-range 2D shoot ’em up game set in space. Drawing heavy inspiration from Asteroids and Escape Velocity, this arcade-style survival game has you blasting through an endless onslaught to rack up the highest score.

You can get the SWF from its download page by using the password escapefromasteroids.

About Space Battle

You start out as a spaceship hovering over a planet (creatively called “The Planet”), and you move around a 2D free-form plane. This means that your ship moves independently of where you are facing, which means that you can only change your movement by accelerating in a different direction. This allows you to move and strafe while allowing you to aim your guns at enemy ships.

You start off with a standard set of weapons: 15 laser cannons and 5 electron cannons. Each cannon fires once per second, and more can be bought when you land on a planet. Laser cannons have a much wider spread than electron cannons, but lower damage output.

There are two kinds of enemies, but both are controlled by the same AI logic. The “Fighter” ship is based on the ship from Tempest 2000 (or the Defender from EV classic) and holds a single laser gun, and the Electron ship is based on a 3D model that someone made for me (that I can’t find anymore) which appropriately fires an electron gun.

Once you’re done with attacking the enemy spaceships, you can land on The Planet by selecting it with L and then pressing L again once you’re close enough and slow enough.

Space Battle is an arcade-style game, so it has a simple game loop that runs until the player runs out of health. There are two modes you can play: Levels or survival. They both play very similarly, and only differ in how enemies are spawned.

  • Level mode (easier): A fixed number of enemies are spawned at once and you need to defeat them all before landing. Once you depart the planet, enemies are spawned again, but this time their count is increased by one.
  • Survival mode (harder): Enemies are spawned just out of sight at a fixed interval. If you need to land, you’ll likely be doing it under fire. Also, taking your time playing it safe will end up with you being overwhelmed.

I believe that once the game is over, you can submit your score. However since whatever server it was meant to communicate with is no longer around, the game crashes once the game is over.

Strategy

In order to gain a high score, the strategy is as follows. Your limitation to how long you can play is your ship’s health so you really want to avoid taking hits wherever possible.

To do this, you need to take advantage of your ship’s range. Your shots have a reach that lets them travel slightly off-screen, but enemy ships will only start shooting when they’re about 3/4 of a screen’s radius to you. So you need to try to keep ships about 3/4ths to 5/4ths of a screen away from you.

By doing this, you can comfortably attack enemies while avoiding taking damage. Of course, the challenge starts when you have to deal with several enemies at once since it becomes a lot harder to maintain your distance from more than one target at a time.

Mini version

There is a smaller mini version of Space Battle released on 5 April 2007. It’s basically a space invaders clone where after each level you have to pick a debuff to make the next stage harder to play. Honestly it’s not that fun, I’d rather play Groovy Invaders instead.

Development

As a fan of the Escape Velocity series, I originally wanted to make the game be in the same vein but had to cut down the scope significantly to what is essentially just a minigame. I wanted to make it possible to travel between different planets through either warp or impulse power, but it ended up with only one basic planet with a couple of (pretty much identical) weapons.

I remember starting this game back in November of 2005. Naturally, this game is inspired on Ambrosia’s (www.ambrosiasw.com) classic game “Escape Velocity”, and hopefully Space Battle will end up being such a great game as EV. (Yes, I did love EV that much. I’m still impatient for its next release.)

Me, back in 2007

The biggest challenge in the development of Space Battle has been handling trigonometry. Flash has a weird way of handling angles; objects’ rotation is designated in degrees (0-359) while all the trigonometric functions are calculated using radians. Not only that, but calculations had to be done with an offset since the ship isn’t set in the centre of the screen.

Once you consider that, all of the physics calculations have to be done to each object (bullets, enemy ships, planets) as they have to move both on their trajectory and along whatever direction the player is moving. It might seem obvious, but it did take quite a while to complete.

Asteroids

Just a quick anecdote. When I was first writing this code, I got some help from a tutorial about how to make Asteroids in Flash without any graphics. At the time, this was like witchcraft to me. Making a game without drawing out the graphics in a GUI? Surely this must be magic. This is when I realised that going back in the past, this is probably how people made video games back when computers were text-only.

I know it sounds like something very basic, but I always envisioned games being made with some game-making program. The N64 probably had something similar to Flash, but much more hush-hush and only available to people licensed by Nintendo.

Nowadays, most of the games I make are done with just a text editor and png images and a compiler in between. It’s really come a long way since then. Though I must admit that it is a lot more time-consuming to make games in C / Libdragon than in Macromedia Flash.

Conclusion

At the end of the day, Space Battle was intended to be a free web-based version of Escape Velocity, but that scope was too ambitious so a lot of features had to be cut back. To be honest I’m just really surprised that it controls as well as it does after all these years, and now it can be experienced at a clean 30 fps (hey that was a lot at the time).

In the years since, there have been major advancements in the genre. Ambrosia Software has gone out of business and all their games have been de-sharewared so it’s now Escape velocity is free to download, and there are dozens of total conversion mods that either expand on the lore or bring you into a completely different galaxy.

There’s also Endless Sky which is a free and open-source version of the game with modern graphics and quality of life improvements that is still seeing sporadic updates every year or two.

Space Battle is simplistic and clunkier than its counterparts, but it stands to fill a small niche at a time when this sort of game wasn’t available on the web for free.

Search

Subscribe to the mailing list

Random posts