Hello,
I was wondering if I could gather some design-related advice on a feature I planned on implementing in my game.
I basically want to have a grotto-type of dungeon system. Those who played Dragon Quest 9 on the DS know what I'm talking about, but for those who don't, this is basically how it works:
- Player gets a grotto map, use it to unlock said grotto, which is located at a location out of a given list of pre-determined spots on the world map. Once the player finds the grotto, its entrance becomes visible. The player has a treasure-map like picture that helps identifying in which area the entrance is located.
- The grotto itself is a randomly-generated dungeon that has floors selected from a given bank of floors, which contains thousands of floor layouts. When the map item is created, so is the layout of the dungeon. The number of floors range from 4 to 16, depending on the grotto's difficulty.
- At the end of the dungeon lies the grotto boss room. Beat him, get the goodies, gain a new map for another grotto, and leave the grotto.
- Put the map back in your bag, pull use the other map, and go find that grotto. Or, re-use the map our player just did so the boss and treasures can reset, and farm it.
This is, of course, for a top-view JRPG-style game.
So while the mechanics are simple, I'm not used to how map generation works with DM. Basically, I would think that the way to go would be to have a DMM file containing a bunch of premade maps to act as my "floor bank", and once a map item is generated, have the dungeon generate itself from the floor bank for the amount of floors that this given grotto would support.
Now here are my questions:
1- How would one, code-wise, get that kind of dungeon generated? A simple example would suffice.
2- Since the generated dungeon map would be reusable/farmable, would it be wise (if at all feasible) to store its contents in a variable of the treasure map item? Or would there be more efficient options to get that result?
Any suggestions on that matter would be much appreciated. Thanks in advance.
Mar 26 2014, 5:09 pm
Best response
|
|
Protip: Search for "Geomorph dungeons". It's a neat concept, and a rather easy way to set up a random dungeon generator.
|
Gotcha! Will do, thanks!
Edit: looked it up, and the idea looks neat. However, there's one point I would still need a bit of clarification. Let's say I already have my own map generation mechanic. The point here is to have the result (ie: the generated dungeon) saved, and bound to the treasure map item for later use. How would I go to do that specifically, if that's at all feasible? That's the part I'm not all too familiar with. Any pointers as to what I should look into for this would be great. Thanks again! |
A series of random numbers can be generated using a seed. Provided you initialize the random number generator with a specific seed, you will always get the same sequence of results.
What this means, is if you want to save a random dungeon, you can save it by the seed number, and regenerate it. If you need the monsters to stay dead, or the treasure to stay gone, you can also save alongside it, a series of flags that determine if a generated object is broken/killed/taken. |