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)