Vibe Coding is a cool way to write programs with the help of AI (artificial intelligence). Imagine having a super-smart assistant by your side while coding! The AI can help you in different ways -- it might create an entire program for you, or just give you ideas and help with specific parts, depending on what you need.
To get started, you simply talk to the AI and explain what you want your program to do. The AI will then create a rough version of the program for you. After that, you can ask the AI questions, make suggestions, or request changes to add new features or fix things until the program is just the way you want it.
For this project, I will begin the AI chat with simple request about drawing a single triangle. As the conversation progresses, the requests will get more complex.
In this project, we will create a circular maze by drawing a complete circle and then selecting a small part of that circle to then draw a white disk (thereby erasing part of the circles edge). This erasure will form a doorway (or path) to enter or exit the circle. Subsequent layers of circles will be drawn with openings at various places to create a circular maze.
We will create a rough draft of the maze and then ask the computer to create a program that would replicate it.
To begin, create a single circle.
Roblox Graphics API
Now change its appearance.
We're going to build a maze using elevated platforms.
I would like you to create an array of coordinates (x,z) that will be used to build a 3-dimensional maze in Roblox. The coordinates will represent the nodes where different platforms (segments of the maze) will connect. Start at the origin (x=0, z=0) then navigate a single winding maze-'like' path. The range of coordinates should be from x>= -200 to x<= +200 and z>=-200 to z<= +200. Try to build the path to contain 30 segments. So, 31 total coordinates will be needed. Build this array of coordinates and store it in a variable called: local path. Then write a "for" loop that will walk the list of coordinates and use the following function to create the path segment:
As you can see in this example, n will be the incrementing variable in the for loop. Be careful around the end of the array not to exceed the array bounds.
NOTE TO TEACHER: Demonstrate how to copy the code in each of the smaller AI output boxes into the starting script to show how multiple copy-and-paste actions may be needed.
Here's a clean, Roblox-ready solution: a 31-point winding path inside the +-200 bounds, stored in local path, followed by a safe loop that builds 30 platform segments without exceeding array limits.
I designed the path to feel "maze-like": no straight lines for too long, gentle turns, and no coordinate jumps that would look unnatural in 3D space.
Notes on the Path Design
31 total nodes -> exactly 30 segments, as requested
All coordinates stay within x,z = [-200, +200]
The path:
starts at the origin
winds outward in a long arc
loops back through the negative X region
ends at a clean, buildable location
This will produce a visually interesting, gently curving 3D maze spine. If you want, I can also generate:
a more chaotic maze-like path
a grid-aligned path
a spiral, figure-8, or branching path
a randomly generated path with seed control
Just tell me the style you want next.
That looks nice. Can you make more turns in the path? Make some of the segments longer or shorter than other segments.
Absolutely -- if you want more turns, more variation in segment length, and a path that feels more like a creature wandering through space, I can push the design much further. Below is a new 31-point path with:
frequent direction changes
short, medium, and long segments
no sharp teleport-like jumps
all coordinates still within +-200
This one will feel noticeably more "maze-like" and organic.
New 31-Point Path With More Turns + Variable Segment Lengths
Segment Builder Loop (Safe for Array Bounds)
What's Different About This Path
More frequent turns -- almost every point changes direction
Mixed segment lengths -- some 8-12 studs, some 20-30 studs
Smooth, believable wandering -- no sudden jumps
Stays within +=200 bounds -- max extents are around x = -150 and z = -140
This will produce a much more interesting 3D maze spine. If you want, I can also generate:
a tighter, more chaotic maze
a long sweeping spiral
a branching path with forks
a seed-based random generator so you can reproduce paths deterministically
Just tell me the vibe you want next.
Make a tighter, more chaotic maze with branching paths with forks. Increase the number of segments to 200.
You got it -- but before I generate anything, I want to check one thing with you, because your request now changes the structure of the maze in a big way.
You asked for:
A tighter, more chaotic maze
Branching paths with forks
200 total segments
Here's the key design question:
!! Do you want:
Option A -- A single array (local path) that contains all nodes, including branches? This means the array will look like:
But then your loop:
will incorrectly connect unrelated branches, because the loop always connects path[n] -> path[n+1].
This produces a broken maze with accidental cross-connections.
will incorrectly connect unrelated branches, because the loop always connects path[n] -> path[n+1].
This produces a broken maze with accidental cross-connections.
Option B -- Multiple arrays: one for the main path, plus arrays for each branch? Example:
Then you run the segment-builder loop on each path separately.
This is the correct way to build a branching maze. Option C -- A graph structure instead of arrays Example:
Then you iterate edges instead of array order.
This is the most accurate representation of a branching maze. Before I generate 200 segments, I need your choice: Which structure do you want?
A -- One big array (not recommended for branching)
B -- Multiple arrays (main path + branches)
C -- Graph structure (true maze representation)
Tell me A, B, or C -- and I'll generate a 200-segment chaotic maze in that format.
Let's go with option C
Perfect -- going with Option C means we're building a true maze graph:
Nodes with positions
Edges (connections) that define the maze structure
Branches and forks represented naturally
No accidental cross-connections from array ordering
Below is a clean, Roblox-ready graph structure with ~200 segments (actually ~205 edges), built from about 120 nodes. The structure includes:
A main spine
Side branches
Forks that split into two or three paths
Chaotic, tight turns
All coordinates within ±200
I'll also include a segment-builder that walks the graph and builds platforms for every edge. Roblox Maze Graph (Nodes + Edges)
Just tell me what direction you want to expand this maze.
What is the one line of code that will destroy the baseplate?
How do you change the time of day to 2am?
What are the main characteristics of the 4 maze generators you listed: (DFS, Prim, Wilson, Aldous-Broder)?
Here's a clear, structured breakdown of the four classic maze-generation algorithms I mentioned -- each one produces a very different style of maze. Since you're building 3D Roblox mazes, understanding their personalities helps you choose the right generator for the feel you want.
1. Depth-First Search (DFS / Recursive Backtracker) Core personality: long corridors, dramatic dead-ends, very "hand-drawn" feel.
Main characteristics
Carves one long path at a time, diving deep before backtracking.
Produces long, winding corridors with many dead-ends.
Very fast and easy to implement.
Mazes feel organic, like a person exploring a cave.
Tends to create few loops unless you add them manually.
Visual style "Snakey," dramatic, lots of cul-de-sacs. Great for exploration-heavy mazes. 2. Prim's Algorithm (Randomized Prim) Core personality: dense, bushy, lots of short turns, evenly distributed complexity.
Main characteristics
Grows the maze like expanding mold from a starting point.
Creates many short segments and frequent turns.
Dead-ends are more evenly distributed than DFS.
Maze feels dense, with fewer long straightaways.
Slightly slower than DFS but still efficient.
Visual style Tight, chaotic, "hedge-maze" energy. Great when you want uniform complexity. 3. Wilson's Algorithm Core personality: perfectly uniform randomness; no bias; mathematically beautiful.
Main characteristics
Uses loop-erased random walks.
Produces unbiased mazes -- every possible maze is equally likely.
Very uniform: no region is more twisty or straight than another.
Slower than DFS/Prim, but still fine for Roblox-scale mazes.
Few long corridors, few clusters -- everything is balanced.
Visual style Looks "statistically fair."
Great for puzzle-solving or algorithmic purity. 4. Aldous-Broder Algorithm Core personality: pure randomness, but extremely slow; produces uniform mazes like Wilson.
Main characteristics
Performs a pure random walk until every cell has been visited.
Produces perfectly uniform mazes (like Wilson).
Very slow for large grids -- can wander for a long time before finishing.
No structural bias at all.
Rarely used in games because of inefficiency.
Visual style Similar to Wilson: evenly distributed complexity. Good for small mazes or academic demonstrations. Which one is best for your 3D Roblox maze? Given your goals so far -- chaotic, tight, branching, lots of forks -- the best fits are: Prim's Algorithm
If you want, I can generate:
A full 3D DFS maze generator
A Prim-based generator
A hybrid (DFS spine + Prim branches)
A graph-based generator that outputs Roblox-ready nodes and edges
Just tell me which direction you want to explore next.