RMMV Procedurally Generated World

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
188
Reaction score
139
First Language
german
Primarily Uses
RMMV
Hey all,

some time ago, when I spent hours with No Mans Sky, I wondered, if it would be possible to make a mix of JRPG and Exploration of a randomly generated world. I'm working on a prototype right now, and I still need some days until I can present something playable. Nethertheless, I wanted to present some ideas and want to know what you would think about it. And yup, I stuck on some things..

While No Mans Sky takes place in space, I don't want to create a "No Mans Sky 2" or whatever Space Exploration Game. Instead, I go along with the floating islands cliche. Each island is going to have some bioms, that could be field, forest, snow, mountains, dungeons... Just as in every JRPG, there's going to be a World Map and you need to travel through these dungeons or roads to reach other places. Fast Travel and Airship will come later. I think having field, snowfield, desert, and all the things that the RTP provides, there should be enough variety.

Next is the Random Map Generation. Even the best generator has its limitations, and a generated map would never reach the variety of a handmade-one. Let's assume I had a generator that can generate
- World Maps
- Dungeons
- Roads, like Forest Road
- Towns
Just imagine, the generator can create maze-like dungeons with some randomly-placed assets, but of course no powerful handmade maps. Like in No Mans Sky you have hills and some caves, or a randomly generated Map in Age of Empires or any other RTS game. Generated maps can have lot of variety, but in the end, they won't have anything special.

I think this is going to be a big downside. As soon as players figured out how the generator works, they would tend to rush through the Maps, looking for loot and monsters, and that's all they do. I'm not sure on this topic. Looking back to No Mans Sky, there were many people complaining about every planets looks the same, but on the other hand, there were people just like me, who still liked the game.

Now the Gameplay. It's going to have similarities towards No Mans Sky or any other free roaming game, in which the player builds stuff to continue his journey. But, I plan to lower farming to a minimum, because.. ehm.. I don't like it. Of course, players will get some rewards after he finished a dungeon. I still need some inspiration for side quests.

To kickoff the game, I plan to let the player search element crystals. Or any other short quest that contains to hunt for various places. And for every biom you want to pass, you need to fullfill some requirements, like having warm clothes for the snow field etc.

Especially for the Gameplay and Quests, I really need some advices, tips or inspiration.


So, that are the thought I'm having. Maybe you want to tell me if you would be interested in such a game, or where you see some pitfalls for me, what you would like to have and so on. Or if you think, it's a terrible idea or just would not work at all, just tell me.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
705
Reaction score
260
First Language
English
Primarily Uses
RMMV
Personally, I don't like randomly generated dungeons or maps. Like you mentioned in your post, they lack the artistic quality of crafted maps and dungeons. The only RPG I really liked that relied on generated dungeons was Dark Cloud 2, and the saving grace was the gameplay. The generated dungeons in that game sucked.

I haven't played No Man's Sky since the launch, and it was terrible then. I've heard a lot of the features have been fixed and improved, but I have not gone back to check it out. I would imagine it works a lot like Minecraft in terms of generated areas. And for that type of game, I think the random generators work fine because they are huge and they fit with the type of gameplay.

I am not sure that MV if the correct engine to create this type of game so that it shines.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,009
Reaction score
7,019
First Language
German
Primarily Uses
RMMV
The problem is that you can't play on truly random maps.

Because a truly random map would include an iceberg floating on lava and a tree growing out of the ocean and so on.

What people call "good" random maps are in reality the result of extremely complex formulae for generating them.
And while it is possible to create a "good" formula for creating them, that is usually too much work for even big developer studios. And that means a lot of games that use random maps work with lesser quality formulae...
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
193
Reaction score
71
Primarily Uses
Random maps tend to feel same-y after a while when you see most of the permutations, since it's not truely random. Also, they won't have the same amount of details as a handmade map, unless it's as impossibly complex as Dwarf Fortress.
 

lianderson

Veteran
Veteran
Joined
Dec 27, 2012
Messages
361
Reaction score
249
First Language
English
Primarily Uses
N/A
I'm in that rare phase of game development where you're almost finished with a game, but instead of doing that very last thing left to do, you're mostly just sitting around daydreaming of what to do next. I've ran through multiple ideas, but none have really stood out as an interesting enough challenge or concept.

