This game was inspired by the turn-based combat of the Heroes of Might and Magic and Disciples fantasy strategy games. It is a sandbox to experiment with various battle mechanics to learn what's fun, and what isn't. I've deliberately limited the options at each turn to help a computer player understand them. If the existing Heroes combat is like chess, this project is like checkers.
Human vs. AI
Two-player hotseat battle
Naive AI vs. Smarter AI
New unit abilities
- Random damage rolls, separate values for melee and ranged attacks.
- Initiative stat determines the order in which units get to act.
- Commanders have influence over the strength of their units.
- Units can retaliate against melee attacks once per round.
- Ranged units and spellcasters cannot retaliate.
- A unit cannot retaliate against flying units unless it can fly too.
- Pressing the 'S' key will skip a unit's turn.
- Commanders and their units share a mana pool for casting spells.
- Available mana per side starts at 1 and increases by 1 each round.
- Be simple enough that an AI player can play well.
- All units move 1 hex per turn by default. Moving more than that should be special.
- All attacks must do at least some damage. No abilities may cause an attack to miss entirely.
- Most creatures should have a special ability. Special attacks take the place of a normal (boring) attack.
- Special abilities must be special. Anything that reduces to a numerical increase in damage or hit points is not special.
- Magic should be magical. Good spells should have a large-scale effect. Spells that affect the entire battlefield indiscriminantly are even better.
- Units should cast the direct-damage spells so their damage scales with unit size.
Here are the decisions I've made to simplify the code that deals with art assets.
- Hexes are 72x72 pixels. Anything designed to fit in one hex should use the same size.
- Animated images are stored in a sprite sheet with the first frame on the left and no padding between frames.
- Projectiles are drawn with their trailing edges in the center of the hex and facing East. The image rotation code goes counter-clockwise, like angles on the Unit Circle.
- Commander portraits are 200x200 pixels.
SDL 1.2.15
SDL_image 1.2.12
SDL_ttf 2.0.11
SDL_mixer 1.2.12
SDL_gfx 2.0.24
DejaVuSans font (drop the .ttf file
in the top-level directory)
Battle for Wesnoth for all of the art and sound assets.
Copyright 2013-2014 by Michael Kristofik
The license for code, art, and sound assets is described in the file
COPYING.txt.