
Build a Game with Amazon Q CLI! 🕹️
Built an interactive English Vocabulary Flashcards Game in Python using Pygame with help from Amazon Q CLI for AI-assisted development.
Published May 27, 2025
Introduction
With the rise of generative AI, game development has become more accessible than ever. This week, I used the Amazon Q Developer CLI to create a *Vocabulary Flashcards Game*—a fun, educational tool to improve English vocabulary. As a beginner in game development, I was blown away by how Amazon Q turned a creative prompt into a fully functional game in minutes. In this blog, I’ll walk you through the process, showcase the game’s visuals, and share how you can create your own game using Amazon Q.
Prerequisite
To start, you need to install Amazon Q for CLI and Pygame:
- Install Amazon Q CLI
- Install Pygame
Building the Vocabulary Flashcards Game
After installing the Amazon Q CLI, I logged in using my AWS Builder ID:
- Register for a Builder ID
- Log in to Amazon Q CLI
- Start Coding: Run `q chat` to interact with Amazon Q.

Amazon Q generated a complete Python script in about 3 minutes, including comments and Pyodide-compatible code. I saved it as `main.py` and added sound files to `assets/sounds`.
Visuals of the Game




Playing the Game
To play:
1. Run the game:
2. Select a difficulty level (4, 8, or 12 pairs) and a vocabulary set (e.g., General, Business, Science, Travel).
3. Click “Start Game” to view the word-definition pairs briefly.
4. After the cards flip and shuffle, click two cards to match a word with its definition.
5. Complete all matches to win, then review incorrect matches in the review mode.
Game Controls
- Mouse: Click to flip cards and navigate menus.
- ESC: Quit the game.
Scoring
- +10 points for each correct match.
- -2 points for each incorrect match (minimum score: 0).
Enhancing the Game
To make the game more engaging, I asked Amazon Q to expand the vocabulary sets:
Amazon Q updated the `data/vocabulary.py` file with new sets, such as Technology, Food, and Literature, making the game more diverse and replayable.
Conclusion
Using the Amazon Q Developer CLI, I built a fun and educational *Vocabulary Flashcards Game* with zero prior game development experience. The process was seamless, taking less than 10 minutes from prompt to playable game. Amazon Q’s ability to generate Pyodide-compatible code and handle complex requirements like retro graphics and educational content is truly magical. I encourage you to try Amazon Q CLI, build your own game, and share your creations with the AWS Community Builders!