Stepcuta / roguelikescript

scripts
0 stars 1 forks source link

Level generation? #16

Open josefcohen opened 10 years ago

josefcohen commented 10 years ago

How did you go about creating the level generating function?

Stepcuta commented 10 years ago

Creating level generation is quite a tricky so I first researched about the subject and proceeded to make simple map generation: mapgeneration

as indicated above it has a set area to create rooms and corridors first it will create a room in the area and then see if it can attach a corridor to it from all sides. If it is able to do so AND connect to another room(if there is space to create it) it will generate the corridor. This process keeps going until there is no more space left to generate anything else.