November 28, 2018 at 10:05 pm #2108ErmzParticipant
Hi there, recently bought Dungeon Master and starting to get a hang of it. Went through the tutorial video and will start poking around with spawning items and whatnot. It has almost everything I need, but is missing one feature I’d like: an infinite world. I’m basically making a walking sim. No story or anything, just aimless wandering around, and I want the rooms to just keep generating as the player goes along. Is it possible for you to add such functionality to Dungeon Master, or would that be way outside the scope of the product?November 29, 2018 at 8:43 am #2113vchevalierKeymaster
Hi Ermz! Nice to meet you!
Hmmmm… I never considered adding infinite generation to the Dungeon Master… Mostly because of the way the current generation works: it was planned to create coherent metroidvanias. Which means that the whole dungeon (or game) is generated and keys are distributed in a way that makes the game playable from start to finish with no unreachable zones. Adding a feature for infinite worlds would mean that the system does not create a “complete world” with distributed keys. The system cannot be sure that the whole world is reachable and coherent. It would need some major changes to create a seamless infinite world (or level).
Honestly, I don’t see myself implementing this feature in the near future (which means at least not in 2019, I have so many other things to work on) and I’m not sure if I would ever do this in the Dungeon Master. It would take time to investigate if it’s possible with the current asset or if it would be another separate asset.
There is something you could do though. It might be good enough for what you want to do, it’s an idea worth testing… But it wouldn’t create a perfect seamless world. There would be seams but I guess they could be subtle enough.
Since you cannot create part of a level or part of a dungeon and then play the game right way before the whole generation is finished, what you could try to do is to chain multiple dungeons together (actually alternating between 2). So at the start of your game, you would generate a first dungeon (let’s call it D1) and move your character inside of it. So imagine your character always moves from left to right:
D1 entrance D1 exit, links to D2 X----->------>------>------>------>------>------>------>X
When your character leaves through the D1 exit point, you store the D1 generation seed on a stack and you generate a new instance another Dungeon (called D2) with a new seed. D2 is located at the same location than D1, but it’s not fully rendered, so you have the entrance room of D2 rendered at the same time of the end of the D1 dungeon, so they occupy the same locations, but are not rendered at the same time: no clash.
So your character exits D1 to enter D2
D2 entrance D2 exit, links to D1 X----->------>------>------>------>------>------>------>X
Here, the same things goes, your character moves from left to right and when it reaches the D2 exit, you take the D2 generation seed and put it on the stack. Create a new random seed and regenerate D1 with this new seed. Transition from D2 to D1, and you’re into an infinite loop: an endless world.
If your character decides to travel back from right to left, as your reach the left entrance of a level, rather than generating a new seed, just take the latest generation seed from the stack and regenerate the previous dungeon with that seed: you get the same result you had and the player won’t see any difference. You then move the character from the entrance of the D2 to the exit of D1, etc. Keep alternating dungeons. So you really need 2 stacks to allow for travel in both directions: one stack for dungeons on the left and one stack for dungeons on the right that were already visited.
Things to keep in mind: you have to find a way to make a smooth transition between dungeons. A small cutscene? Opening a door? Passing through a wall? You need something to obfuscate the teleportation of your character from exit to entrance and vice versa.
Another thing to keep in mind: dungeon generation is fast, but can still take some time and create a small lag in your game. So you want dungeons that generate fast. Better to keep them small and simple. And you need a 100% generation success rate: multiple generation attempts are not your friend when you are looking for performance.
Also small dungeons would mean more seams to handle. So you would need to find a balance between generating dungeons very fast and not managing to many seams.
I think this could work pretty well if you find a creative way to handle the seams between dungeons. Something pretty cool: it wouldn’t cost a lot resource wise since you would be reusing pretty much everything. The only thing that could grow infinitely is the stack of generation seeds, which are mere strings. You could go on a very long time before crashing the game because of a lack of resources. Also you would never reach a point where the coordinates of your character would get ridiculous (like X=99999999999) because your character would always be bound between the entrance and the exit of the two dungeons and you control that.
That pretty much sums it up.
Let me know what you think! 😀November 29, 2018 at 9:07 am #2114ErmzParticipant
That’s actually a really good alternative! Thanks for the quick response 🙂November 29, 2018 at 9:33 am #2115vchevalierKeymaster
Cool! I’m glad you like it. Let me know if you try it out and how it turns out. 🙂
- You must be logged in to reply to this topic.