
2D Shooter Game Built with Pygame Using Amazon Q CLI
A 2D shooter game developed using Pygame, integrated with Amazon Q CLI for cloud-based game state management and multiplayer features.
Published Jun 8, 2025
In this article, I'll create a simple top-down 2D shooter game using Pygame, a popular Python library for game development. The game features a player-controlled square that moves in four directions, shoots bullets in the direction of movement, and battles randomly moving enemies. The project leverages Windows 11 with WSL 2 (Windows Subsystem for Linux) for cross-platform development and Amazon Q CLI for code generation. This approach highlights how modern tools can streamline game development while maintaining simplicity and innovation.
Windows 11 provides a robust environment for developers, but many prefer Linux for Python development. WSL 2 (Windows Subsystem for Linux) bridges this gap by allowing Linux environments to run natively on Windows. This setup lets developers use Linux-based tools like Python and Pygame while enjoying Windows’ GUI capabilities.
Pygame is a Python library that simplifies 2D game development. It handles graphics, sound, input, and collision detection, making it ideal for beginners and prototyping.

Amazon Q CLI is a command-line interface for Amazon Q, a large language model (LLM) that generates code, writes documentation, and solves problems. In this project, Amazon Q CLI was used to generate the core game logic (player movement, shooting, enemy behavior) and write the article itself. This demonstrates how LLMs can accelerate development workflows.

- The player controls a square that moves in four directions using the arrow keys.
- Bullets are fired in the direction the player is facing. For example, if the player moves right, bullets shoot to the right.
- Enemies are randomly moving sprites (simple circles) that wander the screen.
- They disappear when hit by bullets, adding a dynamic challenge.
- The player has a health bar that decreases when enemies collide with them.
- If health reaches zero, the game ends with a game over screen.
- After the player’s health reaches zero, a simple text screen appears, displaying "Game Over" and a restart prompt.

This project demonstrates how Python, Pygame, WSL 2, and Amazon Q CLI can be combined to create a simple yet engaging game. By leveraging modern tools, developers can streamline workflows, accelerate prototyping, and focus on creativity. The game’s use of basic shapes and straightforward mechanics makes it an excellent starting point for learning game development, while its integration with Windows 11 and Linux environments highlights the power of cross-platform tools.