Procedural Random Dungeon Generator (April Update)

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
Hi. Very cool. Loved KaiMonkey's script and am glad to see someone bring his concept into MV. What are your terms of use?
Free to use for anything, free to edit. Just credit V Aero. It uses Shaz Tilechanger, so its T&C should be considered as well, but this one is free-to-use aswell :)

@Khulse by the way the Problem with the waterfalls is fixed on my machine, I hope I can release a new version soon. At the moment I'm refactoring my code to make it easier and more flexible to use.
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
September Update

Hey all, I'm happy to announce a large update! :) Well, I spent a lot of time to think about how the api should look like and what Features would be cool to have. There were some major adjustment, so everyone who already played with my plugin will need some minutes to read about what's new.

I also updated the instructions page on my blog :)

Features:
- the js script command to generate the dungeon now allows more parameters and many more methods to define your dungeon. It now should be much more efficient to get a higher diversity between various dungeons in your game. This is what a command could possibly look like:
$dungeonGenerator.
run_prims().
mergeDeadEnds(0.3).
cutOffDeadEnds(2).
generate().
placeEntranceOn("bottom").
placeExitOn("top").
drawDecorations().
finalize()
- cut off dead ends-function to lower the number of dead ends and create some extra empty space.
- Region id to set entrance and exit are now configurable in the Plugin Manager.

Fixes / Adjustments:
- The rule to define the last object in a decoration map has been changed. Now the Region 1 tile must be set RIGHT to the object. This way, you can place other Region tiles on your models eg. for Khas Lightning System (while I haven't tried that one yet ^^ ).
- Autotiles is no longer an extra plugin, but integrated in MK_Core. Please delete ancient Autotiles plugin file.
- Clipping error on waterfalls is fixed ;)
 

Khulse

Villager
Member
Joined
Jan 2, 2019
Messages
16
Reaction score
5
First Language
English
Primarily Uses
RMMV
Great!

I'll get things set up and give it a try. Thanks for all your hard work!

Edit: All right, I've tested it out now-

The waterfalls are indeed fixed, and work perfectly. That will make map creation easier.

I'm running into a problem with the maps I've made for this now. For some reason, my snippets seem to be shifted one tile down when the map generates, with the bottom of the snippet generating on the top of the map. It's harder to tell, but I think there may be a similar shift on the x axis.
Edit: I think I found the problem. It's a little complicated, so I'll pm you.

Also, is there a way to tell it NOT to put blank spaces in the map? It's a great option and I'll certainly use it, but for some maps I'd rather not have the blank spaces. I tried setting cut off dead ends to 0, but I'm still getting blank spots.
Edit: Figured it out. Just leave that line out of the common event script. Simple enough.
 
Last edited:

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
TODO list added to Front Page

Great!

I'll get things set up and give it a try. Thanks for all your hard work!

Edit: All right, I've tested it out now-

The waterfalls are indeed fixed, and work perfectly. That will make map creation easier.

I'm running into a problem with the maps I've made for this now. For some reason, my snippets seem to be shifted one tile down when the map generates, with the bottom of the snippet generating on the top of the map. It's harder to tell, but I think there may be a similar shift on the x axis.
Edit: I think I found the problem. It's a little complicated, so I'll pm you.

Also, is there a way to tell it NOT to put blank spaces in the map? It's a great option and I'll certainly use it, but for some maps I'd rather not have the blank spaces. I tried setting cut off dead ends to 0, but I'm still getting blank spots.
Edit: Figured it out. Just leave that line out of the common event script. Simple enough.
Ah you edited your post, this is why I haven't received a notification. Thanks for your PM :)

What I can say for now, is that the shift is intended to get a border around the whole map.

Nice that you figured out to disable some functions for the map generation. CutOffDeadEnds and MergeDeadEnds each can be removed if you wish.
 
Last edited:

Khulse

Villager
Member
Joined
Jan 2, 2019
Messages
16
Reaction score
5
First Language
English
Primarily Uses
RMMV
Ah you edited your post, this is why I haven't received a notification. Thanks for your PM :)
I'm under the impression we're not supposed to double post, so I edited instead.

What I can say for now, is that the shift is intended to get a border around the whole map.
Ah, a border! That makes a lot of sense.

Thank you for the reply. I'm really enjoying this plugin.
 
Last edited:

monumental

Warper
Member
Joined
Dec 1, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
This is great! I am trying to follow your directions and I think I have most of it right. When I try to Playtest I get a black screen with a weird error when I enter the dungeon. If I export the game it plays and I can enter the dungeon but I don't get any exits/entrances and I was stuck in a wall. The dungeon didn't look quiet right so I am sure something is off.

