This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I use Godot 3.4.4
How can I go about learning to create 2D top-down mazes that will be auto-generated from tilemaps and that have a starting position going into the maze and having an ending position that leaves the maze, and be connected to each other without any blockage or breakage, and have it save the auto-generated maze as a scene to be loaded at anytime that a player can run and/or walk through, please give me some guidance on this? Oh just to let you know, when it comes to maths, Homer Simpson is a freaking genius compared to me lol.

Godot version 3.4.4
in Engine by (47 points)

There are 4 maze-generation tools in the Godot Asset Library. Have you looked at those?

2 Answers

+1 vote

Before you write a single block of code plan out exactly what you want to do because appending features later on usually breaks working functionality and creates bugs.

When you can't find your way look at aStar like the 3 wise men by using other's work as a reference or template for research into how things are done.

The general way to get a program like this done, would be to break up each operation into smaller bite sized tasks.

  • Randomly set start and end at the edge of a rect
  • Partially fill the rect with randomly placed obstacles
  • Use A* to navigate a path from start to end
  • Create rules for how the maze is to be built
  • Fill the rect with obstacles using the rules and avoiding the path returned by A*

There will not be a tutorial on how to do everything and so you need to adopt a workflow to save on time for every project you start.

by (6,942 points)
+1 vote

I found this guide easy to follow, and it gave me great results for auto-generating mazes:

by (172 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.