Ever thought Tetris needed a glow-up?
I did โ and thanks to Amazon Q Developer CLI, I didnโt just build a Tetris clone... I built Neon Tetris: an AI-enhanced, retro-themed version with brainpower, beauty, and a background track that hits you with nostalgia and chill.
This is my submission for the #BuildGamesChallenge using #AmazonQDevCLI โ a global event where developers reimagine classic games through the power of conversational AI.
๐งฉ Challenge Breakdown
๐ฏ Why I Chose Tetris
Tetris is the OG puzzle game โ timeless, addictive, and beautifully simple. But I wanted to bring it into 2025 with a twist: AI + glowing visuals + dynamic gameplay. Tetris gave me the perfect base to explore real-time logic, visual feedback, and adaptive difficulty all in one project.
๐ ๏ธ Prompting Techniques I Discovered
Instead of micro-managing each file or feature, I went high-level with prompts like:
"Build a modular Tetris game with AI helper logic that uses heuristics to suggest optimal moves. Include ghost piece, theme switching, and dynamic difficulty based on player performance."
This let Q CLI do the heavy lifting. I followed up with focused prompts like:
- "Add a performance tracker that monitors score and adjusts speed."
- "Create a theme switcher with Neon, Dark, and Retro themes."
- "Write a helper class that calculates best piece placement using heuristics."
These small conversational tweaks saved HOURS of setup and rewrites.
๐ค How AI Handled Classic Game Dev Challenges
Q CLI impressed me with:
- Clean module separation for game logic, AI, rendering, and input
- Automatically generated code that worked out of the box
- Clear comments and docstrings for most generated methods
I rarely had to fight with the code โ I was just refining it and adding polish.
๐ Automation That Saved Me Time
- Project Structure Generation: The full game skeleton (files + folders) was built in seconds
- Heuristic AI Logic: It created a scoring system using classic Tetris metrics like holes, bumpiness, and height
- Control Mapping: Auto-added standard controls + pause/restart/quit states
- Theme Manager: I just said โswitchable themesโ and it wrote the class, handled key inputs, and applied different styles. Insane.
๐ฅ Gameplay Demo
Check out the full video here! ๐ฎ๐
๐บ Watch on YouTube
๐ฎ Why Tetris?
Tetris is the ultimate retro puzzle game. Itโs simple, fast, and satisfying. But what if it evolved with AI?
With Neon Tetris, I added:
- ๐ค AI that suggests your next best move
- ๐ญ Switchable themes (Neon, Dark, Retro)
- ๐ Dynamic difficulty based on player skill
- ๐ป Ghost piece to preview hard drops
- ๐ต A peaceful Tetris piano + lullaby remix soundtrack
Built using Amazon Q CLI, this was about more than just coding โ it was about prompting.
๐ฌ Prompting the Game into Existence
Hereโs an example of what I told Q CLI:
โCreate a modular Tetris game with an AI Helper. The AI should recommend the best position for the current piece based on heuristics like aggregate height, complete lines, holes, and bumpiness. Add a ghost piece, dynamic difficulty, theme switching, and modular file structure.โ
Q CLI broke this down into a full project with:
๐ main.py โ Game loop & inputs
๐ game.py, board.py, tetromino.py โ Core Tetris mechanics
๐ ai_helper.py โ Heuristic-based AI recommendation engine
๐ theme_manager.py โ Multiple themes with switch key
๐ performance_tracker.py โ Player analytics for dynamic speed
๐ renderer.py โ Handles visuals, ghost piece, UI
๐ง The AI Helper Logic
The AI evaluates every possible move using the following heuristics:
- ๐ Aggregate Height
- ๐ณ๏ธ Holes
- ๐ Bumpiness
- โ Completed Lines
It then recommends the best move by showing a ghost piece, helping players improve their strategy.
๐๏ธ Controls
โฌ
๏ธโก๏ธโฌ๏ธโฌ๏ธ Arrow Keys: Move & rotate
๐ณ Space: Hard drop
๐
ฐ๏ธ A: Toggle AI helper
๐ค T: Change theme
๐ G: Toggle ghost piece
โธ๏ธ P: Pause
๐ R: Restart (on game over)
โ Q: Quit (on game over)
๐งต Final Thoughts
This challenge showed me that AI is no longer just a helper โ itโs a real dev partner.
Amazon Q CLI let me build something playable, clean, and smart โ just by talking to it.
Big thanks to the AWS Build Games Challenge team for making this possible.
And if you're a dev who loves building games but hates boilerplate, Q CLI is your new best friend.
๐ฎ Game on.
#BuildGamesChallenge
#AmazonQDevCLI #GameDev
#Python #PyGame #AI
#RetroGaming #MadeWithAI
๐ฆ Try It Yourself
๐ GitHub Repository:
๐ https://github.com/Kshitij-0007/Neon_Tetris
๐งฐ Requirements:
- Python 3.6+
- Pygame 2.5.2+
โก Installation:
bash
git clone https://github.com/Kshitij-0007/Neon_Tetris
cd Neon_Tetris
pip install -r requirements.txt
python main.py
Top comments (0)