Sigh…I must be crazy.

It's land!

RPGs are just so information dense; doing one in one page seems almost impossible without cutting practically every feature that makes an RPG an RPG. But as you can see, I’m thinking positive…this is basically a much more effective reworking of the terrain generation I started on with 40-Hour RPG #1 (which I failed to complete, if you’ll remember).

Basically, I wanted a algorithm that made maps that reminded me of this. I must use an algorithm, because I want the map to be 64×64 (I don’t think a smaller map will feel big enough to represent a world). If I tried to simply use a data file, I’d waste 4096 bytes just on the world. An algorithm that takes up fewer than 4096 bytes and can generate a random world would be a big win.

I now know what I was doing wrong with my first terrain generator. I walked the Path of Perlin and tried to do a heightfield. I can’t really blame myself; google “random terrain generation” and practically all you will get are articles about heightfields.

You know what? I frigging hate heightfields. For one thing, they are not an accurate representation of how terrain looks. They’re too smooth; too rolling. They say nothing about what type of terrain it is or what is on the terrain, just what elevation it is. And you will never, ever get a realistic-looking river out of a heightfield.

So I went back to a very early idea I had – that of seeding the map grid at regular intervals with terrain types and then having them grow and fight each other for terrain tiles. I effectively walked the Path of Conway instead. This worked much better and started giving me maps that I felt I might be able to use, but I still think there is room for improvement.

My current intention is to include both a world generation algorithm and a dungeon level generation algorithm. I will probably run both until I get results I like and hardcode those seeds so that the player gets known content; otherwise the odds are good that the game would be unfinishable.

I am going to do my best to get it into one page. Going the two-page route here seems like a copout, since I’m almost positive I could do an RPG in two pages. (Especially since Tom is already doing an RPG in two pages. Gosh, it sure would be nice if he’d update his blog with a couple screenshots of it.)

Let’s see what I can do in one.