Hacker News new | ask | show | jobs
by munificent 4193 days ago
These links are awesome. I've considered an "incremental digger" model like Nuclear Throne's before. I like that they're "realistic" in that they sort of simulate how creatures would have created the dungeon. I haven't played with them enough to see if I can get fun results out of them, but now I find myself wanting to try.

> Keep in mind the basics of a good story: an escalation in tension and difficulty, spaced with breathers for rhythm and flow.

It's out of scope for this article, but my little game tries to do some of that. Once the dungeon is generated, it chooses a random starting place for the player. Then it calculates the distance to that tile for every other tile.

When monsters, treasure, and quest goals are placed, those distances are taken into account. Harder monsters and better stuff are placed (roughly) farther from the player, so it feels like there's a general progression in difficulty and reward as you go farther through the dungeon.

There's definitely a lot more I could there.

Now that I think about it, one simple refinement would be:

1. Place all of the monsters first.

2. Recalculate distances and treat tiles near monsters as being "high distance" based on the monster's strength so that paths that go through monsters become "longer".

3. Now place treasure according to that.

That would give you dungeons where monsters "guard" better treasure, and stronger monsters protect better loot.

1 comments

You could enhance that second point by adding some noise to the function so the difficulty isn't a smooth ramp — you get some tough monsters earlier and then maybe the next group isn't as difficult.
Right. I fuzz that on the other end in my game: the distances are calculated accurately, but the monsters are distributed semi-randomly by distance.

The basic process is:

1. Pick a random difficulty for the monster. 2. Pick n random locations for the monster and place it at the farthest one.

n is based on the monster's difficulty so stronger monsters get more chances to end up farther away. This means you can still run into really hard stuff early, it's just less common.