Procedural Content Generation. Please Help

Started by
3 comments, last by LorenzoGatti 10 years, 10 months ago

Hey guys,

Im in the middle of making a dungeon crawler for IOS using cocos2D. Its pretty simple at the moment. There is a town hub where you can level up, repair gear and get consumables. Then theres the dungeons under the town. This is where you kill monsters, get experience and loot. I want the Dungeons to be randomly generated. This will be determined by the players level.

This is my first attempt at implementing Procedural Content Generation and i'm not sure where to start. I went to the wiki page and did some research. This is what I have so far. Im gonna have a set of about 200 pre made rooms and then some staple rooms like boss room, secret room, loot room etc. Each room will correspond to the players level so as he gets stronger the dungeons get tougher. Im going to make code that says when the player enters the dungeon it will pick a hand full of the rooms at random and slot them together, then spawn random loot and enemies inside them.

Thats the basic idea and I think it will work but I wont know for sure until I start coding.

My question is this. Is there an more optimised way to do this? I know that this has been around since the 80's and theres probably 100's of ways to go about doing it but what i'm looking for is the most simple and efficient way to do this.

Any help would be appreciated and please, only constructive criticism smile.png

Thanks a lot,

R

Advertisement

That's a pretty good way of doing it. I would recommend also implementing scaling on some of your cookie cutter rooms, that way you can randomly change their sizes. This will make it less obvious that each floor of your dungeon is just a puzzle of the same rooms.

Also I would avoid the "rooms connected by very long hallways" type of random generated content that you see in roguelikes like angband, rogue or nethack, unless it's intentional for a specific section, like a cave or somesuch. No one would ever build a structure this way, so it makes no sense to do it in your game. But that's just a pet peeve of mine.


No one would ever build a structure this way, so it makes no sense to do it in your game. But that's just a pet peeve of mine.

Well, someone would.


Well, someone would.

That is so badass. New roguelike/RTS: Colony Invasion!

 

Also I would avoid the "rooms connected by very long hallways" type of random generated content that you see in roguelikes like angband, rogue or nethack, unless it's intentional for a specific section, like a cave or somesuch. No one would ever build a structure this way, so it makes no sense to do it in your game. But that's just a pet peeve of mine.

 

Typical roguelike games take advantage of long and winding minimum width tunnels in a number of fun ways:

- trapping the player without escape between serious monsters (if not prudent and fast enough)

- demanding nontrivial pathfinding when the tunnels form a labyrinth

- allowing the player to channel and delay monsters that would gang up on him in a wider room

- trying to overrun the player with a long line of cannon fodder: can they be slaughtered faster than they come in?

- constraining and interrupting line of sight, missile paths, areas of effects, and similar features

- implying the possibility of secret passages and secret rooms in the "wasted" areas

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement