Who would be interested in a better dungeon generator for RPG-Maker? (third-party)

Discussion in 'Useful Development Tools' started by Venima, Apr 20, 2019.

?

Would you like to see this turned into a configurable dungeon generator?

  1. No. Don't waste your time on this.

    1 vote(s)
    3.4%
  2. Yeah, that would be cool.

    16 vote(s)
    55.2%
  3. Yes! So much yes! I need this!

    12 vote(s)
    41.4%
  1. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Note this post is not limited to MV users, it includes VX Ace, VX and possibly XP too.

    So I'm a programmer not a map editor. My skills are in building systems and scripts, but without a rich map to fill with events my work goes to waste. Unfortunately the existing dungeon generator leaves a lot to be desired... I mean what happens when you don't want rectangular rooms or mazes?

    So I hatched a crazy idea and decided to start building my own dungeon generator! Now this tool is still just a proof of concept at the moment, but here's what I've managed so far:

    generatedSquares.png

    Ok so all you can see are a mess of squares, that's not very interesting... But that's because I've only written the painting side of the program (I just told it to paint random squares with walls). The generator part of the program hasn't even been written yet. Now a dungeon generator is useless if you can't configure how it generates rooms, paths, scenery etc. so this is what I have in mind: For most users, a config panel with lots of options; for someone with scripting skills, the ability to tinker with the generation code itself (in JavaScript).

    I hear you ask, "so how does this generator work?". Well... using mouse hooks. What it does is the same thing you do, clicks the mouse to paint tiles on the map, only super fast! Admittedly the painting process is slower than the in-built dungeon generator, there's a limit to how fast you can paint across the screen before rpg maker stops registering clicks, but that's pretty much how it works.

    So here's the bottom line... This is likely to become a big project for me, and I'm really not sure if there's anyone besides myself who'd be interested in this. So that's what this post is about, I want to see if there's actually demand for this tool. So far this has only taken me a few hours so I haven't wasted my time if not. But I'd like to know if you guys think it's interesting or would like to see a proper dungeon generator out of it. Finally some points worth mentioning:
    • This will work with any version of RPG Maker and any tool with a similar map editor; anything as long as the painting tool works more or less the same.
    • Unlimited potential. Since it paints maps the same way you do, it can in theory achieve anything you can. That includes using more than just the first tileset.
    • Painting is kinda slow, but I can at least improve productivity by providing a graphical example of the map that'll be painted before it actually paints it to RPG Maker.
    • Requires Java to run. Java is great for quickly building tools, I'm sorry if you don't like Java, but it should also be cross-platform.
    P.S. If I knew how to modify rpg maker maps directly, that would bypass the need for hooks and speed up the painting process. If anyone knows how to do this, send me a message.
     
    #1
    gambitben, jonthefox, Zeriab and 6 others like this.
  2. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,376
    Likes Received:
    4,948
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Like you said, if you could make it draw on the fly during the game like this

    I'm definitely interested, and it will really cut my time to actually try to implement this.
    It's one of my plan on my next project if I really have a chance to work on.

    Edit: as how to modify the tileset itself. I wrote the tutorial about it (in Ace at least).
    https://forums.rpgmakerweb.com/index.php?threads/ace-change-map-data-without-transfer-player.106143/
    https://forums.rpgmakerweb.com/inde...to-modify-map-tiles-using-script-call.104491/

    If that is what you're looking for.
     
    #2
    Marquise* and Venima like this.
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,421
    Likes Received:
    6,485
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    The answer I would give is not included in your poll, so I'll give it here:

    Everyone would like a good dungeon generator, with double plus if it works ingame instead of in the editor only - but that is not something easy to create for a lot of reasons. And I highly doubt that your approach to this can fix the problems in that method.

    The problem is that any dungeon created in that way needs the developer to really finish it and fill it up with reasonable content.
    That is why almost no experienced mapper uses the build-in dungeon generator - it doesn't help much with creating a decent map, you'll get better maps if you plan them and make them from scratch.

    There are ways to make reasonable random dungeons, but they require the use of room-templates and are much more complex to setup, and so far no one succeeded in making one for MV.

    As for the map creation - I suggest you check the script for Ace included in the MV package. that is a ruby-script to be run in Ace to convert an Ace-Project to MV, and as such it contains both the code to read the Ace-Maps and the code to store that data into MV-format files. That should give you a starting point to understand the mapfiles for MV.
     
    #3
    Canini, Marquise* and Venima like this.
  4. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    382
    Likes Received:
    138
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    This would be really cool to see! After some polishing, I could see this being a great way to generate a starting point for dungeon maps, if you didn't have a concrete plan set out.

    And as someone who primarily uses vxace, the multi-engine comparability is great to hear.
     
    #4
    Venima likes this.
  5. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Ok so there's 2 separate design branches that this could take.
    A) The generator edits maps while in-game. This will be harder to achieve for 2 reasons. Firstly because generation frequently produces artifacts, and if this is in-game they can't be edited out after the fact. Secondly, events would have to be generated as well, and that adds another level of complication.

    B ) The generator edits maps while in the editor, and those maps are static (i.e. won't change while in-game).

    Neither of these methods impact the generation code much, mostly just the painting method, so it's possible both can be achieved, but I will probably attempt B first. The other point Andar mentioned is that one of the problems is that it's hard to actually generate a decent map. I have a few points to mention about this:
    • Taking map-creation outside of rpg-maker, I can create my own visual tools for the program to make it more versatile if specific structures are wanted.
    • Generated maps offer a different experience to hand-crafted maps, less goal-driven, which has its own merits. For example, if someone wants small areas of directed content with large areas of optional content, the optional areas could be generated.
    • This will be my fourth project involving complete map generation, so I already have a decent amount of experience with the concept.
    • Sometimes a map generator is useful simply for inspiration, or to discover interesting map designs.
    Also thanks for pointing out the Ace > MV conversion script, I'll definitely check that out.
     
    #5
    LycanDiva likes this.
  6. LycanDiva

    LycanDiva Villager Member

    Messages:
    28
    Likes Received:
    28
    First Language:
    English
    Primarily Uses:
    RMMV
    I like this idea. Although I personally like designing my dungeons from scratch, there are lots of reasons why a better map generator would be useful.

    For people who would like to focus more on the story or mechanics than level design, having a decent map generator for dungeons would allow them to create interesting dungeon maps to explore without having to spend 5-10 hours or more hand-crafting every tile of it.

    For people who like to personally design maps, a good generator can help them out of a creative rut. For instance, when I play a Sims game, sometimes I fall into a trend of making the same guy/girl over and over. When that happens, I use the randomizer in the character creator to generate an interesting base to work off of and make my own tweaks to create a more interesting sim. So, if someone finds themself in a rut where they're making very samey dungeons and need to break out of it, a good map generator can be a really useful tool. You generate an interesting base to work from, then tweak what you got (move a wall here, add some obstacles there) until you've got something really fun.

    So, I say, go for it!
     
    #6
    Venima likes this.
  7. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Quick progress update:
    • Created 'room' structure with configurable rounded corners, and specified 20 rooms to be generated with padding between them.
    • Plugged my pathfinding library into the project and put in a web-path algorithm between all rooms.
    • Improved logic for generating dungeon walls.
    • Implemented visual component in-app which renders instantly after each generation, so that painting in rpg maker isn't required to see the result.
    generatorProgress.png
    I haven't bothered to build an interface into the app yet. I want to work out a decent checklist of requirements for it first, but you can see the visual component is already doing a good job of reflecting the end result.
     
    #7
    Canini and LycanDiva like this.
  8. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Ok so I've had a look at that code, and there's good news and bad news. Good news is MV just uses JSON files for its maps so that's easy to generate. Unfortunately Ace uses some kind of binaries, and that plugin offers no insight as to how they're generated since it uses the function load_data which is not present in the plugin itself. This means I could directly generate maps for MV but not for any other version. There's also the question of whether or not MV auto-reloads maps, or if it holds them all in memory when the project is loaded.

    Looks like for the time being I'll stick to the mouse-controlled painter. Although it's slower, it doesn't have any of these complications.
     
    #8
  9. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,790
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA

    I've moved this thread to Useful Development Tools. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #9
  10. Marquise*

    Marquise* Veteran Veteran

    Messages:
    4,650
    Likes Received:
    7,994
    First Language:
    French-Canadian
    Mmmm... Like @Andar made me realize, this is to be used in the editor just like the Ace version but when I looked the title and got over a few lines, I thought of something really to be used IN-Game. As when you played Diablo and the map were never the same from one run to another on the same map levels (Torchlight directly pulled it up from there).
     
    #10
  11. Canini

    Canini Veteran Veteran

    Messages:
    974
    Likes Received:
    647
    First Language:
    Swedish
    I really like this tool and would find it most useful. I am going to take a quote from Andar as a stepping stone to explain why.

    My problem is the exact opposite. I am an ideas guy, but do not have any artistic capabilities whatsoever. I cannot map to save my life to be honest, which is a bit of a detriment when making games. Using the existing map generator has saved me a lot because being an ideas guy I am pretty good at looking at a blank slate (still more well-designed than anything I could come up with myself, mind) and inputting puzzles and treasures that would be suitable for it. I can also redesign the dungeon well enough if needed, as long as there is something to start from. I am sure that there are a lot of of people like me that would benefit a lot for a more advanced dungeon generator.
     
    Last edited: Apr 23, 2019
    #11
    Corlagon, LycanDiva and Venima like this.
  12. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Another progress update: I've been struggling a lot with the tileset editor, trying to figure out a way for not only you guys to know how to enter tiles into the generator, but also for the generator to navigate the scrollbar. That scrollbar is turning into a massive hurdle, since the size and behaviour of it depends on screen resolution, operating system and RM version. I thought arrow keys were a universal solution, but there's a bug with MV that means arrow keys don't work. I sent them a bug report on the mv forum but I don't really expect that to be fixed. That's set me back a bit, so I decided to stick with just the 4 basic tile types for now, and instead focus on the generator and the UI.

    progress.png

    So far half of the room & path configurations that I have planned are in and working. I do plan on making room placement more configurable once I work out what to do with that. I have a better layout planned for brush selection and later on I'll look at implementing room templates. My next job is to start introducing scenery from tileset B to spice the maps up a bit. This is a bit more complicated since scenery like trees consist of multiple tiles in a set pattern, but I'll work something out for it.

    All of that said, I can only go so far without needing some inspiration from hand-crafted dungeon maps. Do you guys have any recommendations? Do you know of any really good dungeon maps out there?
     
    Last edited: Apr 23, 2019
    #12
    Marquise* and Canini like this.
  13. LycanDiva

    LycanDiva Villager Member

    Messages:
    28
    Likes Received:
    28
    First Language:
    English
    Primarily Uses:
    RMMV
    #13
    Venima likes this.
  14. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    I've been quiet for a couple weeks, and that's because LycanDiva has been helping me test (and work out the kinks in) the painting and generation of the tool. It turns out different systems treat mouse events a little differently, and we've been busy figuring all that out.

    I think it's almost ready to release (just an alpha of course), but I don't know if I should make a new post for it, since this one was mainly a poll to see if there was much of a demand for it. Anyway, here's a couple shots of interesting generations I've found:

    branches generation.png
    neighbours generation.png
     
    #14
  15. Animebryan

    Animebryan Feels like I'm slowly dying! Veteran

    Messages:
    337
    Likes Received:
    154
    Location:
    Marysville, CA
    First Language:
    English
    Primarily Uses:
    RMMV
    So will this be able to randomize a map each time you enter it?
     
    #15
  16. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    I presume you mean while you play the game the map changes each time you enter... Currently no. This is just a tool that can paint a map to RPG Maker's editor. I had a look at the possibility for directly manipulating maps while playing, but there are a lot of complications with that. It's something I'll consider again later on once the generator is much more advanced.

    That said, you can always generate a large number of maps using this tool and choose randomly between them in-game. Could also randomise events' locations to make it even more dynamic. The benefit of this method is after generating you can hand-craft them to add more detail / adjust them to fit better map design principles.
     
    #16
  17. Animebryan

    Animebryan Feels like I'm slowly dying! Veteran

    Messages:
    337
    Likes Received:
    154
    Location:
    Marysville, CA
    First Language:
    English
    Primarily Uses:
    RMMV
    That's true, but that large number of maps requires quite a few whole maps to increase the variety (50~100 variations to prevent repetitiveness). Then there's how to set all events into that particular area, usually done with Region IDs (which ruins any functionality certain plugins provide that rely on them).

    But I do look forward to an actual randomly generating dungeon for rogue-like games in the future.
     
    #17
  18. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    That is one of a number of complications. In order for your generated dungeon to feature the events you want, the only way I see that working is if I build a map loader into my tool that loads events from a template map that you provide, and then make a bunch of settings to configure where they go, how many spawn, etc.. for each of an arbitrary number of events. I could only hope to achieve this for RM MV, since that is the only one that doesn't compile its map data.

    Edit: Actually, for it to randomise in-game I'd have to do this all inside RPG Maker's scripting API, which I'm not especially familiar with...
     
    Last edited: May 21, 2019
    #18
  19. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Good news! The first alpha release is here! Obviously I'll be adding more to it over time, but for now, enjoy!

    rm generator.png

    I have attached a zip file containing the tool to this post (RM Dungeon Generator 0105.zip). Simply extract the zip and double click the jar to run it! While I have mostly tested in MV, it should work for previous versions of RPG Maker as well.

    Footnote: I hit a few roadblocks along the way which meant I didn't get as much into this version as I'd have liked. There's an issue with the tileset scrollbar, I can't figure out a way to detect / control it. Right now I'd advise not to scroll down when picking tiles. I'd have liked to implement multi-tile decorations like trees as well, but that will just have to wait until a future version.
     

    Attached Files:

    Last edited: May 26, 2019
    #19
  20. Venima

    Venima Treasure experiences and sensations, not progress. Veteran

    Messages:
    126
    Likes Received:
    45
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    N/A
    Since it's been over a month I figured I should post something here. This project has been put on hold for the time being since I've been kept busy with work, among other things. But I will return to it eventually.

    I'm curious what features you would like to see next, or if it's lacking something. I could start looking into having maps generate on the fly while the game's running, but that would only work for rpg maker mv, and I'd have to do a lot of work with generating events...
     
    #20
    Lonewulf123 likes this.

Share This Page