DEV Community

Cover image for 🎮 Color Catch — My First Game Built with Amazon Q CLI and PyGame
Sathira Desitha
Sathira Desitha

Posted on

🎮 Color Catch — My First Game Built with Amazon Q CLI and PyGame

Building a game with the help of an AI assistant? That sounded both futuristic and fun — and it was! As part of the Build Games with Amazon Q CLI campaign, I created a color-matching game called Color Catch, powered by Python and PyGame, and built interactively with Amazon Q CLI.


🚀 What is Color Catch?

Color Catch is a simple but addictive game where you control a color-changing bucket to catch falling balls — but only the ones that match your current color! Miss a matching one or catch the wrong color? You lose points. Your goal is to survive as long as you can — and track your Timestreak, a score based on how long you stayed alive with a positive score.


💡 What Sparked the Idea?

The idea behind Color Catch was to create something fun, visual, and easy to play but hard to master. I also wanted to explore how well Amazon Q CLI could help me shape and build a game from scratch — and it absolutely delivered.


📸 My First Prompt to Amazon Q CLI

Here’s the very first prompt I gave to Amazon Q CLI:

Very First Prompt


🛠️ How I Installed Amazon Q CLI

I followed the official AWS guide to install Amazon Q CLI on Ubuntu:

🔗 Amazon Q CLI Installation Guide (AWS Docs)

After installing, I started a chat session right in my terminal and iteratively built the game through prompts.


💬 What I Prompted Amazon Q CLI

Here are some examples of my actual prompts:

  • “Create a Pygame game with a bucket at the bottom that moves left and right, and colored balls falling from the top..”
  • “Change the color of the bucket every 5 seconds.”
  • “Add a scoring system based on catching/missing balls.”
  • “Gradually the balls falling frequency should be increased. If the player atching a matching color ball: +2 points. Catching a non-matching color ball: -1 point. Missing a ball that matches your bucket's color: -2 points”
  • “Add sounds and background music to the game.”
  • “Add a pause menu and game over screen.”
  • “Display a Timestreak that measures survival time.”

Amazon Q was incredibly responsive — giving useful snippets and adapting to my needs each time.


🎮 Gameplay & Rules

  • You start with 10 points
  • Use left/right arrow keys to move the bucket
  • The bucket changes color every 5 seconds
  • Balls fall from the top — only catch the ones that match your bucket's color

📊 Scoring

Action Points
✅ Catch matching color ball +2
❌ Catch non-matching ball -1
⬇️ Miss matching color ball -2

The game ends when your score drops to 0.

Your final performance is measured by your Timestreak — how long you stayed alive with a score above zero.


🎁 Game Features

  • 🌌 Animated starry background
  • 🎮 Menus: main, pause, and game-over
  • 🎧 SFX: correct.mp3, wrong.mp3, miss.mp3, game_over.mp3, and background music
  • ⚡ Increasing difficulty — faster falling balls
  • ⌛ “Timestreak” time-based survival score
  • 💬 Encouraging appreciation messages based on how long you survived

🧪 How to Play It

🖥️ Requirements

  • Python 3.6 or higher
  • PyGame

⚙️ Installation

pip install pygame
python bucket_game.py
Enter fullscreen mode Exit fullscreen mode

🎥 Watch the Gameplay

Want to see Color Catch in action? Here’s a short gameplay video:
▶️ Watch on YouTube


🖼️ Screenshots

Here are a few snapshots from the game:

🧺 Initial Screen

Image description

🎨 Game In Action

Image description

☄️ Game Paused Screen

Image description

⏳ Game Over Screen

Image description


📁 View the Code on GitHub

You can explore the full source code here:
👉 GitHub Repository – Color Catch


📈 What I Learned

This experience taught me:

  • How to prompt effectively to guide AI
  • How to use PyGame for sprite animation, audio, and logic
  • That AI-assisted game development is fast, fun, and efficient

🧵 Final Thoughts

Participating in the Amazon Q CLI campaign was one of the most engaging and educational experiences I’ve had. Seeing a playable game come to life through AI-powered collaboration was both empowering and exciting.

If you're a developer (or even a beginner), I highly recommend giving it a try.


🚀 Join the Build Games with Amazon Q CLI Program!

If you’re excited to try building your own game with AI assistance and want to earn a chance to get an exclusive Amazon Q CLI T-shirt, don’t miss this opportunity!

Sign up and learn more here:
Build Games with Amazon Q CLI and Score a T-shirt

Join the community, unleash your creativity, and have fun building games with Amazon Q!


Top comments (0)