Inspiration

Our team had multiple ideas, but we all agreed that this is the one worth building. Studying can feel overwhelmingly boring at times, so much so that some students would rather skip it entirely. On the other hand, games are fun, engaging and played voluntarily. Why not combine them both? Then Balatest was born, turning studying into a game that makes learning feel like play.

What it does

Inspired by balatro, our game turns study material into a card game. A file is uploaded and turned into playable cards. Each play card contains a question based on your notes with different difficulties, if you get a question correct you deal damage to the boss proportional to the difficulty of the card. While if you get a question wrong, you lose HP points and that card gets placed in the discard pile, where you can try again and get try again. But if you fail a second time, you will receive the normal damage + 1. With a max HP of 15, every choice matters. With that said, can you beat your subject's boss?

Guide: Draw (pick a new question) Discard (pick a previously wrong question) Each card have their own dmg proportionate to difficulty, taking hp from the boss You win, automatically sending back to the homepage.

How we built it

For the backend, we integrated PyPDF2 to extract text data from PDF content, which is then fed into a carefully crafted prompt. This prompt uses chain of thought phrasing, few-shot examples as templates, and projected size/length limits to ensure quality cards. This prompt is then sent to Gemini which outputs json code that is then cleaned and sent to the front-end.

For the frontend, we used React and Tailwindcss to implement the game UI and functionality. This allows the user to select a file and play the game with AI generated cards based on the content of the file. The frontend is in charge of the gameplay and checking if the user got the correct answers or not. We created reusable components for buttons and cards, so we don’t have to design them every time we want to use them.

Challenges we ran into

  • The infamous CORS, the browser’s security policy against foreign API calls
  • Narrowing down ideas to make sure we have a clear MVP
  • CSS bugs when implementing the UI

Accomplishments that we're proud of

  • We were able to implement functionality and backend properties in such a short time.
  • We deployed our website using Firebase and our API using Render and connected them together to provide a public demo link

What we learned

  • How to work in teams and divide up the work to complete the project in such a short time.
  • We learned new tools and technologies such as GeminiAPI and Firebase
  • How to work with PDF files and send them through API requests to use it in different services.

What's next for Balatest

  • Improving our UI to include additional screens like a leaderboard and an end-of-game summary
  • Support 1v1 multiplayer to challenge friends and learn together
  • Support user accounts where they can save their games and continue later
  • Add more card types, special effects, sound effects and new short and fun puzzles
  • Generate bosses based on the content of the notes/material the player uploaded
  • Allow more than just PDF uploads
  • Future idea, associate with highschools. Be part of student homework assignments, use for accumulative credits points (for their future exams), make students interact with material class.
  • Add difficulty levels (for college student level), using timing (20 seconds to respond each question), generative material from the AI relate with the topic, and plus (by paying) having explanations.

Built With

Share this project:

Updates