Here is my script

<load:[
{"name":"snippets", "map":19},
{"name":"Entrance_Exit", "map":23},
{"name":"decoration", "map":24}
]>

<regions:{
"entrance_exit":{"w":1, "h":3},
"2":{"name":"decoration", "w":1, "h":1},
}>

I copied the plugins from your Project and believe everything is in order. So what I am asking is 1. Should I be able to playtest the dungeon? 2. is there a code update I didn't get from your website?

Thanks for your help and for creating this fun dungeon maker!
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
This is great! I am trying to follow your directions and I think I have most of it right. When I try to Playtest I get a black screen with a weird error when I enter the dungeon. If I export the game it plays and I can enter the dungeon but I don't get any exits/entrances and I was stuck in a wall. The dungeon didn't look quiet right so I am sure something is off.

Here is my script

<load:[
{"name":"snippets", "map":19},
{"name":"Entrance_Exit", "map":23},
{"name":"decoration", "map":24}
]>

<regions:{
"entrance_exit":{"w":1, "h":3},
"2":{"name":"decoration", "w":1, "h":1},
}>

I copied the plugins from your Project and believe everything is in order. So what I am asking is 1. Should I be able to playtest the dungeon? 2. is there a code update I didn't get from your website?

Thanks for your help and for creating this fun dungeon maker!
Hey, many thanks for testing my plugin :)

Well debugging remote is a bit difficult, but I try my best. The snippet for the map's setting looks correct, but could it be that the map ids are not correct? It sounds that the plugin had problems placing the entrance and exit. A fallback then lets the player spawn at position (1,1), unfortunatly there was no error thrown. Can you also paste the event command to generate the dungeon? Another reason could be an issue with the region id settings to define locations for entrance / exit.

Hope this helps

Edit: yes you should be able to play it in test mode.

Edit: another Problem could be that "entrance_exit" probably is case-sensitive, and in your code snippet it was written with capital letters. I really must add some more error messages...
 

monumental

Warper
Member
Joined
Dec 1, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
It looks like something fundamental broke in the last update of plugins. I am recreating much of the information from scratch. It doesn't appear to be your script or plugins. Your demo works just fine which means I am going to go back to basics and try again. Thanks for the offer though!
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
Happy Halloween,

I'm really happy to see that so many people are interested in my work and giving me feedback and pointing out issues they had. Especially cloning events was an issue some people had. I improved these methods and now it should work much better :)

I uploaded a new version on my site! http://v-aero.me/procedural-random-dungeon-generator-demo

October Update
This Update extends the plugin to create large areas besides the tunnels.


I put in some work for my tutorials and I really hope everyone can follow my instructions. However, if things are unclear, not precise enough, or just written poorly, please tell me so I can improve my plugin.

Bugfixes
  • Events on the Space Map will no longer be erased by the plugin, so you make some events for parallel processes
  • Fixed issues when spawning, deleting, self-switching, resetting events (please let me know if there are still errors - I hope not)
 
Last edited:

Kibbelz

Warper
Member
Joined
Oct 28, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi, I've been playing around with this plugin for fun. One massive bug I've noticed is if i enter a dungeon. Restart my game and reenter the same dungeon. The dungeon is identical to the dungeon of the last game instance. It appears to not be truly random.
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
Hi, I've been playing around with this plugin for fun. One massive bug I've noticed is if i enter a dungeon. Restart my game and reenter the same dungeon. The dungeon is identical to the dungeon of the last game instance. It appears to not be truly random.
Hi Kibbelz,
This is no bug, it's a feature ;) I wrote a new article on my site so you can change it to true random for your project. http://v-aero.me/using-seed-variables
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
Merry Christmas,

I uploaded a new Update on my site!

new Features
  • More Settings for RandomWalk algorithm. Just try out by activating the switches on the Intro Map.
  • You can spawn objects for a specific number of times, eg. you can control how often loot chests should spawn or you can spawn keys that the Player must find to escape from the Dungeon. Check this out: http://v-aero.me/create-specific-item-x-times
  • You can define how big the border around the map should be
  • Here's a Command List to have an overview of all the Commands http://v-aero.me/commands

Tell me if you encounter issues or have feedback :)

EDIT:
JS files now can be downloaded on the first page of this thread. Then I will look for a bypass for this restriction that denies them to be uploaded on my WordPress...
 
Last edited:

Mojo907

