Building Word Sniper with Amazon Q Developer CLI: A Game Dev Journey with AI

Biswanath SahBiswanath Sah
4 min read

🧠 Introducing: Word Sniper

Word Sniper is a fast-paced typing game built with Pygame where players must shoot down falling words by typing them before they hit the ground. The twist? Some words are fake! You gain points by typing valid words and lose lives if you type fake ones or miss real ones. With each level, the pace picks up, testing your reflexes, vocabulary, and attention. It's a perfect blend of action and language that makes you think—and type—fast! 🎯⌨️


🛠️ How I Built It

This project was part of the "Build Games with Amazon Q Developer CLI" campaign—a hands-on experience to explore Amazon Q, an AI-powered coding assistant by AWS. Using Amazon Q CLI, I was able to quickly scaffold the game structure, debug logic, generate features, and get real-time code suggestions—right from t terminal.

Amazon Q Developer CLI is built to help developers write, fix, and understand code faster, locally. It integrates directly into your command line and becomes a collaborative partner, making development smoother and more efficient. Whether it’s writing new functions, identifying bugs, or refactoring code, Q handles it intelligently using just your prompts.

I chose to build Word Sniper because I’ve always enjoyed word games, and adding fast-paced action felt like an exciting creative twist. It also made for the perfect use case to test how well an AI assistant could support both the logic-heavy and design-focused aspects of game development.


📋 Steps to Follow:

I built my game Word Sniper entirely on Ubuntu using the Amazon Q Developer CLI. Here's a quick walkthrough of how I set it up:

🔐 Step 1: Signed Up for AWS Builder ID

I created my AWS Builder ID and claimed my developer handle on community.aws. This gave me free access to use Amazon Q CLI and officially join the AWS developer community. 🎉

💻 Step 2: Installed Amazon Q CLI

✅ I downloaded the Amazon Q CLI Installer:

curl --proto '=https' --tlsv1.2 -sSf https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-x86_64-linux-musl.zip -o q.zip

✅ Installed required package:

sudo apt install unzip

This installs the unzip utility required for the next step.

📦 Step 3: Unzipped and Installed Amazon Q CLI

unzip q.zipcd q chmod +x install.sh./install.sh

  • Answered "Yes" when asked to modify the shell config.

  • Chose "Use for Free with Builder ID".

  • A URL was generated for authentication—I opened it in my browser, logged in, and I was good to go!

💬 Step 4: Started Chatting with Amazon

Then, I started my first chat with q chat

I described my game idea clearly using the following prompt:

Prompt:"Create a complete Python game using Pygame for a game called 'Word Sniper'. In this game, words fall from the top of the screen at random positions. The player has to type the words before they reach the bottom. If the typed word is real, it gets removed and the score increases. If it's a fake word, the player loses a life. If a real word hits the bottom, the player also loses a life—but there’s no penalty for fake words reaching the bottom. I wanted the game to include real and fake words, a typing box at the bottom, a clean UI showing score, level, and lives, and sounds or effects for correct and wrong inputs. The game should get harder as the player levels up, and the code should be modular and well-structured."

This detailed prompt was all Q needed to understand the vision behind Word Sniper. Within seconds, it generate.

Image of game "Word Sniper"

⚙️ How Q Handled Classic Coding Hurdles

When I struggled with getting the input box to sync with the falling words, Amazon Q quickly suggested using event loops and text surfaces in Pygame. It also fixed a bug where fake words weren’t being detected properly. Another tricky part was scaling difficulty with levels—Q helped add a timer that increased word speed every 30 seconds.

⏱️ Where Q Saved Me Time

  • Generated the full Pygame loop in seconds

  • Auto-created the Word class with all attributes

  • Suggested a dictionary API for real-word checking

🚀 Final Thoughts

Building Word Sniper was more than just a fun project—it was a peek into the future of how AI and developers can work side by side. With Amazon Q CLI, I turned a game idea into a working prototype quickly, learned new prompting techniques, and saved hours of debugging and setup.

If you're curious about building smarter and faster, I highly recommend giving Amazon Q Developer CLI a try. Your next game, tool, or app idea might be just one prompt away. ✨

4
Subscribe to my newsletter

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

Written by

Biswanath Sah
Biswanath Sah