![]() |
On dungeon generation
So I've been slowly hacking on my roguelike, and it was time to write a map generator. At first, I wanted to just copy something from Angband or Sil, but, upon closer examination, it occured to me that they use an overly complicated method.
They first place all rooms and then try to connect them with tunnels. The tunneling phase is difficult and it can fail. So people hacked in some matrixes that check connections, floodfill algorithms doing the same and what not. It still can fail and then Angband aborts the generation and tries again, starting from scratch. I used a simpler way instead, as follows: Code:
1. Place the frist room. Then, of course, you can do some postprocessing, for example, building more tunnels (the algorithm has a tendency to create some far-flung rooms with only one tunnel leading to them). But that's an easy step. So I figured maybe some of you would want to know that, in case you decide to write more dungeon profiles for Angband or something :) (hi wobbly :)) Also, if someone has more thoughts about generating maps for roguelikes, let me know, while I'm at it :) |
All times are GMT +1. The time now is 05:20. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.