Veteran
Veteran
Joined
May 21, 2013
Messages
143
Reaction score
34
First Language
English
Primarily Uses
RMMV
This still kicks butt, and gets better!
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
863
Reaction score
1,127
First Language
Swedish
Primarily Uses
RMMV
This seems really promising. If it doesn’t have any huge bugs I can see it being a very useful plugin! And I’m going to give it a spin as soon as I have some time over... although it seems a bit complex to operate.

One question though...

Since I’m not at my computer I can’t download and check the plugin parameters right now (the answer might be in there), but just looking at the tutorials makes me wonder about the snippet maps.

Do they all need to have that size and be arranged in a 4x4 grid of snippets? And do you need to set them up with connecting pathways EXACTLY the same way as shown in your example? Like for example, the upper left snippet needs to be entirely black (100% wall)?

It would be nice to know.
 

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
This seems really promising. If it doesn’t have any huge bugs I can see it being a very useful plugin! And I’m going to give it a spin as soon as I have some time over... although it seems a bit complex to operate.

One question though...

Since I’m not at my computer I can’t download and check the plugin parameters right now (the answer might be in there), but just looking at the tutorials makes me wonder about the snippet maps.

Do they all need to have that size and be arranged in a 4x4 grid of snippets? And do you need to set them up with connecting pathways EXACTLY the same way as shown in your example? Like for example, the upper left snippet needs to be entirely black (100% wall)?

It would be nice to know.
Thanks :)

I think you should just try it yourself or play my demo and then things will be more clear for you. Snippet's size can be variable and it's not required to be squared, eg for my forest I used larger snippets.
In a nutshell, what my plugin does; it takes the defined snippets and randomly moves/arranges them, while it also will use some snippets multiple times or just doesn't them. So yes, each tile represents either
- deadend
- straights
- forks
- crossing
- and last but not least, one empty block
You can draw them any way you wish, eg for my forest the empty block contains grass, flowers and trees. It's not even blocked for the player ^^

I attached another example for the snippets ;)
 

Attachments

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
863
Reaction score
1,127
First Language
Swedish
Primarily Uses
RMMV
@V_Aero
Thank you for the fast reply.

I understand that I can draw whatever I want on the tiles. That part makes sense. But I'm wondering about the connection points. The plugin is not smart enough to know what is a "T-crossing" and what is a dead end unless I put it in the correct spot in the grid - right? Which, if I ignored that rule, would make my randomized dungeons not connect properly?

I just wanted to confirm this but does that mean I have to draw my snippet maps to follow this pattern (as for what type of snippet I place where on this grid):


