DEV Community

Marcus Chan
Marcus Chan

Posted on • Originally published at marcuscjh.Medium on

Built a Game in 2 Hours with Amazon Q

🧠 The Idea

So I was walking around AWS Summit Singapore and saw this poster:

“Build Games with Amazon Q CLI”

Score a T-shirt.

I didn’t go there planning to build a game. But I was curious what Amazon Q CLI could do. And yeah, the swag sounded fun.

So I gave myself a quick challenge:

  • ⏱ Max 2 hours
  • 🧠 Let Q CLI do most of the work
  • 🎮 End up with something that runs

🧪 My Iteration Journey (with Prompts I gave Q)

🎮 Getting the First Build Running

“Build an endless jumper game in Python using pygame.”

Q spun up a basic prototype:

  • Player block
  • Green platforms
  • Gravity
  • Score counter

It worked! But sometimes… you just drop off the screen instantly. RIP.

⛔ Bug #1 — Sudden Death

“Fix a bug where the player sometimes falls immediately when the game starts.”

This worked.

But there was another issue: once you lost, the game window just closed. No warning, no time to react.

💀 Game Over Screen + Reset

“When the player loses, show a ‘Game Over’ screen and wait for a key press before closing. Also, add a reset feature, pressing ‘R’ should restart the game.”

Q delivered:

  • Game Over screen
  • Press ‘R’ to restart

Super helpful for testing. No more relaunching the app every time I mess up.

But there was something weird, the platforms were too wide. You literally couldn’t lose. You just bounced forever.

📏 Fixing the “Can’t Lose” Bug + Adding Difficulty

“Fix the bug where when you jump further up, the platform becomes too big — like make some difficulty in the game.”

With this prompt, Q made the game more challenging:

  • Narrower platforms : You could finally miss a jump and fall
  • Scaling difficulty : Platforms spread apart

Now we’re talking. It finally felt like a game — one you could actually lose.

⚡ Adding Power-Ups

“Add a random power-up — you decide what it is — and spawn it on some platforms. Enhance the game.”

Q gave me power-ups like:

  • Double jump
  • Bigger platforms
  • Slow motion

Cool stuff — but a new bug appeared: timer kept ticking even after you lost.

🛥️ Fixing the Timer Bug

“Fix the timer — once the game ends or is frozen, the timer should stop.”

Clean fix. Timer now pauses properly during freezes and stops on game over. That wrapped it up nicely.

🧹 Final Touches

“Create a README.md for the project.”

Q generated a clean, well-written README file with usage instructions.

💡 Final Thoughts

This was a fun, focused experiment. In under 2 hours, I went from nothing to:

  • A playable endless jumper game
  • Scaling difficulty and proper fail conditions
  • A working power-up system
  • Reset and game-over mechanics
  • A complete README

No, I haven’t claimed the T-shirt yet.

But maybe this post will help.

You can find my repository here:

https://github.com/MarcusCJH/amazon-q-pygame

Top comments (0)