CodeQuest ๐ฎ
Learn Python Through Adventure - A Platformer Game That Teaches Real Coding
๐ฏ Inspiration
Learning to code can feel intimidating and abstract, especially for beginners who struggle to connect theory with practice. We asked ourselves: What if learning Python felt like playing a video game?
CodeQuest was born from the idea that education doesn't have to be boring. Instead of staring at documentation or watching tutorials, what if students could literally collect code snippets, configure them through interactive dialogues, and watch their programs come to lifeโall while jumping through a beautiful winter wonderland?
We wanted to bridge the gap between "Hello World" and real applications by making the learning journey visual, interactive, and genuinely fun.
๐ก What It Does
CodeQuest is an educational platformer game where players learn Python by building in complete applications:
๐จ Key Features
๐ Progressive Learning System
- 4 Phases guiding students from basics to advanced concepts
- Phase-locked progression ensures foundational understanding
- Visual feedback shows code building in real-time
๐ฎ Full Controller Support
- PS5/PlayStation controller integration for accessible gameplay
- On-screen keyboard for text input with controller
- Seamless fallback to keyboard controls
- Toggle controller support from main menu
๐ค AI-Powered Code Mentoring
- Google Gemini AI integration for intelligent code review
- Automatically fixes bugs in student-generated code
- Provides personalized improvement suggestions
- Exports both original and AI-optimized versions
๐ Live Code Visualization
- Real-time code panel showing program construction
- Two view modes: Diagram View (visual flowchart) and Code View (Python syntax)
- Syntax highlighting and proper indentation
- One-click export to runnable
.pyfiles
โจ Beautiful Game Design
- Hand-crafted winter-themed platformer levels
- Smooth sprite animations and particle effects
- Dynamic weather system (snow, rain, clouds)
- Pastel UI inspired by "Dumb Ways to Die"
- Professional sound design with 5 custom sound effects
๐ ๏ธ How We Built It
Tech Stack
Game Engine & Core
- Python 3.10 - Primary language for educational value
- Pygame 2.6.1 - Game framework for rendering, physics, and input
- PlayStation Controller API - Hardware input integration
AI & Intelligence
- Google Gemini 2.5 Flash - Code analysis and refactoring
- Custom prompt engineering for educational feedback
Frontend (Landing Page)
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Shadcn/UI - Accessible component library
Architecture Highlights
1. Modular Game Engine
game/
โโโ main.py # Main menu & calculator game
โโโ weather.py # Weather app game
โโโ player.py # Shared player physics & sprites
โโโ code_panel.py # Live code visualization panel
โโโ calculator_game.py # Calculator game logic
2. Phase-Based Learning System
PhaseTrackerclass monitors student progressCodeItemobjects represent collectible code conceptsConfigPanelprovides context-sensitive configuration dialogues- Items unlock progressively based on completion
3. Controller Input System
ControllerManagerabstracts input from controllers and keyboardsOnScreenKeyboardenables text input via controller navigation- Edge detection prevents input double-firing
- Analog stick and D-pad support with dead zones
4. AI Integration Pipeline
# Two-stage Gemini AI processing:
1. Code Fixing: Analyzes student code, fixes bugs, adds error handling
2. Recommendations: Generates educational improvement suggestions
3. Dual Export: Saves both original and AI-fixed versions
5. Real-Time Code Generation
CodePanelclass manages live code display- Diagram view generates visual flowcharts
- Code view maintains proper Python syntax and indentation
- Supports syntax highlighting and scrolling
๐ Accomplishments We're Proud Of
โ Created a genuinely fun learning experience - Students learn by playing, not studying
โ Full PlayStation controller support - Accessible gaming with professional-grade input handling
โ AI mentorship integration - First educational game to use Gemini AI for personalized code feedback
โ Real code generation - Students create actual runnable Python programs, not pseudocode
โ Beautiful UX/UI - Pastel aesthetic inspired by award-winning casual games
โ Two complete curricula - Calculator and Weather App teach complementary Python concepts
โ Open source and extensible - Modular architecture allows adding new game levels easily
๐ What's Next for CodeQuest
Near-Term Roadmap (Next 3 Months)
More Games ๐ฎ
- Todo List App - Teaches lists, loops, file I/O
- Password Generator - Teaches randomization, string manipulation
- Freestyle mode - Allows you to AI prompt any project and create it along with real-time visualization
Multiplayer Mode ๐ค
- Collaborative code building with friends
- Race mode: Who can build their app faster?
- Code review challenges
Achievement System ๐
- Badges for completing challenges
- Leaderboards for speedruns
- Unlock cosmetic character skins
Long-Term Vision (6-12 Months)
Level Editor ๐ ๏ธ
- Teachers create custom learning paths
- Community-shared level marketplace
- Import custom code challenges
Mobile Version ๐ฑ
- iOS/Android ports using Kivy
- Touch-optimized controls
- Cloud save progress
Classroom Integration ๐ซ
- Teacher dashboard for monitoring progress
- Standards-aligned curriculum mapping
- Auto-grading for assignments
"The best way to learn is to play."
Built With
- next.js
- pygame
- python
- shadcn/ui
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.