Friday, December 29, 2006

Mooncasting, the design

In order to explore the XNA and get a real feel for trying to write a game with it, I've spent the last few days trying to work up a little prototype. The working title for it is Mooncast.

The gameplay is battleship meets a cut down RTS affair. You start on one continent, with a castle and a pair of plebs. Your goal is to take out the opponent's castle on the other continent. At the start of the game, you cannot see the opponent's units.

You can build a number of additional buildings, command them to take actions, and move them around. All of this requires the efforts of plebs, which you can assign to support duty at the building level. The more plebs, the more efficiently the action is performed, e.g. the faster a building moves, or a cannon fires.

Available buildings so far are:
  • The Castle, births new plebs
  • The Cannon, fires meteors
  • The Aviary, despatches scout birds flying monkeys
  • The Watchtower, shoots down scout birds flying monkeys
  • The Hut, births new plebs at a better rate than the castle
Up for consideration are:
  • The Shield Generator, takes damage instead of a single other building
  • The Black Widow, despatches burrowing spiders to attack opponent plebs
  • The Wasp Nest, despatches wasps in response to spiders
  • Armageddon, a super cannon with much longer recharge time
  • The Eye of Ra, a satellite that allows the player to see enemy cannon launches (would demote normal visibility to line of sight from towers and castle)
  • Hathor's Gouge, a rocket that takes out the Eye of Ra.
The player may construct any number of each building, except for the castle.
Each building can be attended to by as many workers as the player wishes.
Each building can only do one thing at a time, including moving.
Each building has a health attribute. It cannot be replenished. When a building's health is depleted, it is destroyed.

Game flow goes as such:
  1. Preamble: player must select starting triangle for his castle to occupy.
  2. Play starts
  3. Player may select any available building and command it to move
  4. Or player may select any available building and command it to perform its action. This may involve selecting a target location/s on the map.
  5. Or player may drag and drop worker icons from their current post to any other available building.
  6. Or player may select to build a new building.
  7. Meanwhile, buildings continue to simulate either being built, idling, moving, performing their action, or receiving damage.
  8. Repeat from 3 until either player's castle is destroyed.
Progress to date:
  • The Map. Imported as a triangle mesh and parsed for efficiency into an easily traversable graph structure, then unwound into vertex buffers for rendering the solid display and wire frame overlay. The map is aware of terrain type and player ownership.
  • Base unit class, with knowledge of the Map and how to traverse it.
  • Placeholder art in for the map, background, buildings and little workers.
  • Projectile class, with rudimentary collision.
  • UI system class, and a building widget.
  • Oh, and a cursor!
So far so good with the XNA really. No nasty gotchas, and C# is being a darling. No suprise at all, but robust collection classes are definitely where its at.

No comments: