AWS Logo
Menu
Building a Zombie Shooter Game with Amazon Q CLI and Pygame

Building a Zombie Shooter Game with Amazon Q CLI and Pygame

I created a zombie shooter game using Pygame, entirely generated with Amazon Q CLI, and the experience was unexpectedly smooth, fast, and creative.

Published Jun 7, 2025

🚀 Why Amazon Q CLI?

Amazon Q CLI allows developers to interact with an AI assistant directly in the terminal. It’s capable of writing, editing, and reasoning about your code—all without switching to a browser or IDE. It's fast, context-aware, and integrates naturally with your existing Linux workflows.
With just one initial prompt, I asked Q to:

💡 What Amazon Q Generated

Amazon Q generated a full working version of the game in just a few seconds:
🧱 Game Structure
  • A Python file zombie_shooter.py with clearly organized sections
  • Assets directory logic for sounds and images (with fallbacks!)
  • Clean code with Pygame best practices
🧟 Gameplay Features
  • The player is represented by a green circle in the center of the screen
  • Zombies (red circles) spawn and move toward the player
  • Bullets (black dots) fire in the direction of your mouse
  • A live score counter and dynamic difficulty scaling

🛠️ Adjust some features with the file (Using prompt)

To make the game more challenging, I simply asked:
Q updated the script by:
  • Adding a timer that starts from 30 seconds
  • Displaying the countdown on screen
  • Triggering a game-over screen when time runs out
  • Showing the final score and the cause of the game over
To make the game more lively and eye-catching, I asked:

🎮 Final Result: Fun and Functional

In the final version, players have 30 seconds to shoot as many zombies as possible before time runs out or they get caught. The game is smooth, has graphics placeholders, and is surprisingly engaging for something built in minutes.

🧠 What I Learned

  • Amazon Q CLI is an incredible tool for prototyping and learning. It not only writes code but also reasons through functionality and adapts to follow-ups.
  • You don’t need to switch between browser tabs and documentation—your CLI becomes your assistant.
     

Comments