Vibe Coding: Build Your First Game Using AI
In this vibe coding activity, students use natural-language prompts and an AI tool (Lovable, inside imagi Edu) to build and customize their own games. They learn what prompts are, practice iterating them, then publish and share their work.
- Grades 6-12
- 1 hour
- Beginner
- Teacher-led
Sign up for imagi Edu with your school email and the credits are added to your account. Already have an account? Complete your imagi Edu profile and claim them with the button in the app.
- Your bonus credits work for you and every student in your classroom, so your whole class can build with AI at no cost.
- Bonus credits are used before any other credits you have and expire on December 31, 2026. Published student projects stay viewable after that.
- One claim per teacher.
Three steps and you are ready to teach.
Sign up for imagi Edu
A creative CS and AI literacy platform combining standards-aligned lessons with interactive projects. Your bonus credits are added when you sign up during Hour of AI.
Sign up freeCreate your classroom and turn on Lovable
Create a classroom, add your students, turn on Lovable for the class and allocate credits. Students join with the classroom access code and password you share, so no personal information is needed.
View setup guideGuide the activity
Use the ready-made teacher slides to guide the activity. Beginner-friendly for both teachers and students.
Open slidesStudents need two things.
Log in with your classroom code
Log in with the classroom access code and password your teacher shares.
Log inStart building
Your imagination is your limit. Describe your game, build it, then make it your own.
Start buildingEverything you need is already made.
Lesson plan
Step-by-step guide outlining objectives, activities and discussion prompts.
View lesson planTeaching slides
Ready-to-present slides introducing vibe coding and AI-powered game development.
Open slidesSetup guide
How to set up a classroom ready to build with AI: turn on Lovable, allocate credits and share student access.
View guideTroubleshooting guide
Detailed guide for solving any issues you may encounter as you get started.
View guideBefore you start
Setup needed
- Devices with internet and a modern browser
- Access to imagi Edu for teacher and students
- Lovable turned on for your classroom, with credits allocated
- For IT: allow *.imagilabs.com, *.lovable.dev and *.lovable.app
What is Lovable?
Lovable is an AI platform for building websites, apps and games through natural-language prompts. Inside imagi Edu it runs in a school-safe mode built for classrooms: teachers control access, students never create their own Lovable accounts, and no student personal data is shared with Lovable.
What happens when you turn on Lovable in imagi Edu
- Your classroom gets access to Lovable and you choose how many credits each student can use.
- Students log in with the classroom code and start building right away.
- Student prompts go through a safety filter before they reach the AI, and you can review flagged activity in the Safety Monitor.
- Student and teacher data is not used to train AI models.
- You can turn Lovable on or off for your classroom at any time.
- Only a few credits (around 4 to 5 per student) are needed for this lesson. Encourage students to plan each prompt. The rest of the bonus credits are there for building beyond the first lesson, through December 31.
Standards alignment
AI Literacy competencies (AILit Framework)
Engage 3: Evaluate whether AI outputs should be accepted, revised or rejected.
Create 3: Direct generative AI systems to elicit feedback, refine results and support reflection.
Shape 4: Improve AI systems to address and promote human well-being and societal benefit.
Examples of student games
Game title
One line on the game. Remixed from a project by a student in Singapore.
Play itGame title
One line on the game. Remixed from a project by a student in Singapore.
Play itGame title
One line on the game. Remixed from a project by a student in Singapore.
Play itFrequently asked questions
What is the Hour of AI?
The Hour of AI is an evolution of the Hour of Code, created in response to the growing call to expand foundational AI literacy alongside computer science. It consists of one-hour activities that are accessible to beginners and show that anyone can learn to code and create with AI. Learn more at hourofai.org.
Do I need prior coding or AI experience?
No. This activity is designed to be beginner-friendly for both teachers and students.
What devices do I need?
Each student needs a desktop, laptop, Chromebook or tablet with an internet connection and an up-to-date browser. No downloads are required. Students can work in pairs on the same device if there aren’t enough devices.
How do students get access to Lovable?
Teachers create a classroom in imagi Edu, add students, and turn on Lovable for the class. Students join with the classroom access code and password their teacher shares. No signup or email is needed from students.
Can students use Lovable safely under COPPA?
imagi Edu is built for COPPA, FERPA and GDPR alignment. Students join through a teacher-created classroom, no student email, date of birth or contact information is collected, prompts are filtered before they reach the AI, and student data is not used to train AI models. Students should not use the regular Lovable login page; access is only through imagi Edu.
How many credits do students get?
Teachers get 2,500 bonus credits to share across their classroom. This lesson takes around 4 to 5 credits per student, so there is plenty left for continued building. Teachers set each student’s limit.
What happens after December 31?
Bonus credits expire on December 31, 2026. Published projects stay viewable, and teachers keep their imagi Edu account.
What if my school blocks Lovable?
Ask your IT team to allow *.imagilabs.com, *.lovable.dev and *.lovable.app, and test access ahead of time. If that isn’t possible before your session, reach out to support@imagilabs.com.
Can I use this year-round?
Yes. The activity stays available all year. After December 31, teachers can keep using it with the free tier of imagi Edu or upgrade for full access.
Is this available for non-traditional educators?
After-school programs, clubs, tutors, substitute teachers, community organizations and homeschooling parents can all use the Hour of AI activities through imagi Edu.
More Hour of AI activities
Vibe Coding: Build Your Dream School
The next step after this lesson. Students imagine their dream school, then build an app with AI to pitch to their school leader.
Learn moreCreative Coding with Python and AI
Students learn the code behind apps with an AI Debugging Buddy.
Learn moreYour students’ first game, built in one period.
Sign up, claim your bonus credits, turn on Lovable for your class, open the slides.