But a randomly generated world, one that is both made in rpg maker AND is actually good... that... that would be interesting.

I got some ideas, but honestly, they're just too complicated to justify the calories in explaining on a public forum. All I can say is, it is doable. Extremely difficult, but doable.

Good luck and I hope you give your idea a try. Even if it fails, you'll learn a lot from it.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,081
Reaction score
1,038
First Language
Spanish
Primarily Uses
RMVXA
one word: Rogue.

there's a reason why random-dungeon games are called Rogue-like.
and yes, NMS could be considered a Rogue on steroids.

there was a mod for Minecraft called "Rogue-like Dungeons". You can imagine what it was about.
you know Minecraft.... you probably know the amount of different biomes it has.
this mod had an architecture style for each biome.

take the most basic dungeon: an entrance and an exit, where both are a single room with one door, each leading to a different part of the overworld.
that's at least 2 individual sections for even the lamest of dungeons.

now, add one small hallway in the middle.
that's 3 sections.

if you start adding corners, you need at least 4 corners... that's 7 individual sections.

add T junctions, crosses, dead ends, larger rooms for boss fights or loot drops, larger rooms in each T, cross, and dead end variation.....
before you know it, you're working with 20 individual entities that need to be processed to create a functional dungeon.

on top of that, the combination of loot spots along the way: does the dungeon have loot right at the beginning? how many spots? in which distribution? how many different distributions? what about the exit, any loot there? hallways? corners? all-of-the-above?
that's now closing on 100 unique structures.

if you don't want to make those structures, you'll have to write that as a function within the code, which is another order of magnitude of complexity.

it's not impossible, it just takes a ton of work, which you must envision first so you know what you're up against.
 

Ragen

Veteran
Veteran
Joined
May 20, 2020
Messages
32
Reaction score
27
First Language
Portuguese
Primarily Uses
Other
The problem is that you can't play on truly random maps.

Because a truly random map would include an iceberg floating on lava and a tree growing out of the ocean and so on.

What people call "good" random maps are in reality the result of extremely complex formulae for generating them.
And while it is possible to create a "good" formula for creating them, that is usually too much work for even big developer studios. And that means a lot of games that use random maps work with lesser quality formulae...
I agree with you... developers do not wish to go along the high complexity random map generators.

I studied for a while a bunch of them (simple generators) and thought about mashing them all together into a big complex generator once...
However, I lost interest due to the work (time spent) would not be proportional to how much "would be saved" if they were not built one at the time handly.
 

Ragen

Veteran
Veteran
Joined
May 20, 2020
Messages
32
Reaction score
27
First Language
Portuguese
Primarily Uses
Other
add T junctions, crosses, dead ends, larger rooms for boss fights or loot drops, larger rooms in each T, cross, and dead end variation.....
before you know it, you're working with 20 individual entities that need to be processed to create a functional dungeon.

on top of that, the combination of loot spots along the way: does the dungeon have loot right at the beginning? how many spots? in which distribution? how many different distributions? what about the exit, any loot there? hallways? corners? all-of-the-above?
that's now closing on 100 unique structures.

if you don't want to make those structures, you'll have to write that as a function within the code, which is another order of magnitude of complexity.

it's not impossible, it just takes a ton of work, which you must envision first so you know what you're up against.
I disagree with you... actually it's quite feasible... Data structures can be handled easily using NoSQL databases, and they do not require to be all loaded nor processed at once.

