ALGOLINGO is a Gamified Programming Learning Platform that transforms programming education into an engaging RPG adventure. Instead of solving traditional multiple-choice questions on a plain website, learners battle monsters, earn XP, collect gold, level up, and unlock new programming concepts through interactive gameplay.
The project combines the learning experience of Duolingo, the interactivity of CodeCombat, and the progression mechanics of classic RPG games.
- Overview
- Features
- Tech Stack
- Project Architecture
- Folder Structure
- Database Design
- Authentication
- Game Mechanics
- Battle System
- Question System
- Installation
- Environment Variables
- Running the Project
- API Overview
- Screenshots
- Future Improvements
- Team
Programming education often becomes repetitive and discouraging for beginners.
ALGOLINGO solves this problem by integrating:
- 🎮 RPG Gameplay
- ⚔️ Monster Battles
- 📚 Programming Questions
- 🏆 XP & Level System
- 💰 Gold Rewards
- ❤️ HP System
- 🎒 Inventory
- 🛒 Shop
- 🌍 Google Authentication
The objective is to make learning programming fun while maintaining educational value.
- User Registration
- User Login
- Google OAuth Login
- Secure Password Hashing
- Flask Sessions
- Logout
- Player Profile
- HP Bar
- XP Bar
- Gold Display
- Level Display
- Current Topic
- Dungeon Map
- Monster Selection
- Inventory
- Shop
- Adventure Log
Supports
- Python
- Java
- C++
Question Types
- MCQs
- Code Snippets
- Topic-wise Questions
- Difficulty-wise Questions
- Explore dungeon
- Fight monsters
- Solve questions
- Earn XP
- Earn Gold
- Level Up
- Heal
- Buy Potions
- Unlock harder challenges
- HTML5
- CSS3
- JavaScript
- Python
- Flask
- PostgreSQL
- Google OAuth
- Flask Sessions
- Git
- GitHub
Browser
│
▼
HTML + CSS + JavaScript
│
▼
Flask Backend
┌────────────┼─────────────┐
│ │ │
▼ ▼ ▼
Authentication Game Logic API Routes
│ │ │
└────────────┼─────────────┘
▼
PostgreSQL Database
ALGOLINGO/
│
├── static/
│ ├── css/
│ ├── js/
│ ├── tower.png
│ ├── monsters_spritesheet.png
│ └── items_spritesheet.png
│
├── templates/
│ ├── index.html
│ ├── login.html
│ ├── signup.html
│ └── dashboard.html
│
├── app.py
├── db.py
├── questions_routes.py
├── requirements.txt
├── .env
└── README.md
| Column | Description |
|---|---|
| id | Primary Key |
| username | Username |
| User Email | |
| password_hash | Encrypted Password |
| level | Current Player Level |
| created_at | Account Creation Date |
| profile_picture | Google Profile Picture |
| provider | Login Provider |
| google_id | Google Account ID |
| xp | Total Experience |
| gold | Player Gold |
| hp | Current HP |
| completed_questions | Questions Already Solved |
| Column | Description |
|---|---|
| id | Question ID |
| topic | Programming Topic |
| difficulty | Easy / Medium / Hard |
| question_type | MCQ / Code |
| question | Question Text |
| option_a | Option A |
| option_b | Option B |
| option_c | Option C |
| option_d | Option D |
| correct_answer | Correct Answer |
| explanation | Solution Explanation |
| xp_reward | XP Earned |
| created_at | Creation Time |
| languages | Python / Java / C++ |
| code_snippet | Optional Code Block |
| correct_option | A/B/C/D |
ALGOLINGO supports two authentication methods.
Register
↓
Password Hashing
↓
PostgreSQL
↓
Login
↓
Session Created
↓
Dashboard
Google OAuth
↓
Google verifies account
↓
Flask receives user information
↓
Check PostgreSQL
↓
Existing User?
↓
Yes → Login
No → Create Account
↓
Dashboard
Player approaches monster
↓
Press Space
↓
Battle Modal Opens
↓
Question Loaded
↓
Player Answers
↓
Correct?
↓
YES
↓
Monster HP decreases
↓
Wrong?
↓
Player HP decreases
↓
Monster Defeated
↓
XP + Gold Reward
↓
Database Updated
↓
Return to Dungeon
Default HP
100 HP
Wrong answers reduce HP.
Example
100
↓
85
↓
70
↓
55
↓
40
↓
25
↓
0
At 0 HP
- Battle Lost
- Player must heal before continuing
XP rewards depend on question difficulty.
| Difficulty | XP |
|---|---|
| Easy | 50 |
| Medium | 100 |
| Hard | 200 |
When enough XP is earned
Level Up
↓
Higher Rewards
↓
Future Content Unlocks
Gold is earned by defeating monsters.
Used for
- Buying Potions
- Unlocking Equipment
- Future Shop Items
Questions are selected dynamically from PostgreSQL.
Filtering
- Language
- Topic
- Difficulty
Supported Languages
- Python
- Java
- C++
Green Slime
HP
100
Skeleton
HP
150
Beholder
HP
200
Clone the repository
git clone https://github.com/ACM-JUIT/Team-3-Algolingo.gitGo into project
cd ALGOLINGOCreate virtual environment
python -m venv venvActivate
Windows
venv\Scripts\activateLinux/macOS
source venv/bin/activateInstall packages
pip install -r requirements.txtCreate a .env
SECRET_KEY=your_secret_key
DATABASE_URL=postgresql://username:password@localhost:5432/algolingo
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secretpython app.pyVisit
http://127.0.0.1:5000
| Route | Description |
|---|---|
| / | Landing Page |
| /login | Login |
| /signup | Register |
| /dashboard | Dashboard |
| /logout | Logout |
| /api/state | Player State |
| /questions | Question APIs |
✅ Landing Page
✅ Login System
✅ Signup System
✅ Google Authentication
✅ PostgreSQL Integration
✅ Dashboard
✅ RPG UI
✅ HP System
✅ XP System
✅ Gold System
✅ Monster Battles
✅ Shop UI
✅ Inventory UI
✅ Adventure Log
✅ Programming Questions
- Boss Battles
- Daily Quests
- Achievements
- Leaderboards
- Friends System
- Multiplayer Battles
- Adaptive Difficulty
- AI Generated Questions
- Coding Challenges
- DSA Tower
- Admin Dashboard
- Inventory Database
- Equipment Upgrade System
- Sound Effects
- Animations
- Mobile Support
Team 3 – ACM JUIT
Project developed as part of the ACM Software Development Initiative.
This project is licensed under the MIT License.
Inspired by
- Duolingo
- CodeCombat
- Pokémon RPG Mechanics
- Classic Pixel Dungeon Games
- Open Source Community
"Learn Programming. Defeat Monsters. Level Up Your Logic."