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 maze using stairs.
We will teach the AI how to create a set of steps and how to utilize a platform to connect to the steps.
Roblox Graphics API
I would like to explore the creation of multi-layer mazes. This would be a maze in 3D with just 3 or 4 vertical layers. I have a function that draws a set of stairs from point A to point B.
This function takes two coordinates (like the nodes in the previous maze) and creates a set of stairs from one node to the next. It helps if the y-coordinates are different for the two nodes.
A platform can be created between two points on the same layer using:
s.platform({ x1=0, y1=2, z1=0, x2=0, y2=2.1, z2=10, width=4 }):setMaterial(Enum.Material.Plastic):setColor(Color3.new(0, 0.333333, 1))
Create a small maze-"like" path that includes both steps and platforms in a somewhat confined space of, say, x>=-16 and x<=16 and the same range for the z coordinates.
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 compact, readable 3-layer mini-maze that fits inside your +-16 by +-16 XZ bounds and includes both horizontal platforms and vertical stair connections. I'm giving you:
A small graph of nodes with X, Y, Z coordinates
A maze-like path that winds horizontally and vertically
A build function that uses your s.platform and s.steps calls exactly as you described
This gives you a working, visible 3D micro-maze you can expand later. Node Layout (3 layers: Y = 0, 6, 12) All coordinates stay within your requested range.
Edges:
Builder: Platforms on same layer, Steps on different layers This matches your existing logic but simplified for clarity.
What This Gives You A compact 3D maze with:
Horizontal corridors
Two vertical transitions
A winding, non-linear feel
All coordinates stay inside ±16
Fully compatible with your s.platform and s.steps APIs
Easy to expand into a full multi-layer maze generator
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.