I would recommend to build the maps/dungeons one layer of complexity at time:
- first generate grounds percentages distribution (you could apply filters depending on the world distribution)
- then generate terrain with this proportions (a minimal size per chunck would be advised)
- then set wall where feasible to be built (cave walls, dungeon walls, etc)
- then randomize the number of prizes and main prizes
- then draw paths to the goals from the entrance (if dungeon) (remember to add a minimal difficulty so it won't be such easy path to goal dungeon)
- Lastly, challenges - traps, objects and monsters disposal.

I just cannot think of any solution, so far, for puzzles. I mean, keys and locks can be fairly generatable (which can be applied to levers), however complex traps and puzzles are not as simple to build handly already... doing them by hand would require a lot of creativity for a generator-database.
 

Ragen

Veteran
Veteran
Joined
May 20, 2020
Messages
32
Reaction score
27
First Language
Portuguese
Primarily Uses
Other
@gstv87, I do actually agree with the part of "effort would be evolved", I can see one easily giving up after some time...

But again, with a large set of options database and good generators algorithms would be feasible.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,081
Reaction score
1,038
First Language
Spanish
Primarily Uses
RMVXA
then draw paths to the goals from the entrance
and how complex are those paths?

because a straight line is the most direct path..... but a straight dungeon is boring.
and, an overly complex labyrinth would be too hard to navigate, and also boring.
where's the middle ground?

that's where you need pre-made sections that are easier to handle.
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
188
Reaction score
139
First Language
german
Primarily Uses
RMMV
and how complex are those paths?

because a straight line is the most direct path..... but a straight dungeon is boring.
and, an overly complex labyrinth would be too hard to navigate, and also boring.
where's the middle ground?

that's where you need pre-made sections that are easier to handle.
My room mate recently showed me a concept called Noise Maps to generate Maps, even with paths. I will need some time to fully understand it, but I'm confident this problem is solvable :)
 

Cormorant42

Veteran
Veteran
Joined
Sep 17, 2019
Messages
33
Reaction score
15
First Language
English
Primarily Uses
RMMV
I'm actually in the process of developing my own procedural generation plugin (also a fan of No Man's Sky, but that's not why I'm making it, it's mostly to save file space) as well as a procedural character and quest generator, but they aren't gonna be done for a while.

Mine is going to use Shaz's Tilechanger plugin to swap out tiles when the player hits a certain trigger, so on a looping map it will give the impression that it's an "infinite" world.

I do think that with the right algorithm/tileset you can get some really interesting and beautiful results, it's just a matter of fine-tuning it until it fits the vision of your game.
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
188
Reaction score
139
First Language
german
Primarily Uses
RMMV
@Cormorant42 Wow please tell me more! What algorithms do you use to generate the layout? Will you publish your Plugin?
 

Cormorant42

Veteran
Veteran
Joined
Sep 17, 2019
Messages
33
Reaction score
15
First Language
English
Primarily Uses
RMMV
@V_Aero Easy answer first- of course I'll publish it! (Can't say for certain when, but it's my next project after I complete my current one, so hopefully less than two months from now)

The plugin itself is almost entirely separate from RMMV's core processes (it doesn't interfere or alias any engine functions), and basically creates a .JSON matrix of regions, biomes, chunks, and cells which is then saved for later reference by Shaz's Tilechanger.

I'm writing the algorithm myself since I want it to be optimized for RMMV, based around the idea of "descending tiers of weighted random decisions," basically, starting from large-scale decisions (region sizes, types, etc) and going down to small-scale decisions (specific cell type/layout, etc).

The basic organization is this: world > regions > biomes > chunks > cells. Cells are 4x4 pieces that sit in a "tilemap" map and which will be copied and mixed around to create 16x16 "chunks," which will make up biomes of variable size within regions of variable size. Regional and biomic size is determined through an initially randomly-decided "shape" (circle, diamond, square, rectangle, octagon, etc) which determines the weight (chances of it to spawn) of that region/biome in the random generator. That way, the terrain of the world should never "repeat," even though the same base parts are being used.

They're structured as a series of nested JS classes, where the constructor for the top class (the entire world) creates the next classes (regions) and their constructors create the next classes (biomes) and so on and so on.

Plugin parameters will let the player decide the size of the world and various other things (like cell size...you can increase cell size and make them more detailed if you want) to make your world more custom and less repetitive. The default world size is going to be 16x16 regions, each made up of 16x16 biomes, etc, though the biome and region size is going to vary based on the weighted random generation and all that so I can't really say how big they will be for certain.

