2d rougelike dungeon generator
Asked Answered
F

2

0

hello, ive been trying to make a rougelike game for a while but one main obstacle has been stopping me and its the dungeon generation so i wonder there is some code online for dungeon generation (btw im using gdscript)

Fusillade answered 21/6, 2023 at 13:9 Comment(0)
O
0

Overstuff answered 21/6, 2023 at 13:30 Comment(0)
C
0

This is how I did it. The algorithm is very simple. You divide the map into two random rectangles, then divide each of them, and repeat several times, saving each level of rectangles. The final set becomes each room. Then you connect each split rectangle to its twin with a corridor. That way you're guaranteed they'll all connect.

Consubstantial answered 21/6, 2023 at 22:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.