Two weeks into my little roguelike project, I have a lot more respect for people who develop RPGs. It's like all learning: the more you know, the more you realize how much you don't. In this case, specifically, just how much is involved in making these games.

Take the combat system for example.

First, I had to make it so combat was possible at all. That meant basic AI for mobs, and calculating the distance between two mobs, and a notification system so you know what just happened — remember, the PC is a mob like any other.

Then I had to implement stats, which led to a template system for mobs, as I'll have to fiddle with the numbers a lot — and there's a lot of numbers. Not that it's anything complicated; I went with the simplest system that wasn't a mechanical "attack/defense/life" (instead, there is muscle/agility/stamina, heh). But this system turned out to be impossible to balance properly, as my original concept was for a tabletop ruleset, so I added another variable: dice size. Which not only solved the balancing problem, but also suggested a very natural way to calculate hit points. Though I'm not calling them hit points, but wounds, and they work in reverse — another detail inspired by modern tabletop RPGs, like the dice pool system. Which, by the way, I haven't chosen for the sake of it, but because it gives me a nice Gauss curve for the dice rolls. Remember I was looking for ways to smooth out the impact of randomness? This helps.

Fog of war was another piece of work. As even the simplest field of view algorithm is in fact quite complicated, I went with the good old "see everything up to X tiles away". Which is enough to give a feeling of exploration, but it took considerable reworking of the display system.

Speaking of that, last time I lamented the effort required to make a game with graphics. Turns out, I had overlooked a very simple interim solution (thanks, Jimun!) — namely, to make some 32x32 tiles with big ASCII characters printed on them. Of course, this being in a browser it's easier to just use a 32-pixel font size. Which is lame, honestly, but still better than using free tiles with the wrong look-and-feel. The only problem is that at this point it would distract from working on the gameplay. And boy, do I have work to do:

• Flesh out the combat system; add healing, and damage-per-second (well, turn).
• Speaking of turns, a time-tracking system will be needed at some point.
• Add items, and implicitly an inventory system. Randomization for potions, too. Rolling your eyes yet?
• At least a second level, with its own generator. Tie experience gain to visiting new levels.
• Make plans for the future, as the above points will result in a prototype at best.

Last but not least, after considering and rejecting a nice-looking but complicated solution, I went for the ugly-yet-workable dialogue window you can see now. Which has just a little problem: it doesn't support interactivity, and I'll need that in several places. Oh well, off to work.