I don't know if I'm explaining this correctly, lmk if you need me to clarify on anything.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,081
Reaction score
1,038
First Language
Spanish
Primarily Uses
RMVXA
My room mate recently showed me a concept called Noise Maps to generate Maps, even with paths
if you generate the noise through painting it with something else, such as circles, then yes, each circle can be translated to a mathematical formula, and from that you can calculate pathways.

as long as you have a simpler system to get rid of most of the bejillion calculations you'd need when working with an empty canvas, it's possible.
with a system like pre-designed hallways, for example, you know that for each entry way on each piece, there's always a fixed number of exits.
and a set of fixed numbers will always be finite, even if it is astronomically large, it's *finite*.
 

Anthony Xue

Ancient Architect
Veteran
Joined
May 9, 2016
Messages
93
Reaction score
94
First Language
German
Primarily Uses
Understand that any "exploration" cycle actually consists of two phases: Exploration and Discovery.

The Exploration part can easily be randomly generated. I don't think it's all that much of a problem that the maps won't look as cool as handmade maps. They need to be sufficiently nice and interesting that the player won't be scared away by their look, but that bar is significantly lower.

The Discovery part... now that's where it becomes interesting. Because this is not really random generation of maps, but of events. It is completely irrelevant that your map is the most beautiful of all time if no interesting events are taking place on it. And vice versa, does it really matter that the five castles look mostly similar if each of them features a different challenge or even just a different part of the backstory? (Can randomly generated lore be even remotely as interesting as something crafted by a talented writer?)

I'm not certain what your ultimate goal is. If the foremost characteristic of your randomly generated RPG is "infinity" like in No Man's Sky, I foretell doom, because this would also mean generating an infinity of interesting events *or* the design of numerous complex gameplay mechanisms which interact with each other and with the map in such a way that they can generate stories themselves (e.g. Dwarf Fortress). That is why roguelikes usually have such an insane amount of ways to interact with the environment and the inventory.

I think the more appropriate role model would be Darklands. This was a CRPG with a partially randomly generated map (the general layout and the positions of cities were the same, but the countryside and especially location details changed between games), completely randomized quests and a "main quest" also with a huge random component. The concept is still pretty much unique AFAIK, probably because procedural generation of stories, quests and events is a little harder than generation of maps. (Darklands' approach, btw, was to have a huge amount of predefined partial areas, and have the generation process not necessarily "generate" something but rather take X of the Y available predefined sections and mash them together in a fitting way. Probably the only working way to randomize events, but this topic demands more time and investigation.)
 

Ragen

Veteran
Veteran
Joined
May 20, 2020
Messages
32
Reaction score
27
First Language
Portuguese
Primarily Uses
Other
and how complex are those paths?
Actually they don't need to be a straight line to be fairly simple.

You just need to set your reference points.
I would prefer to use minimal size chambers as paths. Connecting chambers in a ordened way.

Some other algorithms may involve: number spreading through tiles, and walls or dor placements.

I preffer (which is ok if you disagree) the "terrain first" approach (building walls and doors as would make sence giving the terrain), once I have followed some random terrain genarators projects, and build a couple myself (for fun) using Matlab (around 2012), and they are fairly reliable.
My math algorithms started with all water tiles and then increased or decreased the land level.
The trickiest part was to set some boundaries of what I would not want (like: maximum and minumum high)
which obviously were arbitrary on my concept of "real "

Once you have the physical structure... placing things inside it is less complex.

Take the generator of this link for example, it's a good start line:
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Stream will be live shortly with some pixel art! Feel free to drop by!

Can't believe I forgot to put an image of my drawing pad! It looks kinda like this, maybe I'll get a better pic tomorrow...
Backup tip: If you don't want to back up your whole project every day, at least back up everything *except* your Image and Audio folders, which you can do weekly/as needed/etc.
The final version of our game is already available both in English and Spanish! ^___^
Can't believe this day has finally come... T_T
Im so happy that Dead By Daylight is getting a Silent Hill chapter! Cant wait to play as pyramid head

Forum statistics

Threads
97,814
Messages
947,149
Members
129,035
Latest member
Tauron7
Top