Keys:
↑ : thrust
← : rotate ship left
→ : rotate ship right
C : fire light gun
X : fire heavy gun
Z : fire missile
(You only have two, and only one missile per ship may be on screen at a time.)
⌘R : reset game
(If you’d like to watch two AI-controlled ships duel, change the line .human="no" to .human="yes" in the file main.hll.)
Ages ago, iDevGames.com held the 21 Days Later : Vectorized contest, a contest to – unsurprisingly – develop in twenty-one days a game making use of only vector graphics; I had several original concepts planned for the contest, but wasted precious time before I accepted that none of those concepts could be completed within the time-limit; instead, I decided to develop glass_castle, a clone of Star Castle (which I was introduced to by its clone, Cyclone, on the Apple Performa 460); unfortunately, I wasn’t able to complete development of glass_castle by the deadline of the contest, although I had developed three playable prototypes of increasing complexity and completeness.
Now, just a few years later than the deadline of the contest, I’m releasing the second of those prototypes – gun_dance {video|source code & compiled:Mac OS X}, a quick-and-dirty duel between a Human- and an AI-controlled ship in an Asteroids-like environment – to the public. Probably to the ridicule of the public. But to the public nonetheless.
The AI is simple-and-quick-and-dirty and will…
- Check whether it is too close for comfort to an asteroid (if so, it will turn to face away from the asteroid and thrust); if it isn’t, it will…
- Check whether its opponent has launched a missile (if so, it will turn to face the missile and fire whatever guns the missile is in range of); if they haven’t, it will…
- Turn to face its opponent, firing whatever guns its opponent is in range of (and launching a missile if its opponent is in range of the heavy gun – why I implemented that condition I don’t know…), otherwise thrusting towards its opponent if its opponent is not in range of any guns.
It would be the work of a few minutes to implement controls for a second Human-controlled ship, or to implement more than two opponents; but those are minutes I’m not willing to spend…
gun_dance was developed on an Apple iMac DV (Summer 2000) in C++ using SDL*, OpenGL, and sealfin*, compiled with Apple Xcode 1.1.