About Random Level Generation

Hi ! I am trying to create game like “Binding Of Isaac”. So i can’t really know how to create random levels. So today i find a way about it but i don’t know can we count it as a Procedural Content Generation. Let me explain my way.

1 - Creating the lobby (spawn) room. ( With door in it.)
2 - Creating the first room that have monsters. (Creating with cubes and adding it to prefabs.)
3 - Creating the second room that have monsters. (Creating with cubes and adding it to prefabs.)
4 - When player collides with the door i am generating random number.
5 - If this number smaller than 50 i am generating the first room with monsters.
6 - If this number bigger than 50 i am generating the second room with monsters.

I added my script named as “lwlGen”.
I do not have any IDE right now so i simply wrote it with .txt editor.
Simply i am just creating rooms and adding them to prefabs.When player collides with door i am creating random number and creating random room.
So can i use this method for Procedural content generation if yes i am going to use it for my project.
Thanks for help. ( Sorry for bad english…)

2749611–198302–lwlGen.txt (850 Bytes)

I’m pretty sure you can do it this way, you should look up all the different types of level generation, This is something I am planning to do for my final year uni project but I have found these resources so far;

There’s loads more if you google! :stuck_out_tongue:

A common way to do it so you have less haphazard-looking maps is to build it in modules, with slots for different things to spawn. Dungeon of the Endless does this, for instance.

Make modules of rooms or sections (multiple rooms + corridors) which can fit together, allow for tile variation and make spawn points in logical places. These points would have checkboxes for the things you can put there - doorways, monsters, loot, decorations and traps. The levels could create a quota of each spawn type based on difficulty too.

Wherever there’s a doorway spawned, add another module. Each module would have to come with an entry corridor/room with a part to attach to the previous room’s doorway, and enough information to orient them properly. The hard(ish) part is avoiding overlapping, but if you design a lot of stock sections which fit on a grid, with random 90-degree rotation, it can still look good. The appearance of each doesn’t have to be indoor either - walls could be rows of trees for a forest scenery.

Don’t fully randomise - cheat a little and design some interesting rooms :slight_smile:

Thanks for replies. So i am going to use this method for my project. Thanks again for your interest.