AWS Logo
Menu
FitQuest: A Cyberpunk RPG Fueled by Your Workouts

FitQuest: A Cyberpunk RPG Fueled by Your Workouts

FitQuest is a cyberpunk RPG that integrates fitness into immersive gameplay. Your workouts enhance your character and help you through AI-driven dungeons.

Published Jan 14, 2025

Inspiration

Every fitness journey starts with a promise of change, but most of us know how quickly motivation fades. That's what led me to create FitQuest RPG—where your real-world workouts power a character's journey through a vivid cyberpunk universe. While searching for apps that could make fitness feel less like a checklist and more like a compelling story, I found plenty of trackers but nothing that truly kept me engaged. So I built the game I wanted to play, combining the addictive progression of RPGs with tangible fitness goals. Although, the irony of spending hours coding rather than exercising isn't lost on me.

What is it?

FitQuest is a cyberpunk RPG that turns your fitness routine into a rewarding adventure. By completing real-world workouts, you level up your in-game character, earn items, and unlock abilities to take on dynamic dungeons. The game features AI-driven NPC interactions, a global marketplace for trading, character customization with hand-drawn items, and dynamic dungeons. It’s designed to make fitness both rewarding and enjoyable.

How I built it?

Environment:

The frontend was developed using Flutter in Visual Studio Code, and the backend was built with predominantly Django using PyCharm. For UI design and debugging, I used Amazon Q Developer, which simplified the process and delivered great results even with minimal input.

Frontend:

To ensure a seamless experience on both Android and iOS, the app’s frontend was built with Flutter. With the help of Amazon Q Developer, I implemented features such as:
  • UI of character and stats
    UI of character and stats
  • Interactive workout widgets.
  • Inventory cards for managing in-game items.
  • Dungeon event interfaces.
  • Character stats.
  • Intuitive and visually appealing exercise tiles.
Amazon Q was especially helpful due to its seamless functionality. I could simply select a chunk of code, provide a vague command like "make it better," and it would effortlessly build beautiful UI.

Backend:

lucid_chart_flow
Backend Diagram
Django served as the core framework for backend development, chosen for its scalability and my prior experience with it. The back-end architecture used a mix of API calls and WebSockets. API calls were employed for tasks like chest purchases, workout updates, and marketplace transactions, which required secure and consistent execution. Web Sockets powered real-time updates for inventory changes, dungeon progress, and global chat, ensuring low-latency, interactive user experiences such as equipping an item.
Real-time functionality like Web Sockets was handled using Daphne and Redis. Celery was implemented to manage asynchronous tasks, such as time-based dungeon events. The backend was secured with token-based authentication through Django REST Framework.
  • Why Daphne?
    • It works seamlessly with Django Channels, enabling Django to handle asynchronous WebSocket connections in addition to traditional HTTP requests.
  • Why Redis?
    • Redis ensures that messages can be broadcasted to multiple clients (e.g., updating all players in a dungeon) without performance bottlenecks.

Database:

  • AWS RDS (PostgreSQL) was used to handle structured data, including user profiles, workout statistics, inventory, marketplace transactions and all dungeon data.
  • AWS DynamoDB managed unstructured data, specifically real-time chat messages, ensuring scalability and low latency.

AI Integration

Amazon Bedrock with Claude Haiku was used in creating dynamic, AI-driven NPC interactions within FitQuest. These NPCs were designed to have distinct personalities, likes, dislikes, and descriptions, which influenced how they interacted with players and affected in-game outcomes.
How it Worked:
Data Storage:
  • Each NPC's core attributes—likes, dislikes, and a description—were pre-generated and stored in the database (AWS RDS). This ensured that NPC traits were consistent while allowing for variation in responses.
Dynamic Prompting:
  1. When an NPC interaction was triggered during a dungeon run, the system fetched the stored NPC data from the database.
  2. This data was included in a prompt sent to Amazon Bedrock, along with contextual details like the player's recent decisions, stats, and current health.
  3. The prompt guided the AI to generate responses that reflected the NPC’s personality and tailored their reaction to the player's situation.
AI-Driven Outcomes:
  • The AI's response could directly influence the player's in-game resources:
    • Health Adjustments: Some NPCs could offer healing or deal damage based on player choices or their personal disposition. For instance, helping a combat-oriented NPC might earn the player health points, while upsetting a hostile NPC could result in a health penalty.
    • Money Modifications: NPCs could grant coins, demand payment for services, or even steal from the player.
All AWS Services used:
  • AWS EC2 hosted the backend, providing a reliable and scalable server environment.
  • AWS S3 stored and served exercise images which were parsed an uploaded to database with python scripts.
  • AWS IAM ensured secure and efficient access to AWS resources, including Bedrock, DynamoDB, and S3.
  • AWS RDS (PostgreSQL)
  • AWS DynamoDB
  • Amazon Bedrock with Claude Haiku
     

Assets used and credits:

Hand Drawn Assets
Hand Drawn Assets
  • All items/skins were hand-drawn.
  • Workout exercises by Greg Priday
  • Dungeon SVG by FortAwesome

Future work:

  • coop dungeon traversals, or meeting other players in the dungeon.
  • trading items between players
  • NPCs will dynamically adapt to collective player behavior. For example, if the majority of players treat a particular NPC poorly, the NPC will become more wary and cautious in their interactions.
     

Comments