Making an RPG: not easy

2011-08-08

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.

dungeon romp 1

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:

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.