Inspiration
We built Brain Battle to make revision more engaging and social. Instead of reading notes alone, we wanted a quick game where you can practice questions, see your progress right away, and play through it with friends.
What it does
Brain Battle is a retro-styled browser study RPG:
- You pick a boss (or run through All Bosses) and answer multiple-choice questions.
- Correct answers deal damage and earn coins/XP.
- Wrong answers cause the boss to attack.
- As you progress, you unlock features like the shop, daily quests, and a Pomodoro focus timer.
- You can customize content in-game via the Config Editor (create bosses, add questions, or generate questions from PDFs using Gemini).
- Optional multiplayer lobbies let players battle through boss lists together.
How we built it
- Built as a browser game using Vanilla JavaScript + HTML + CSS
- Vite for local development and builds
- Multiplayer uses WebSockets (
ws) with a simple Node-based WebSocket server - Question generation integrates Gemini, plus PDF parsing/chunking via pdfjs-dist
- Game progression/state and custom configuration are stored in the browser with
localStorage
Challenges we ran into
- Balancing gameplay so the quiz loop feels fun (not punishing) while still rewarding skill
- Designing a flexible config system that supports both preset and user-created content
- Generating good quiz questions from PDFs reliably (format differences, chunking, prompt tuning)
- Keeping multiplayer simple and stable while still feeling responsive
- Managing a growing feature set (quests/shop/pomodoro/editor) without the UI becoming cluttered
Accomplishments that we're proud of
- A complete end-to-end gameplay loop that feels like a real “run” through bosses
- A working Config Editor that makes the game extendable without touching code
- PDF → question generation to help convert real study material into gameplay
- Optional multiplayer support (public/private lobbies + host-controlled boss lists)
- Multiple progression systems (XP/levels, coins, unlocks) tied into the core learning loop
What we learned
- How much UX matters in learning tools—tiny feedback loops (damage numbers, coins, animations) make studying feel rewarding
- Better understanding of real-time communication tradeoffs and WebSocket architecture
- Prompting and preprocessing matter a lot when generating usable questions from messy documents
- Building a hackathon project is as much about cutting scope wisely as it is about building features
What's next for Brain Battle
- More boss variety and question categories (and better difficulty scaling)
- Better multiplayer modes (co-op events, competitive leaderboards, seasonal runs)
- Accounts / cloud sync for progress and custom content (instead of only
localStorage) - Improved question generation quality controls (review/edit flow, duplicate detection, difficulty tagging)
- Mobile-friendly UI polish and accessibility improvements
Built With
- css
- gemini
- html
- javascript
- railway
- vite
- websockets
Log in or sign up for Devpost to join the conversation.