Pollyanna's Goatee











{Saturday 26th September '09}   gun_dance

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…

  1. 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…
  2. 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…
  3. 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.



{Friday 11th September '09}   rocks.in.space

Keys:
↑ : thrust
← : rotate ship left
→ : rotate ship right
space : fire

⌘R : reset game


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 first of those prototypes – rocks.in.space {source code & compiled:Mac OS X}, a quick-and-dirty clone of Asteroids – to the public. Probably to the ridicule of the public. But to the public nonetheless.

rocks.in.space was developed on an Apple iMac DV (Summer 2000) in C++ using SDL*, OpenGL, and sealfin*, compiled with Apple Xcode 1.1.



{Sunday 6th September '09}   Programming Praxis V

The “Perch” is a roulette betting strategy based on ignorance of the “Gambler’s Fallacy”: the gambler perches in a position where they can monitor all roulette tables; when a roulette table has had a run of red or black for the past four spins, the gambler places the minimum £10 bet on the opposite colour, reasoning that a run of five of the same colour is unlikely (the “Gambler’s Fallacy”, as the probability of the fifth spin landing on a given colour is the same as the first spin landing on a given colour); if the bet fails and the run of the colour continues, the gambler reasons that the odds of six in a row are even more unlikely, and increases their original bet by 50%; if that bet too fails, the gambler returns to the perch; the strategy ends when the gambler has either achieved their target winnings, or has insufficient money to place the £10 minimum bet.

Anyway, this {source code & compiled:Mac OS pre-X} is my solution for the fifth Programming Praxis held by The Daily WTF: a program to play roulette using the “Perch” strategy, with a user-entered number of roulette tables, starting amount of money, and target amount of money; the program ends when it has either achieved the target amount of money or has insufficient money to place the minimum £10 bet.

The solution was developed on an Apple Power Macintosh 8100 in C compiled with Metrowerks CodeWarrior IDE 2.1 (Discover Programming Edition.)



et cetera
Follow

Get every new post delivered to your Inbox.