๐ฎ Building a Multi-Level 2D Platformer Game Using Amazon Q (On Mac)
amazonqcli #gamedev #ai #webdev
I built a complete 10-level 2D platformer game using just prompts to Amazon Q CLI โ with full player mechanics, scoring, audio, and collision detection, all running in the browser!
๐ Overview
As part of the Build Games with Amazon Q CLI challenge, I created a multi-level 2D platformer game from scratch using JavaScript, HTML/CSS, and Amazon Q on macOS.
I didnโt manually write most of the code. Instead, I used conversational prompts to guide Amazon Q โ and it generated clean logic, structured visuals, audio support, and modular game systems. The result: a fully working game in just 1 day!
๐งฐ Tech Stack
- JavaScript
- HTML/CSS
- Web Audio API
- Amazon Q CLI (in VS Code)
- No frameworks, pure vanilla setup
- MacOS for local dev
๐ง What Amazon Q Helped Me Build
โ Player Movement + Jump
Prompt:
Create basic movement for a platformer character with jump logic and gravity.
Q generated physics-based movement with collision checks.
โ Coin Collection + Goal Activation
Prompt:
Add coin collection logic and show goal only after all coins are collected.
โ๏ธ Coins collected = score increases
โ๏ธ Goal appears only when coins = 0
โ Audio System (Web Audio API)
Prompt:
Add audio for jump, coin, and background music using Web Audio API.
AI handled browser quirks like user interaction requirements and autoplay restrictions.
โ 10-Level Progression System
Prompt:
Add a level system with 10 levels. Make it modular.
๐ฆ Each level defined with:
- Obstacles
- Coins
- Goal position
- Increasing difficulty
โ Game Over Warnings + Restart
Prompt:
Show warning if the player is inactive or fails to reach the goal.
โ๏ธ Smart warning system
โ๏ธ Restart on failure
โ๏ธ Retry with last score displayed
โ Visual Platform Customization
Prompt:
Make moving platforms stand out visually.
๐จ AI generated stylized platforms with:
- Beams
- Rivets
- Reinforcement effects
๐ Debugging & Fixes with Q
Whenever I hit an issue, I just asked Q:
โ keys not defined error
โ
Q: "Define keys object + add key listeners for Arrow/WASD."
โ Game state bugs?
โ
Q: "Fix state handling when goal reached but coins remain."
๐ Final Result
- 10 Levels
- Audio integration
- Game states (win/lose/pause)
- Score-based logic
- Modular folder with HTML/CSS/JS
- Works in browser + mobile responsive
๐น๏ธ What I loved: AI didnโt just codeโit understood game flow, logic, UI, and UX.
๐ก What will YOU build with AI?
Drop your creation with #AmazonQCLI and let's inspire each other! ๐ฅ

Top comments (1)
Amazon Q is pretty cool. I too tried it recently. ๐ค