Forests and Phases

August 17, 2008

Last week I wrote about having different game phases. I realize now that “phase” was not the right word; What I meant was really “state”. The game does not have any phases in the right sense of the word. It has state, though–like every game–such as whose turn it is and whether the user is in the process of moving a unit. That part works pretty well now. Tanks can only be moved once per turn and only by their owners. The troops available for deployment can be restricted to arbitrary sets of troops and the interface is easy to use. You just click where you want to deploy a unit and if allowed it appears there and disappears from the troop deployment panel at the bottom. You can undo deployment decisions by clicking at the tank you want to move back into the undeployed set.

What’s missing now is the ability to end turns. There’s no button for it, so you have to evaluate a Scheme statement to end your turn =)

I have also been sketching on more types of terrain (forests and cities). I’m far from satisfied, but it’s a start. See the screenshot.

Other news is that Cairo is a bit slow and I have started thinking about learning OpenGL instead. The root causes are that Cairo’s rendering quality is too high (antialiasing is not necessary when zooming, for instance) and that it doesn’t use hardware acceleration.

The decision to use Scheme seems to have been an excellent one. With SWIG and Tinyclos I have complete control over the scene graph even from interpreted code, and I haven’t had any performance problems at all so far from Chicken.

Leave a Reply