If you’ve ever wanted to build a polished game quickly without spending weeks wrestling with code, Amazon Q CLI might just be your secret weapon. It’s an AI-powered command-line assistant designed to help developers write, debug, and complete projects faster — all while learning and having fun.
In this blog, I’ll walk you through how I built a complete Hangman game using Python and Pygame, with full support for categories, difficulty levels, parallax backgrounds, animations, sound effects, fullscreen toggle, pause menus, and more — all generated in under 10 minutes with the help of Amazon Q CLI. I’ll also share my GitHub repo link so you can try it out or fork it for your own projects.
Why Use Amazon Q CLI?
Before I dive into the game, here’s why I chose Amazon Q CLI:
- Speed & Productivity: The entire game codebase was generated in under 10 minutes, saving me hours of development time.
- Complex Features Made Simple: From animated parallax backgrounds to responsive UI design and sound effects, Amazon Q CLI helped me break down and implement each part seamlessly.
- Learning and Guidance: The assistant explained concepts and best practices in real-time as I built the game.
- No External Assets Needed: The game uses purely programmatically generated graphics and sounds, no external images or audio files.
What Makes This Hangman Game Special?
This isn’t your average Hangman clone. The game includes a rich set of features:
Classic Hangman rules: Guess the word before your lives run out.
Category selection: Choose from Animals, Movies, Countries, Sports, Fruits, and Cars.
Difficulty levels: Easy (8 lives, no timer), Medium (6 lives, 2-minute timer), Hard (4 lives, 1-minute timer).
Animated hangman drawing: 10 progressive hangman parts drawn based on wrong guesses.
Parallax animated background: Multi-layered scenery with moving sky, mountains, trees, birds, and clouds.
Swinging hangman pendulum: Animated when the player loses.
On-screen keyboard and physical keyboard support: Clickable neon buttons with hover/click effects and real-time input.
Clean UI with neon color scheme: Dark background with vibrant neon text and buttons, using the retro “Press Start 2P” font.
Pause menu: Press ESC to pause, with resume and quit options.
Fullscreen toggle: Press F or F11 to switch fullscreen mode on/off.
Responsive design: Adjusts to any screen size.
Sound effects: Programmatically generated sine-wave tones for button clicks, correct/wrong guesses, win, and lose events.
Color-coded countdown timer bar: Visual urgency feedback changes from green to yellow to red.
Scoring system: Tracks wins and losses per session and displays them on game over screens.
Behind the Scenes: How Amazon Q CLI Helped Me Build This in Under 10 Minutes
Instead of manually writing hundreds of lines of boilerplate, I fed the Amazon Q CLI detailed prompts specifying exactly what I wanted:
Hi Amazon Q CLI, I want to build a fully working clone of my Hangman game that includes everything I had in my completed version. Please create the complete codebase for the game in Python using Pygame.
Here’s what I need in the game without missing any detail:
1. Classic Hangman gameplay with rules, lives, and win/lose conditions.
2. Category selection (Animals, Movies, Countries, Sports, Fruits, Cars), each with easy, medium, and hard difficulty (10 words each).
3. Difficulty levels with different lives and time limits:
- Easy: 8 lives, no timer
- Medium: 6 lives, 2-minute timer
- Hard: 4 lives, 1-minute timer
4. On-screen and physical keyboard support with button states, input logic, and visual feedback.
5. Game flow from menu - difficulty - category - game screen - win/lose - restart or quit.
6. Scoring system that tracks wins/losses per session and displays them on game over screens.
7. Animated hangman drawing, with 10 parts shown based on wrong guesses.
8. Parallax animated background (sky, mountains, trees, birds, clouds) on menu screens.
9. Swinging hangman pendulum animation when player loses.
10. Clean UI design with centered layout, hover/click effects on buttons, “Press Start 2P” font, neon color scheme (dark background with vibrant neon buttons and text).
11. Word display with underscore for hidden letters and real-time letter reveal.
12. Color-coded timer with a countdown bar and visual urgency feedback (green > yellow > red).
13. Pause menu with resume/quit, activated by ESC key.
14. Fullscreen support, toggle with F or F11 keys.
15. Sound effects for correct, wrong, win, lose, and button clicks (sine-wave generated).
16. Visual effects like button flashes, overlays on win/loss/pause.
17. Responsive design that adjusts to any screen size.
18. No external image or audio assets, everything should be generated with code.
19. Use Python 3 and Pygame (with `pygame.freetype`), and standard libraries only.
Please write everything in a single project folder. Make sure it runs without errors. Provide the full working code with all modules, assets, and comments included.
It responded with a modular, clean, commented Python project that I could run immediately. It handled UI elements, animations, input handling, sound generation — everything. All this was done in under 10 minutes!
How to Run the Game
Check out the GitHub repo: https://github.com/jeraldmathewsjomy/hangman-game.git
Clone it:
git clone https://github.com/jeraldmathewsjomy/hangman-game.git
cd hangman-game
pip install -r requirements.txt
python run.py
Learnings & Takeaways
- Amazon Q CLI is an incredible boost for developers wanting to build complete projects quickly.
- Programmatic generation of assets means you avoid bulky external files and keep the project lightweight.
- Pygame combined with Amazon Q CLI can produce games with polished UI/UX features (animations, responsive design, sound).
- The ability to customize and interact with AI assistant prompts offers fine-grained control over complex feature implementations.
Next Steps
- Add online multiplayer or scoreboards
- Create a mobile-friendly version with Kivy or similar
- Open-source contributions for new categories or themes
Thank You, Amazon Q CLI!
If you want to speed up your game dev workflow or any coding projects, give Amazon Q CLI a try. It’s free to use and super powerful.
Connect with Me
PortFolio:portfolio
GitHub:github
LinkedIn:linkedin
Top comments (0)