by munificent · 11y ago · 0 comments
> 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.
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.