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 it does

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 we built it

Framework
Django served as the core framework for backend development, chosen for its scalability and my prior experience with it. The backend architecture utilized a mix of API calls and WebSockets:

  • API Calls: Used for secure and consistent tasks like chest purchases, workout updates, and marketplace transactions.
  • WebSockets: Powered real-time updates for inventory changes, dungeon progress, and global chat, enabling low-latency, interactive user experiences such as equipping items.

Real-Time Functionality

  • Daphne: Seamlessly integrated with Django Channels, enabling Django to handle asynchronous WebSocket connections alongside traditional HTTP requests.
  • Redis: Used as a channel layer to broadcast messages to multiple clients (e.g., updating all players in a dungeon) without performance bottlenecks.

Asynchronous Tasks

  • Celery: Implemented to manage background jobs like time-based dungeon events, ensuring smooth and scalable task execution.

Security

  • Token-based authentication via Django REST Framework ensured secure access to backend services.

Database

  • AWS RDS (PostgreSQL): Handled structured data such as user profiles, workout statistics, inventory, marketplace transactions, and all dungeon-related data.
  • AWS DynamoDB: Managed unstructured data like real-time chat messages, ensuring scalability and low latency for chat functionality.

AI Integration

Technology
Amazon Bedrock with Claude Haiku was utilized to create dynamic, AI-driven NPC interactions in FitQuest. These NPCs had distinct personalities, likes, dislikes, and descriptions, which influenced their interactions with players and shaped in-game outcomes.

How it Worked:

  1. Data Storage

    • Each NPC's core attributes—likes, dislikes, and a description—were pre-generated and stored in AWS RDS to ensure consistency while allowing variation in responses.
  2. Dynamic Prompting

    • When an NPC interaction was triggered during a dungeon run:
      • Stored NPC data was fetched from the database.
      • The data, along with contextual details like the player’s recent decisions, stats, and current health, was included in a prompt sent to Amazon Bedrock.
      • The AI generated responses that reflected the NPC’s personality and tailored their reaction to the player's actions.
  3. AI-Driven Outcomes

    • Health Adjustments: NPCs could heal or damage the player based on choices or their disposition (e.g., helping a combat-oriented NPC might earn health points, while upsetting a hostile NPC could result in damage).
    • Money Modifications: NPCs could reward coins, demand payment for services, or even steal from the player.

AWS Services Used

  1. AWS EC2: Hosted the backend, providing a scalable and reliable server environment.
  2. AWS S3: Stored and served exercise images, which were parsed and uploaded to the database using Python scripts.
  3. AWS IAM: Managed secure and efficient access to AWS resources, including Bedrock, DynamoDB, and S3.
  4. AWS RDS (PostgreSQL): Managed structured data storage.
  5. AWS DynamoDB: Stored unstructured real-time chat data.
  6. Amazon Bedrock with Claude Haiku: Powered AI-driven NPC interactions and event generation.

Accomplishments We're Proud Of

One of the highlights of FitQuest is that all the in-game items were meticulously hand-drawn.


Future Work

  1. Cooperative Dungeon Traversals

    • Enable players to team up and explore dungeons together, fostering collaboration and shared challenges.
  2. Player-to-Player Trading

    • Introduce a system for players to trade items directly, enhancing community interaction and strategy.
  3. Dynamic NPC Behavior

    • Develop NPCs that adapt to collective player behavior. For instance, if the majority of players treat an NPC poorly, the NPC will become more cautious and wary in future interactions, creating a living, evolving game world.
Share this project:

Updates