🎮 Introduction
Imagine building an entire game just by chatting. No IDE, no boilerplate headaches—just prompts.
That’s what I did with Amazon Q CLI, the AI command line assistant from AWS. In this blog, I’ll walk you through how I built Q Maze Runner, a fun and challenging 2D maze game with:
- 🔄 3 Levels of increasing difficulty
- 💖 Heart-based lives
- 🧱 Maze logic & traps
- 🧠 Chat-based development flow
- 🎵 score tracking, and game over screen
Let’s dive in!
🛠️ Setup: My Development Environment
💻 Tools Used
- Amazon Q CLI (chat-based code generation)
- PyGame (2D game development library)
- WSL with Ubuntu on Windows 11 (to run Q CLI and Python)
⚙️ How I Set It Up
- Enabled WSL and installed Ubuntu 22.04:
wsl --install -d Ubuntu
2.Installed Python and pip:
sudo apt update && sudo apt install python3 python3-pip
3.Installed PyGame:
pip install pygame
4.follow the below documentation and install the Q Cli:
5.Launched the interactive prompt:
q chat
And just like that—I was ready to build.
🧠 Prompt-Driven Development: Key Features I Added
Below are the prompts I fed into Amazon Q CLI and the features it generated.
🧱 1. Game Skeleton & Movement
Create a PyGame template for a 2D top-down maze runner game where the
player moves with arrow keys and cannot walk through walls.
Output:
- Got a basic playable maze
- Player movement & wall collisions
🧵 2. Title Screen
Add a title screen that says "Q Maze Runner" with a start button. Use a clean UI font and center the text.
- Clean UI with a button to start
💖 3. Lives System (Hearts)
Add 3 heart symbols at the top-right corner of the screen to represent player lives. Remove a heart each time the player hits an obstacle.
output:
- Displayed hearts as images
- Decreased life count on trap hit
🧠 4. Moving Obstacles (Spinning Traps)
Add red spinning squares as moving obstacles. If the player touches one, reduce a life and restart current level.
output:
- Animated red obstacles that move/spin
- Reset player position after hit
and many more . try out now and find out !!
🔁 List of prompts i used
- Create a PyGame template for a 2D top-down maze runner game where the player moves with arrow keys and cannot walk through walls.
- Add a title screen that says "Q Maze Runner" with a start button. Use a clean UI font and center the text.
- Show the player's current score at the top-left corner of the game screen using a readable font.
- Make the game progressively harder across the 3 levels by reducing open paths and adding moving obstacles.
- Add 3 heart symbols at the top-right corner of the screen to represent player lives. Remove a heart each time the player hits an obstacle.
- Load and display a heart image and reduce lives by 1 when the player touches a trap. End game when lives reach 0.
- Increase the player score by 10 every time they reach the end of the level. Show total score after level 3 or when all lives are lost.
- After the player reaches the end of a level, automatically load the next maze layout. After level 3, show a 'Game Over' screen with total score.
🧩 Final Features Recap
✅ 3 Maze Levels
✅ Player Movement & Collision
✅ Heart-Based Lives
✅ Spinning Traps
✅ Score System
✅ Game Over Screen
🧠 What I Learned
- Amazon Q CLI isn’t just for scripts—it can handle game loops, UI logic, and more
- Prompt engineering truly becomes programming
- Using WSL + Q CLI makes Windows a powerful dev environment
📦 Try It Yourself
You can try building your own game with just prompts using Q CLI!
💻 GitHub Repo
👉Q Maze Runner GitHub (Demo & Code)
🎥 Watch here
🚀 Conclusion
This was one of the most fun and creative experiments I’ve done as a developer. Amazon Q CLI + PyGame = a dream team.
Try building your own project with Q CLI and share it with the community.
Top comments (1)
Love how you used Q CLI to go from prompts to a full-on game! Did you run into any surprising limitations or funny bugs in the chat dev flow?