Open adiron opened 7 years ago
This is an interesting concept. And a pretty hard one, in my opinions.
Built-in generators in rot.js are certainly not well suited for this. You might be able to create one itself, but you will have to solve certain constraints -- in particular, the fact that generating a new part of a map shall not modify/influence existing parts.
Alternatively, you can use existing generators to create rectangular areas of your mega-map on the fly, connecting these tiled segments manually.
I think that the trick would be to use some kind of pure function that, given X, Y coords and a seed (which is the same for all iterations) will spit out a tile that when put together would make a nice map.
I haven't tried this, but for example Perlin Noise could maybe accomplish this?
I came across this page but it is far too mathematical for a designer like me.
rot.js has a noise implementation (ROT.Noise.Simplex()
) that fits your requirements. The question is, how to convert this deterministic noise generator into a suitable map.
Several years ago, I made a proof-of-concept for this, using the noise function to create an infinitely large outdoor map. Check it out: https://github.com/ondras/railrl (playable version: http://ondras.github.io/railrl/)
This map is not stored in memory. Instead, every cell is evaluated "on the fly" by consulting the (deterministic) noise generator. If this works for you...
I am not sure how to correctly apply this approach to a traditional dungeon map with rooms, walls and corridors, though.
Thanks for your proof of concept. I managed to do something similar. Works great so far.
As for dungeon generation, I think that sticking to the good old generation style for that is fine. ;) It's mostly the outdoor map that's an issue.
Hi there
So I'm experimenting with a certain idea for a roguelike with an "overworld" map type thing. I could in theory just generate a very very big map in advance and just use that, but I don't think that's necessarily the best idea, as the map could get very, very big. Unfortunately the map generators included require a width and height and will not generator for specific squares alone.
Any ideas on this?