AWS Logo
Menu
First Time Game Development - Amazon Q CLI: Space Invaders

First Time Game Development - Amazon Q CLI: Space Invaders

Follow along as I build a classic Space Invader game from scratch Using Amazon Q CLI. Join me in exploring this exciting journey of game creation using AI tool.

Published May 21, 2025
To start making the game, I first set up WSL on my Windows computer. This let me use Linux to write the code. Then, I installed Amazon Q CLI, which helped me build the Space Invaders game. I divided the game's code into smaller parts for things like how the player moves and how the enemies act. This made a working game that feels like the old arcade version. It mixed computer setup with creative coding, and Amazon Q CLI was a useful tool.
 
After Installing Amazon Q CLI on my WSL.
This is the prompt I wrote to Q CLI.
Prompt
First Prompt
As soon as I hit enter, I got complete code written in .py file

and the Amazon q provided me with the detailed explanation.
Prompt
Explanation by Q

The given explanation is so rich in nature, it covers all the aspects in details.
it added its own features as showing score on the screen and enemies coming back after reaching at the edge of the screen. wonderful!!
After this I prompted Q for generating the readme file and asked it to make the sinlge .py file into separate files for better organization.
here is the prompt I used:
it re-wrote entire application in separate files along with proper comments and generated a detailed readsme.txt file
separate files generated:
readme.txt
readme.txt
To my surprise it re-wrote its own code and shows which line it has made the changes.
for example player.py file.
before:

After when it re-wrote its own code:


And after all of the updates, Q provided updated details:

As this game is my childhood Nostalgia, I am very much excited to play with my daughter. Hope you will like it too.
Soon I will be sharing the code on my github repo.
This project helped me learn:
  1. How to use Amazon Q CLI, to make coding easier.
  2. How to organize my code so it's easy to read and use again.
I also learned how to:
  1. Break down a big problem into smaller, manageable parts.
  2. Keep my project organized with clear instructions for others (and myself!).
I would definitely recommend to try Amazon Q and I will be coming up with more interesting project in near future.
Till that time .. Keep Learning... Keep Growing!!
 

Comments