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, you will provide the AI with an existing Maze program and ask it to make improvements such as:
Adding small tokens at various places in the maze to be collected. Include scores shown on a leaderboard.
Adding spherical obstacles placed randomly in the maze to block certain paths.
Use platforms instead of tubes in random places.
Remove the baseplate.
Change the time of day.
I entered a simple prompt and then pasted the code from the example above.
I have a simple maze generating program in Roblox. I would like to add small tokens (cubes with size of 1 or 2) to be collected from random places in the maze (sort of like the game PacMan). I would like a score to be shown (i.e., Leaderboard) that will show the current score. All elements need to be added programatically through the starting script.
Here's the maze:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local s = require(ReplicatedStorage.genericShapes)
: : :
: : :
The AI generated a large number of small code fragments (individual functions or loops). I then asked AI to show me the entire code.
Can you show the entire program?
Notice in Section 5, the creation of a "Folder" named: "Tokens" and in the spawnToken() function the creation of parts named: "Token". Please note that these names were not protected from deletion by the plugin scanning script (which deletes unauthorized parts and models) from your world. I had to add these two names to the list of allowed names.
If your AI generates objects, it is possible that the names it gives them will be flagged by the plugin scanning script and automatically deleted. You can ask AI to simply rename those parts something more generic (i.e, Part, Token, Tokens, etc).
If you do not see the Leaderboard stats (i.e., your score), click on the Hamburger menu in the upper left corner of your screen and then select "Leaderboard" to toggle it on/off.