🚀 Building Prompt Runner using Amazon Q CLI
Prompt Runner, a 2D endless runner game built using Amazon Q CLI—an AI-powered assistant that helped accelerate development and guide coding decisions.
Published Jun 3, 2025
Looking to combine game development with GenAI? Let me introduce Prompt Runner, a 2D endless runner game built using Amazon Q CLI—an AI-powered assistant that helped accelerate development and guide coding decisions.
This fun and fast-paced game lets players collect good prompts and dodge bad ones, blending classic game mechanics with real-world AI integration.
During development, I used Amazon Q CLI to:
- Generate code snippets (e.g., for player movement, collision detection, gravity)
- Debug issues quickly by feeding code blocks directly to the CLI
- Improve game features like score tracking, animations, and prompt logic
- Refactor and clean up game structure for modularity
It acted like a real-time AI coding partner. If you haven't tried it—it's a game-changer.
- Smooth jump mechanics using the spacebar
- Animated running and jumping states
- Collision detection with falling objects
- Green "good prompts": increase your score
- Red "bad prompts": end the game
- Prompts fall randomly across the screen
- Animated with pulsing and rotation effects
- Live score tracking
- Increasing difficulty over time
- Physics-based jumping with gravity
- Responsive controls and collision handling
- Scrolling animated background (clouds, grass)
- Particle effects when collecting prompts
- Menus: start screen and game over screen
Here’s how Amazon Q CLI helped directly during development:
TaskAmazon Q Prompt UsedImplement gravity jump
"How to apply gravity in a Pygame jump?"
Add falling objects"How to create and animate falling blocks in Pygame?"
Animate sprite"How to use sprite sheets in Pygame?"
Debug crashes"Why does this Pygame object collide too early?"
Clean up code"Can you refactor this into a class-based structure?"
You can ask and iterate using
q ask "..."
in your terminal. It’s fast and contextual—perfect for live coding or prototyping.I created two versions of the game for different use cases:
A lean, core version with all essential features.
An advanced version with:
- Better animations
- Sound support
- Particle effects
- Cleaner structure
- Install dependencies:pip install pygame
- Run the game:python prompt_runner/main.py
# or for the enhanced version:
python prompt_runner/enhanced_game.py
KeyActionSPACEJumpENTERStart / RestartESCQuit game
Create
.wav
files in a sounds/
folder for:jump.wav
good_collect.wav
bad_collect.wav
game_over.wav
These will be triggered contextually during gameplay.
Customize the game easily by editing variables at the top of the file:
- Gravity, jump force
- Screen dimensions
- Game speed scaling
- Prompt spawn rate


Here are some ideas to take Prompt Runner further:
- 🔌 Integrate live Q CLI responses into the game to evaluate collected prompts in real-time
- 🌐 Add a leaderboard using Flask or Django
- 🎙 Use voice input to trigger prompt evaluation
- 🧠 Auto-generate new prompt blocks using Amazon Q’s suggestions
Prompt Runner is more than a hobby project—it’s a showcase of what’s possible when you combine Python game development with the power of Amazon Q CLI. Whether you're learning Pygame, exploring AI tooling, or just building something fun, this project makes it exciting and accessible.
Try it out. Build your version. Let AI help you create your next game.