---------------------------------------------
[ EDIT; Also, as for crediting. I understand you're fine with whatever people use this plugin for but you also link to a bunch of other people that you say have inspired you. And I found these terms in @Kai Monkey 's thread:

Terms of Use:
Free to use for non-commercial projects, however you should PM about licensing for commercial projects.

This begs the question, how inspired is the plugin? Is it enough so that his/hers Terms of Use would supersede your own? Do I need Kai Monkey's permission to use your plugin in a commercial project? This comes across as a bit of a tricky situation, the way you've written it, and I'd like to know.

It does come across as a bit weird to have to contact and seek permission from someone who didn't make the plugin you want to use, but then again, I guess it depends on if you've lent a lot of code from him/her? Or if it's just loosely "inspired".

If @Kai Monkey would be so kind to show up and give their blanket statement as well, that might be neat. But otherwise I'll have to go with whatever you say @V_Aero since you probably knows best how you made the plugin.]

---------------------------------------------
[Edit 2; I didn't have a lot of time today but I rushed through the basic tutorial (skipping the steps that handled the decorations) and tried to generate a dungeon but ended up with this error? ]

 
Last edited:

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
@Parallax Panda
Yes, this is exactly the way it works. Thanks for your image, maybe I should add such one into my tutorial.

Edit: This is a tough question. Kai Monkey presented his idea to define snippets which were connected. He also added funtions to draw decorations using Events as marker, while I replaced this function using Region Tiles. I would say I added enough features on top to call my plugin independent from Kai Monkeys, but nethertheless Im going to look further into this. I will also try to PM him as I did with the other creators.

Edit2: This error probably is thrown by Shaz Tilechanger, so I think the SpaceMaps Note Tags is invalid. I really need to find ways to make this plugin easier to use ><
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
863
Reaction score
1,127
First Language
Swedish
Primarily Uses
RMMV
Thank you again for the fast reply. And you're quite welcome regarding the picture. I do think it would be beneficial to add something like that to the tutorial since right now it's hinted at but not really explained. It's almost always better to over-explain something compared to saying too little.

Oh, and while we're on the topic of the snippet map. This is a real nitpick and not a huge deal at all. But I think the layout you've chosen is a bit chaotic? There seems to be no sense to where each piece is placed on the grid and I assume you didn't care too much about it?

It's not really something you'd need to fix since even if it caused me to have to tab out of RPG maker 2-3 times and look at the reference picture in your tutorial, once it's all set up you can just copy paste that template and think nothing of it in the future.

But, if you do want to improve it how about a layout like this:

First row is for "odd" tiles, second row is for "T crossings", third row is for "corners" and last row is for "dead ends". It's not jumbled together and follows a logical pattern. Again, really no big deal but I'm (slightly) OCD (just a wee bit) so it stood out to me.

The above picture isn't perfect either though. I'm sure the order of each snippet on the individual rows could be made even more easier to remember at a glance.

[EDIT: Here's another layout which does not follow the row logic but might be easier to remember for the brain (I can only speak for myself since I'm not a scientist):

Anyway, I'm sure you understand what I'm going for.]

-----------------------------
As for the terms of use. Thank you. I'd really want to use this plugin in a game (and I like to have the option to sell any game I make, obviously). While I guess I could've PM:ed Kai Monkey myself I think you talking directly to him/her to see if he could give a blanket statement, that would make it easier for anyone in the future as well. So thank you again.

As for my error. I've still not solved it so I'll come back and ask more about that at a later. Unfrotuanlly I have to go to work for now. :kaocry:

But I'm really liking the possibilities that this plugin brings to the table. Keep up the good work!
 
Last edited:

V_Aero

Veteran
Veteran
Joined
Apr 23, 2019
Messages
120
Reaction score
82
First Language
german
Primarily Uses
RMMV
Thanks for your suggestions :)
The arrangement of the tiles arised from the technical implementation. Let's say you have a 3-way corner into south, west and east, but not north, this is represented as 1110 in binary and 14 as natural number. So the 14th tile is this crossing. For the features introduced in Tutorial 2 I added a remapping for this issue. I agree with you, I will add here a remapping, too :)
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
863
Reaction score
1,127
First Language
Swedish
Primarily Uses
RMMV
@V_Aero
I see, well like I said, it’s not a super important feature. Just something I noticed so don’t worry too much about it.

As for making the plugin easier to use, expanding and improving the tutorials might be the easiest way of doing it. If you have any bright ideas for how to make the note tags and commands more simple and easier to understand that would also help a lot of course (since I apparently screwed something up), but I think proper documentation is key. And like I said in my previous post, better to risk over-explain rather than not provide enough information.

Although I have to give you kudos for what you've done so far. I think you’re on the right track with all those tutorials you’ve already put out there. Just keep at it and improve and expand and this will be a great resource I’m sure.

As for some more concrete advice, maybe consider adding a step by step tutorial on how to achieve a handful of different example dungeons to cement the knowledge of how the note tags should be modified for different results? Or maybe some tips and tricks?
I for one really liked the sewer dungeon in your demo. And the fact that the volcano, sewer and woods are so different wise is very cool.

(Edit; also the fact that there’s not a TON of plugin parameters you’re forced to set is actually a good thing. Not that you couldn’t add a few more if needed but sometimes, less is more.]

------------------------------
[EDIT2; I tested this plugin together with THIS 3D rendering plugin for MV, hoping that I'd be able to randomly generate 1st person dungeons, but alas, it didn't work well.

I'm not a programmer so I can't say why. I'm guessing however that it has something to do with map creation. Since I still appear on the maps and sometimes, a chunk of the map is generated but then the visual information for the rest of the map isn't there? It's like I'm stuck in a void, kinda.

I understand that making these plugins compatible might be a nightmare (and I'm sure @Dread_Nyanak is also very busy on her end) so I'm not expecting it. Just posting to let others know.
Randomly generated 3d dungeons would'e been SUPER cool, but I knew it was a long shot.
]
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

So... I work for 8 hours a day, but apparently I'm "too noisy" for people staying home all day and I need to be quiet or they will escalate things. o_O People be dumb.
Had no time to work more on my Redwood tiles yesterday and no time yet still today--But! Somehow found time to make sit health potion props.
Today I learned that George Washington was not the first president of my country, and that there were technically over a dozen presidents before him. My own ignorance astounds me, I mean it always does but the sheer scope of this revelation astounds me. I guess George Santayana really was quite astute when he said:
Currently enjoying FF7 Remake :biggrin:
Day 753: I think im just about ready to finish the planning stage of my game creation and actually start to make it :0

Forum statistics

Threads
95,776
Messages
931,828
Members
126,186
Latest member
KyuKino
Top