๐Ÿ I Built a Snake Game Using Amazon Q CLI โ€“ Here's How It Went

Shweta DwivediShweta Dwivedi
3 min read

Have you ever built a game using just AI prompts? I recently participated in the "Build Games with Amazon Q CLI" campaign and created a fully playable Snake Game with sound effects, levels, and a UI โ€” all with the help of Amazon Q CLI, the AI-powered coding assistant from AWS.


๐ŸŽฎ Why Snake Game?

Snake is a nostalgic and simple game to start with. But my goal was not just to recreate it โ€” I wanted to explore how far AI can help in making it more fun and feature-rich, without having to write every line of code from scratch.


๐Ÿ”ง How I Built It Using Amazon Q CLI

I used Amazon Q CLI to chat in natural language and get back ready-to-run Python code using PyGame. Here's how it went:

๐Ÿ”น Step 1: Basic Game

I started with:

cppCopyEditBuild a classic snake game using PyGame in Python.

Amazon Q responded with a working version of the classic snake game โ€” movement, food, score โ€” all included!

๐Ÿ”น Step 2: Add Sound and Music

Then I asked:

pgsqlCopyEditAdd sound effects for food pickup and game over. Also add background music.

Boom! It gave me all the pygame.mixer code with MP3 loading support.

๐Ÿ”น Step 3: Game Screens and Levels

Next prompt:

sqlCopyEditAdd a start screen, game over screen, and make the game speed up every 5 points.

Amazon Q handled UI transitions and logic to increase speed. It saved me hours of scripting!


๐Ÿง  What I Learned

  • Prompting Matters: Clear, step-by-step prompts gave me the best results.

  • AI Can Handle Complexity: From sound effects to level logic, Q CLI tackled classic game challenges well.

  • Fast Iteration: I could build and test quickly without searching Stack Overflow or docs.


๐ŸŽฅ Screenshots & Gameplay

๐Ÿ“น Gameplay Video: Watch it here


๐Ÿงต Tech Stack

  • Python 3.x

  • PyGame

  • Amazon Q CLI

  • WSL on Windows


๐Ÿš€ Join the Campaign & Get a Free T-shirt!

This project is part of the Amazon Q CLI Campaign (May 20 โ€“ June 20, 2025).
If you're in the Asia Pacific, Japan, or Greater China regions, you can join in and:

โœ… Build a game using Q CLI
โœ… Post your work with #AmazonQCLI
โœ… Fill the T-shirt form and get Amazon Q swag!

๐Ÿ“Œ Campaign Link


๐Ÿ“ข Final Thoughts

This was my first time using Amazon Q CLI, and Iโ€™m amazed how fast and fun game development can be with the help of AI. Whether youโ€™re a beginner or just want to experiment, this is the perfect hands-on opportunity to learn, create, and get rewarded.

Let me know what you think โ€” and tag me if you build your own!

0
Subscribe to my newsletter

Read articles from Shweta Dwivedi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shweta Dwivedi
Shweta Dwivedi