⭐️ Inspiration

We’re a couple of chonky and quirky animal admirers who’ve always had a soft spot for the internet’s furriest sensations. When capybaras took over the web, they instantly captured our hearts. Big capybara, baby capybara, capybara on a croc, or even capybara on another capybara with an orang on its head we loved them all!

But somewhere along the way, the cappys started to fade from our feeds and attention, and before we knew it, Moo Deng, the pygmy hippo, became our new obsession. Watching Moo Deng eat, sleep, and bite on repeat, we were totally hooked.

While brainstorming for this hackathon, we found ourselves reflecting on the current world of bad viruses and thought: What if there was a virus that spread some love instead? And that’s when it hit us, why not pay homage to the capybaras who first stole our hearts and give them their rightful spotlight again?

📋 Overview

Project-CP is a web game that features:

  • Online gameplay
  • Global leaderboard system
  • Real-time score tracking
  • Paginated high scores
  • Player-specific score filtering

👾 What it does

Capywarz is a quirky adventure where you play as Capy Virus, a desperate-for-some-love virus seeking its rightful place in the human heart. The virus journeys through the lungs to the heart, fighting a barrage of enemies inspired by human cells like mucus blobs and macrophages, in chaotic “bullet hell” battles. Each level brings unique challenges, including the epic showdown against Moo Deng. We've attempted to blend quirky humor with strategic gameplay, creating a fun, immersive experience.

🧑‍💻 How we built it

  • Used Unity for game development, and implementing logic and mechanics in C#.
  • AWS Lambda, DynamoDB, and API Gateway handled the backend for high scores and leaderboard management.
  • Next.js was used for the frontend, hosted on AWS App Runner, and cached via CloudFront.
  • Amazon Q Developer assisted in:
    • Generating and refining code snippets.
    • Debugging and documenting components.

How I Used Amazon Q Developer

Amazon Q Developer was an invaluable tool throughout the development of Capiwarz. I leveraged its features across different stages of the project:

  • Code Generation and Optimization: Used Amazon Q to generate and refine code snippets for backend Lambda functions (Python), frontend components (Next.js with TypeScript), and Unity scripts (C#).
  • Debugging and Problem-Solving: It helped identify and fix bugs in the code, offering suggestions to restructure functions for better clarity and performance.
  • Documentation and Explanations: Amazon Q provided clear documentation and explanations for complex code snippets, improving maintainability.
  • Streamlining Repetitive Tasks: Q was highly effective in automating tedious coding patterns, saving significant development time.
  • Workflow Integration: I used its extensions in both Visual Studio and VS Code, ensuring smooth integration into my development workflow.

Despite some limitations, such as occasionally losing context or requiring explicit clarification when discussing code-related queries, Amazon Q greatly accelerated development and enhanced the overall quality of the project.

👩‍🔧 AWS Services Used in Capiwarz

  1. Amazon S3: To store and serve static assets like the Unity WebGL build.
  2. Amazon CloudFront: For fast, reliable content delivery via a global CDN.
  3. AWS Lambda: Serverless backend to handle game data operations, such as high score submissions and retrieval.
  4. Amazon DynamoDB: For storing high scores, ensuring low latency and scalable performance.
  5. AWS API Gateway: To securely and efficiently handle API requests between the frontend and backend.
  6. Amazon ECR: To store Docker images for the Next.js app.
  7. AWS App Runner: Simplifies the deployment and scaling of the Next.js app.
  8. Amazon CloudWatch: Provides monitoring and logging for API Gateway, Lambda, and DynamoDB.
  9. AWS IAM: Ensures secure communication and enforces least-privilege access control.
  10. Amazon Q Developer: A GenAI tool integrated into the code editor for assistance with code generation and optimization.

🤺 Challenges we ran into

  • Spent the first-week exploring different options and testing out Phaser, even developing Level 1 with it, before transitioning and settling with Unity for its advanced capabilities.
  • Understanding holistic Game Design: With no experience in creating a game we were stuck on the basic questions about gameplay like what should be the game strategy what will be the player's motive to move forward, how do you create challenging but not complex game mechanics, and so on.
  • Learning Unity: Switching from Phaser.js to Unity required a steep learning curve to grasp animations, physics, and tilemaps.
  • Designing Unique Mechanics: Balancing gameplay while integrating creative elements like mucus blobs and bursting cells required numerous iterations.
  • AWS Configuration: Setting up services like API Gateway and S3 for Unity builds, as well as handling CORS in API Gateway for secure frontend-backend communication and setting up IAM roles, proved technically challenging.
  • Time Constraints: Balancing feature development with the hackathon deadline led to prioritizing core gameplay mechanics over extra features.
  • Music Copyright Constraints: We really wanted to use the infamous 'capybara...capybara capybara capybara capybara' score for our main game track we even tried reaching out to the original maker of this score but didn't succeed. Therefore we had to settle with a different background score.
  • Ensuring correct metadata for Unity's WebGL build in S3 and CloudFront.
  • Debugging rendering issues in Unity and optimizing performance for WebGL.
  • Achieving smooth transitions in the cutscenes, which required out-of-the-box thinking to solve.
  • Learning the basics and best practices of Unity and implementing them within tight time constraints.
  • Amazon Q Developer occasionally struggled with maintaining context, requiring explicit clarification for code-related queries.

🏆 Accomplishments that we're proud of

  • Successfully developed and launched our very first game, achieving a major milestone in our journey.
  • Invited friends to play, sparking competitive fun as they vied for the top spot on the leaderboard.
  • Gained proficiency in a new programming language (C#) and a powerful tool (Unity), expanding our skill set.
  • Delved into the fundamentals of Game Development, including level design, sound design, animation, and asset creation.
  • Achieved seamless integration of Unity, Next.js, and AWS services, ensuring a smooth and low-latency gameplay experience.
  • Designed and implemented biologically inspired enemy behaviors, adding a unique and educational twist to the game.
  • Successfully tackled challenges like API configuration and optimizing Unity for WebGL, enhancing both performance and functionality.

🙇‍♀️ What we learned

  • The intricacies of game design and how small details, like fluid animations and quirky dialogue, enhance the player experience.
  • The intricacies and techniques of pixel art, we do not underestimate the skill required in making pixel art.
  • How to create sprites and strategically make a tile palette out of them.
  • Gained a deeper understanding of serverless architectures, focusing on cost-effective scalability and performance optimization.
  • Learned a lot about Unity, its tools, and workflows. As someone who had never built a game before, this was a completely new experience. Unity skills acquired include:
    • WebGL optimization
    • Asset management
    • Responsive design for various aspect ratios
    • Understanding how the physics engine works
    • Efficient level creation using tilemaps
  • Discovered the importance of iterative problem-solving by learning through fixing bugs and optimizing code under time constraints.
  • Deployed an API Gateway for the first time, gaining hands-on experience with configuring endpoints and securing API requests.
  • Learned to use Amazon Q Developer plugins effectively in both Visual Studio and VS Code.

⛳️ What's next for Capiwarz

  • Implement all the feedback received from friends after their playthroughs to refine gameplay and user experience.
  • Expand the game by adding new levels and designing more intricate and challenging enemy behaviors.
  • Enhance player abilities and further optimize the Unity WebGL build for improved performance and responsiveness.
  • Explore the integration of AI/ML to implement dynamic difficulty adjustment, making the game more engaging and adaptive.
  • Introduce multiplayer capabilities to elevate the gaming experience.
  • Release the game on mobile platforms to reach a broader audience.

Built With

Share this project:

Updates