nerdblog - musings, art, etc. of Derek Stevens:

uStrat: status update

unit menu

And lo! I rarely have the time to put work into it, but I recently debugged some craziness with the AI and feel able to share uStrat with the world.

uStrat is a turn-based strategy game written in Javascript using HTML5 canvas. It is reminiscient of Fire Emblem or Super Robot Wars with additional resource-management elements a-la Starcraft or Command and Conquer.

The goal is to annihilate your enemy's base and prevent destruction of the cities. You manage resources by balancing construction of power generation facilities (solar arrays, tidal plants, and mines) -- which generate a certain amount of energy-per-turn and contribute to your maximum stored energy -- and constructing and using factories and armories. Factories build units, and armories equip them.

enemy base

The AI opponent does its own resource management and attempts to destroy cities and take out your units and structures. At the moment its algorithms implement the most basic strategies needed to provide an opponent to play against (and I have yet to finish the targeting and attack algorithms). They will be improved when time allows.


The game map is randomly generated at the start of the game, and the player and CPU bases are placed at opposite quadrants of the map. An overview of the map can be viewed with the spacebar or pause button as shown above.

The game controls are simple, and support both keyboard and touchscreen. Keyboard controls are: arrows for cursor movement, spacebar for map view, X for confirming selection, Z for going back, and A and S perform auxilliary functions like resetting movement, rotating through units and structures, and rotating the attack pattern on diagonal trajectories. The touchscreen controls are reminiscient of a SNES controller, with the face buttons renamed: instead of ABXY, YXZW. Y for yes (accept/confirm), X for no (cancel), W and Z for auxilliary funcitons. The minimap button is at lower center.

movement overlay

With the controls down, movement and attacking is a lot like Fire Emblem and Super Robot Wars. Select Move when accessing the menu with the cursor over one of your units to carve a path and move along it. Select Equip from the menu when you're on an armory to equip new or upgrade weapons. Select Attack from a cell with one of your units and choose the area to attack.

attack overlay

Currently, implemented units include the Ranger and Knight, your typical cheap soldiers; the Ace, a squishy but powerful and fast land-based soldier; the Battle Angel, a mid-power and high-mobility flying soldier, and the Blitzwalker, a powerful and expensive tank.

Currently implemented weapons include your giant robot staples the Beam Sabre and Rifle, the midrange sweeper Beam Cannon, and the expensive long-range sweeper Hell Bomb.

There are still lots of bugs to work out, UI to polish, and a few more features to finish, but you can see from the screenshots that the game has the rough outline of its final form! I'm excited to push it closer to a deployable game, as I've spent the better part of a year on it so far (very little work has gone into it since my son was born, but it's inching along). If you have any feature requests or ideas, shoot me an email. If you have any bugfixes, submit a merge request on the git repository.