0 votes

So I'm very new to game making in general but I looked up a bit of tutorials and stuff and for the world gen i found a tutorial that showed how to make it using prim's algorithm but the way he showed it it made squares which i don't know to replace with room templates and tilemaps and stuff I'll put a link to the 1st part (out of 3) here and i want to know if i need to use a different method or do this one very differently. Also i forgot to say but I'm trying to make a rougelike.

Godot version 3.1
in Engine by (15 points)

1 Answer

+1 vote

The easiest way, code wise, would be to just draw the rooms yourself, and use a TileMap to put them in a grind following your algorithm. However, this means a lot of art work for each room.

What many games prefer to do instead, is to split the rooms into many little pieces. You could have a chest square, a spike square, etc, that are placed in a grid creating the room.
You would use your algorithm to determine big rectangles where to place rooms, pick randomly which one to place, and then fill the big room squares with the small visual squares.

The documentation on TileMap can be found here.

by (2,688 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.