
🕹️ Building a Ping Pong Game Using Amazon Q CLI and Python
This blog is about using Amazon Q CLI to build Ping Pong game in 2 player mode using pygame library and customising the game UI
Published May 28, 2025
I’ve been hearing a lot about Amazon Q CLI and was super excited to give it a try. As someone who loves experimenting with small games and tools, I figured: why not challenge myself to build a simple retro-style Ping Pong game using Python — but this time, with help from Q?
Spoiler: It turned out to be fast, fun, and surprisingly powerful.

> write python code for pong game
Within a matter of microseconds Amazon Q CLI begins to write a python program importing 'pygame' library(needs to be pre-installed!) for Ping Pong 2 player mode game.

It also pick my previously used location to save the game python file named as "pong_game.py"
Executed the game using
python3 pong_game.py
and below is the version 1 of the game in multi player mode.
- 🎟️ Player Name Input Prompt
➤ Prompts players to enter names for personalized scoreboards and victory messages. - ⏯️ Pause and Resume Options
➤ Allows pausing withP
and resuming withR
for uninterrupted gameplay control. - 🎱 Realistic 3D Ball Movement
➤ Ball now features lifelike spin, bounce, and depth for a true-to-life experience. - 🧱 Brick-Like Boundaries
➤ Game edges are styled like retro brick walls for a nostalgic visual upgrade. - 🎾 Green Tennis Court Background
➤ The background mimics a classic tennis court for a familiar sporting feel. - 🕸️ 3D Black Net Design
➤ Redesigned net adds depth with a sleek black 3D appearance. - 🏅 Player Name Display on Victory
➤ The winning player’s name is displayed boldly at the end of the match.




Below are the prompts used to customize the game.
> let the ball be a real ball, player 1 sliding be in green and sliding 2 in red. First person to reach 5 point is the winner
> add an option to pause and resume the game. The divider of the screen look like a realistic 3D tennis net black in colour
> make the net more realistic
> make the boundaries with brick in brown colour and background to dark green
> change both the player paddles in white colour
> prompt to enter the player names and while announcing the winner the ball need not be displayed
> display player name in both the top corners, there should be proper spacing between player name and score. Paddles should not touch the bricks
We've witnessed how Amazon Q CLI can significantly accelerate the process of building game applications—but that’s just the tip of the iceberg. Amazon Q CLI is packed with powerful features that extend far beyond development. It seamlessly integrates with your AWS accounts, offering tremendous value for cloud and platform engineering teams. Whether it's generating Lambda function/Glue code snippets, extracting CloudWatch logs for analysis, or assisting with infrastructure tasks, Q CLI is built to boost productivity.
What’s more, the addition of MCP (Multi-Channel Processing) capabilities makes it even more versatile, unlocking a wide range of new use cases.
Before wrapping up this blog, it’s worth mentioning that I also used Amazon Q CLI to summarize our entire game development journey—and its ability to retain and understand conversation history is genuinely impressive.
> Could you summarize the discussions we had while building the pong game in 10 lines?

Download the code, run it, and customize it. Start playing, do comment how excited it is to customize the game.
GitHub Repo: https://github.com/naveendev/PingPong-QCLI