Generating dungeons....

Posted by death on Aug. 2, 2012, 9:30 p.m.

is killing me. I can't seem to do it. I've looked up so much info on this, played with examples and it seems my low math skills and lack of programming experience cause me to fail every time. The only thing i need to do to finish my rpg is finish the dungeon generating code. I've tried different methods multiple times and i can't get the results i need. i can hardly understand most examples i found on the GMC. The BSP method made the most sense to me but i suck at using data structures such as grids which are needed. i can only write the most basic of code with them.

I don't think i can even ask for help at this point… again another project of mine comes crashing down completely due to my lack of skill… i really don't know what to do. i REALLY wanna finish this game but i just don't know what i can do. it's one of the most frustrating experiences i've forced myself into.

Everything else is done for the game too. Town generating, all the graphics, items, weapons, classes, etc. All i need is to generate dungeons, it can't be a full game without it and at this point, i can't hand make the dungeons - that would contradict every thing else in the game.

Does anyone have any good advice for randomly generating dungeons, or no of tutorials or examples for idiots like me?

Comments

death 12 years, 4 months ago

Quote:
But I think you could even do it without a grid in GM, if you make walls objects and use their (non)presence to determine if there's a room in a particular spot. Of course, that would be really basic.
well my dungeons don't use objects, only tiles, but checking for wall tiles would be the same process anyway. I might try this method out. might give some messy results but who knows, could work out.

Quote:
The dungeon is simple and fairly easy but it works. I can give you the code of a generator if you want.
seems to be the same method i tried when using a grid. i wanted to have all of the dungeon's tiles stored in the grid (which would be simple for drawing the tiles) but i couldn't figure out a way to actually do it. If you have the example, i would take a look at it. (also i would probably need 4 values: 0 empty, 1 floor, 2 wall, 3 upper wall - but i could probably generate the other wall values after the main process anyway)

Taizen Chisou 12 years, 4 months ago

I prototyped a system once that went something like this:

1) Randomize the size of the room, anywhere between 50 to 127 * 32.

2) Based on the area of the room, come up with between 6 to 18 sub-rooms.

For each sub-room, come up with a random size for both length and width, between 3 to 10 and adjust for overall room size.

3) Position them randomly.

4) Have an object check to make sure that every room is accessible to every other room by some means. If this ever fails, then generate a pathway between two random rooms and try again.

5) Pick two of the farther-away rooms and place a start and endpoint there.

6) Decide whether or not to incorporate a locked door. If so, place a key in a random room that IS accessible to the player.

7) If the locked door is not required to reach the exit, spawn a rare treasure or powerful enemies in the room on the other side, and delete pathways that might lead around the door.

I only got to like step 5 before everything began to break :<

Rob 12 years, 4 months ago

Quote:
Yeah which is why i can't wait to get into the REAL courses. Though i'm afraid of not doing well or even worse, not improving/learning enough.

This is exactly why I don't understand why you didn't start your CS courses in the first semester…

sirxemic 12 years, 4 months ago

Quote:
Trying to derail the topic for the purpose of picking yet another fight, Rob? If you really care about his college life, maybe you ought to talk to him in private about it. I'd advise you to tread very carefully. You're edging closer and closer to being permanently banned from the site. We've all had quite enough of your bullshit.
Someone's having a period here. Derailing the topic? Inter-comment conversations happen all the time. I also don't see how he is "picking yet another fight". His comments are easily ignorable and have barely any fight-inducing flavor to them.

in my opinion, that is.

Sorry for derailing the topic.

But that aside, dungeon generation can be really easy depending the way you look at it. Usually it just takes some logical thinking. Logic happens to be a subset of mathematics, though, but you get my point, I think.

Kunedon 12 years, 4 months ago

You could say that Rob's account is close to getting…

…a death sentence.

Castypher 12 years, 4 months ago

Never speak again.

Iasper 12 years, 4 months ago

Actually death is just asking the best and easiest way to generate dungeons, why create a problem like this? If Rob wants to troll then just let him troll, ignore him and go on.

Castypher 12 years, 4 months ago

In all honesty, I've been watching this blog with growing anticipation. I'd love to learn the art of procedural generation, but the only thing I've pulled out of GM methods is using a Perlin noise DLL. Even with that, I have little idea of how to actually go about it.

Kunedon 12 years, 4 months ago

Same here. Procedural generation seems interesting to me, but given my very, very simple way of coding things I've never been able to accomplish this.

Rob 12 years, 4 months ago

Quote:
If Rob wants to troll then just let him troll, ignore him and go on.

I'm not even trolling right now.