Jump to content

Photo

Working on a random dungeon generator.


  • Please log in to reply
8 replies to this topic

#1 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 03 February 2014 - 12:36 PM

Alright, so thanks to the issues I've had with this, I guess secrecy is no longer a viable option :P

Saffith helped me for a while, but I didn't feel like bugging him with ALL of my questions. So, as an introductory, here's my current progress with the script. I'm planning on making a DungeonGenerator.zh file for use, so if anyone has any suggestions on how to make this a bit more user-friendly, I'm open to it.

 

Also, so far I've only got the generator itself made. Movement between screens, and certain other features like warp rooms haven't been handled yet. I also haven't handled how the edges of the map will generate, in reference to the side that opens toward the edge. My plan is to replace anything that has an alternate screen set with that side closed. But it's still WIP.

 

http://www.2shared.c...RDG_Header.html

 

Now, if anyone can think of any other roomtypes or anything like that, please let me know. I'm going to work on other generator modes like paths, which will only generate rooms with two sides with one entrance and one exit. I'm trying to think of other modes, but right now dungeon generation and path (probably for cave passages and stuff) generation are the only useful ones that come to mind.

 

Also, the forums told me that my post was too long with this script embedded. So I zipped the script and the FAQ and uploaded them.



#2 Haylee

Haylee

    ~ Hope of Energy Nede ~

  • Members
  • Real Name:Haylee
  • Pronouns:She / Her
  • Location:Italian Restaurant in Koorong

Posted 03 February 2014 - 12:43 PM

I like this idea, it'll certainly give dungeons a whole new cup of tea to them.



#3 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 03 February 2014 - 12:57 PM

Well, like any bit of code, it's certainly going to need a bit of testing before its ready. And in this particular case, it will likely need a LOT of testing. Simply to make sure that it doesn't generate terribly bland dungeons.

 

Also, I plan on making a standalone enemy randomizer to work alongside this, just to make things easier on everyone.

 

EDIT: And I may be able to make it work with ghosted enemies as well. But that will come in time. I may have to get with Saffith on that one to make sure everything is compatible.


Edited by Master Maniac, 03 February 2014 - 12:58 PM.


#4 KingPridenia

KingPridenia

    King of Pridenia, Safehaven of the LGBTQ

  • Members
  • Real Name:Adam
  • Location:Pennsylvania

Posted 03 February 2014 - 05:37 PM

A few questions:

 

1. Will the random dungeon generator make a dungeon completely on its on, or will it require a skeleton of sorts?

2. What will be done to safeguard against an unwinnable dungeon? Example being you can only go up at the entrance and you're immediately blocked off by water, meaning you can't progress.

3. Is this generator meant to put in roguelike aspects to a quest, similar to how Dark Cloud's floors are randomly generated?

4. Would the user need to put in various enemy and/or room templates?

 

This sounds like a really neat idea on paper. However, I'm willing to bet getting it to work would take a lot of effort and probably require extensive bug/beta testing to perfect. Regardless, I think this is awesome.



#5 anikom15

anikom15

    Dictator

  • Banned
  • Real Name:Westley
  • Location:California, United States

Posted 03 February 2014 - 06:23 PM

There are algorithms for creating dungeons (or generally any kind of network) without the chance of generating an impossible one. I suggest you do some research into them. Have the generator create simple data types first (like a two-dimensional array), and then add in the complexities of making it work with the ZC screens later. That is probably the best approach to take.



#6 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 03 February 2014 - 07:18 PM

A few questions:

 

1. Will the random dungeon generator make a dungeon completely on its on, or will it require a skeleton of sorts?

2. What will be done to safeguard against an unwinnable dungeon? Example being you can only go up at the entrance and you're immediately blocked off by water, meaning you can't progress.

3. Is this generator meant to put in roguelike aspects to a quest, similar to how Dark Cloud's floors are randomly generated?

4. Would the user need to put in various enemy and/or room templates?

 

This sounds like a really neat idea on paper. However, I'm willing to bet getting it to work would take a lot of effort and probably require extensive bug/beta testing to perfect. Regardless, I think this is awesome.

 

1- It will require a map set up as a template to read screens from. This is for the questmaker's design choices. I don't want the generator to create dungeons that horribly mismatch the rest of their quest.

2- Well, long story short, if there's an item room with the dungeon item (for example the bow), the script is made to ignore the call for a room with a puzzle involving that item. Once the boss room generates, the rest of the edges get smoothed out (so they don't warp onto a blank screen, or worse, the wrong screen).

3- I'm not entirely sure I understand this question.

4- I'm planning on adding an enemy generator after I get generation and movement handling worked out. However, as I said, there will have to be a DMap as a template for the generator to work from.

 

And yes. It also sounded really good in my head until the allegro log started giving me UNNECESSARY AMOUNTS OF ERRORS. D:

 

There are algorithms for creating dungeons (or generally any kind of network) without the chance of generating an impossible one. I suggest you do some research into them. Have the generator create simple data types first (like a two-dimensional array), and then add in the complexities of making it work with the ZC screens later. That is probably the best approach to take.

 

 

This would have been useful if I didn't already have that part written up :P

Actually, I've got it set up for people to come in and alter it if for example they want to add new roomtypes or create their own generation algorithm for a specific task. I'm probably going to release it as a header file with a full FAQ on all of the functions and variables.

 

And as soon as I'm done debugging it, I'll post up a demo of the generator at work. For testing first and foremost. I can't play through random dungeons as many times as I need to all by my lonesome to find the common issue.

 

If anyone has any more questions, feel free to ask.

 

EDIT: And now I'm stumped. From what the allegro.log says, my generation algorithm is trying to index my arrays with negative numbers. This are a no-no. So I'm going to try and figure out why this is happening.

 

Alright. Now I'm reaching for outside help. I'm attaching a zip file that contains my allegro.log, and my script. If any of you has a kind enough heart to have a look at them and help me figure out what's going wrong, I'd greatly appreciate it.

http://www.2shared.c...Yk/allegro.html


Edited by Master Maniac, 03 February 2014 - 08:23 PM.


#7 Three Pendants

Three Pendants

    Recipient of Ways

  • Members

Posted 10 June 2014 - 10:42 PM

Did this ever have any more progress made on it? This sounded like a fantastic idea!



#8 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 11 June 2014 - 12:10 AM

It's been set off to the side for now. There's lots of problems with it in its current state, but I do hope to complete it at some point.

 

I know where a lot of my errors came from, so that helps. I've just been working on other ideas.



#9 Three Pendants

Three Pendants

    Recipient of Ways

  • Members

Posted 12 June 2014 - 02:04 AM

Yes, and your other ideas are also quite an impressive array! (The random gear idea in particular seems like it will add an entirely new layer to Zelda Classic's core gameplay!)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users