2D Vertical Rage Platformer with AI Taunting System
Chuck King is a web-based 2D vertical rage platformer inspired by Jump King.
Players control the character using a charge jump mechanic:
- Hold the key to charge the jump
- Release to jump
- If you fall... you lose all your progress 😈
🤖 AI Rage System – an AI system that teases the player when:
- They fall too many times
- They stay idle for too long
- They get stuck in the same area
The game is built entirely using pure JavaScript with the Canvas 2D API, without using any frameworks.
https://prosperum26.github.io/chuck-king/
- Rendering Engine: HTML5 Canvas 2D
- Language: Vanilla JavaScript (ES6+)
- Architecture: Modular OOP
- AI System:
- Rule-based event engine
- Optional external AI API (OpenAI-compatible)
- Deployment: Static hosting (GitHub Pages / Vercel / Netlify)
Mở file:
index.html
Hoặc vào thẳng:
game.html
Game dùng fetch() để load JSON map nên nên chạy qua HTTP:
python -m http.server 8000Hoặc:
npx http-serverSau đó mở:
http://localhost:8000
Trong game có modal cấu hình:
- Endpoint:
https://api.openai.com/v1/chat/completions - API Key: key của bạn
Nếu không cấu hình → game tự fallback sang hardcoded messages.
| Action | Key |
|---|---|
| Move Left | Arrow Left / A |
| Move Right | Arrow Right / D |
| Charge Jump | Hold Space / Arrow Up |
| Release Jump | Release key |
| Mute AI | Button góc phải dưới |
fallCountidleTimelastFallZonefallZonesbounceCountstuckState
- Player falls off map
- Player idle too long
- Repeated fall in same zone
- Excessive retry loop
AI có cooldown để tránh spam.
- Hardcoded taunts
- External AI API (optional)
js/
├── main.js
├── engine/
│ └── GameEngine.js
├── entities/
│ ├── Player.js
│ ├── Platform.js
│ └── HanChicken.js
├── systems/
│ ├── Camera.js
│ ├── EventTracker.js
│ ├── AIRuleEngine.js
│ ├── AIMessageGenerator.js
│ ├── NPCDialogSystem.js
│ ├── SoundManager.js
│ └── APIKeyManager.js
└── ui/
└── UIManager.js
- Separation of concerns
- Event-driven AI trigger
- Modular system architecture
- Easily extendable platform types
- AI fallback mechanism
- Vertical map (4320px height)
- Multiple platform types:
- Normal
- Ice
- Bouncy
- Moving
- Broken
- Slope
- Enemy / NPC interaction
- Camera tracking
- Sound system
- HUD system
- AI taunting dialogue
- API configuration UI
Chi tiết dev documentation nằm trong:
docs/
PROJECT_STRUCTURE.mdAPI_CONTRACT.mdSETUP_GUIDE.mdTESTING_GUIDE.mdGIT_WORKFLOW.md
Có thể deploy lên:
- GitHub Pages
- Vercel
- Netlify
- Bất kỳ static hosting nào
Không cần backend server.
- Leaderboard
- Save progress system
- Difficulty modes
- Advanced AI personality modes
- Mobile touch control
Free to use for educational and personal purposes.
Quảng Phú Hưng
Nguyễn Thị Ngọc Quỳnh
Huỳnh Nhật Huyền
Nguyễn Thanh Bình
Mai Danh Tiến
Bùi Tần Uy Minh
Võ Văn Thiện
Ngô Hồng Ân
Trần Hữu Thắng
⚡ United by challenge. Driven by chaos. ⚡
Made with rage and JavaScript 🔥