DEV Community

Aditya Kumar
Aditya Kumar

Posted on

🧠 Building “Memory Maze” with Amazon Q CLI and Python — A Brain-Training Game with AI Power ⚡🎮

⚡ By Aditya Kumar· #BuildOnAWS #AmazonQCLI #python #pygame #amazon_q_cli_challenge

🚀 Introduction
I recently took part in the #BuildOnAWS challenge using Amazon Q CLI, a new generative AI assistant for developers by AWS. It helps you build real-world applications with just a few prompts — and it's amazing.

Using one simple prompt, I created an addictive brain game called Memory Maze where you have to remember a disappearing path and follow it exactly. One wrong move, and you’re out.

In this post, I’ll walk you through:

  • How I used Amazon Q CLI to generate the core logic
  • How I enhanced the game with levels, sounds, score, and a timer
  • What I learned by letting AI help me code

🎯 The Idea
I wanted to make something simple, visual, and mentally engaging. So I asked Amazon Q CLI:

“Create a memory maze game using Python and Pygame. Show a path briefly, hide it, and make the player follow it. Add a timer, lives, and score.”

Within seconds, I had working game logic.
I then layered on more polish: difficulty scaling, sound effects, score tracking, and a better UI.

🧠 Game Concept
Memory Maze challenges your short-term memory.

  • The game shows you a random path from (0,0) to (5,5)
  • It disappears after a few seconds
  • You must recall and follow it step-by-step
  • If you make a wrong move or time runs out — you lose a life
  • Survive long enough and the maze gets harder!

It's like Simon Says + Mazes, with a race against the clock.⏱️🧩

📸 Game Preview
The player navigates the shown path which reflects for 3-4 seconds and follow the path to win the game under the certain countdown!!

started

path follow

winning time

Game over

🧰 Tech Stack
Technology Role
Python 🐍 Game logic and structure
Pygame 🎮 UI rendering, input, timer, and sound
Amazon Q CLI Code generation and assistance
VS Code 💻 Coding and testing environment

🧪Features
✅ Random path generation

✅ Step-by-step memory gameplay

✅ Countdown timer

✅ Lives system (3 attempts)

✅ Level progression (increased grid size and speed)

✅ Sound effects on win/loss

✅ High score saved across sessions

🛠️ How Amazon Q CLI Helped
Here’s what blew my mind:

I typed one prompt. Q CLI returned a working Python game loop, grid logic, and movement system.

Then, I refined it by asking:

  • “Add countdown timer”
  • “Play sound on wrong move”
  • “Track score and high score”

And it kept improving the code with me — just like pair programming with an expert.

Amazon Q CLI helped me:

  • Skip boilerplate code
  • Focus on creativity
  • Save time while learning faster

🏁 What I Learned

  • Generative AI can turn ideas into working prototypes very quickly
  • Q CLI isn't just for web apps or APIs — it's great for games and UI too
  • Building with AI feels less like coding and more like designing with intent

🔗 Resources
💻 GitHub: (https://github.com/TechAditya01/memory_maze_game)

🎽 Build on AWS Challenge: join the community (https://aws.amazon.com/developer/community/community-builders/)

✍️ This Dev.to post (drop a ❤️ if you liked it!)

📖 My LinkedIn post:

#buildonaws #amazon_q_cli #memory_maze #aws #codingreimagined #amazonq… | Aditya Kumar

🧠 Built with Amazon Q CLI: Memory Maze – A Game of Focus and Recall 🎮🧩   Thrilled to share my project for the #BuildOnAWS Challenge using #Amazon_Q_CLI, from AWS! 🤖⚡ I created #Memory_Maze, a brain-teasing grid game where players must remember and follow a hidden path to reach the goal without a single misstep.   All generated and refined interactively through natural language prompts with Amazon Q CLI. 💬🔥 Introducing Memory Maze — a puzzle game that tests your memory and attention. You get a quick glimpse of the correct path… and then it disappears. Can you remember it and reach the goal without a mistake? All of this was built with just a simple prompt using Amazon Q CLI. Yes, AI generated the core logic — and I customized, extended, and refined it into a complete experience. 🔥🧩 🧰 Tech Stack: Python 🐍 Pygame 🎮 Amazon Q CLI 🤖 VS Code 💻 📌 What I Did: ✅ Signed up with my AWS Builder ID ✅ Installed Amazon Q CLI & Pygame ✅ Prompted Q CLI: “Create a memory maze game using Python and Pygame. Include score, timer, lives, and level progression.” ✅ Received a working game structure — instantly ✅ Customized it: added sounds, lives, high scores, timer, and level logic ✅ Recorded the gameplay and submitted it for the challenge! 🎯 🔗 GitHub (Source Code): 👉 https://lnkd.in/dRAQdYTE 📖 Dev.to Article: https://lnkd.in/dM9gZkDX 👉 https://lnkd.in/gxaWZmNs 🔗 AWS Challenge & Community: 👉 https://lnkd.in/g4umEEah 🙌 Huge thanks to Shafraz Rahim and the #AWS team Amazon Web Services (AWS) for this awesome initiative — empowering developers to bring their creative ideas to life using the power of AI! 🧠 If you’ve ever wanted to build something fun, smart, and playable with AI… now’s your moment. Let AI handle the boilerplate — and you focus on the creativity. #CodingReimagined. #AmazonQ #AmazonQCLI #BuildOnAWS #AWSDeveloper #GenerativeAI #Python #Pygame #AWSQCLIChallenge #MemoryMaze #AIInGaming #GameDev #MachineLearning #Programming #ProjectShowcase #AWSCommunity #CodingJourney

favicon linkedin.com

🙏 Special Thanks
Big thanks to Shafraz Rahim for leading this challenge and for the amazing idea that inspired my project! 🌟

#amazonqcli | Shafraz Rahim

Build Games with #AmazonQCLI, let other developers know how you built it by writing a blog / a video and redeem a cool T Shirt. Get started from here → https://s12d.com/BGWQCLI Mouna Neelakanta | Shan-Hui Cathy Chu, PMP

favicon linkedin.com

🏷️ Tags

AmazonQCLI #BuildOnAWS #AWSCommunity #Python #Pygame #awsCommunity

Top comments (0)