Developing Color Runner - using AmazonQ
The game is a fast-paced, reflex-testing challenge where you control a coloured block on the left side of the screen. Using a simple input ( spacebar or touch), you have to juggle the block's colour between red and green.
Published Jan 10, 2025
Last Modified Jan 11, 2025
Games have always been a way to showcase creativity and technical skills. Recently, I developed a game with simple mechanics that not only tests reflexes but also engages the player in a visually appealing challenge. In this article, I'll share the thought process, development steps, and lessons learned from creating a color-matching game. Let’s dive into the details of this project and how you can create something similar!
Game Overview
The concept of the game is simple yet captivating:
- A colored block appears on the left side of the screen.
- Players can change its color to either red or green by pressing the spacebar (on desktops) or tapping the screen (on mobile devices).
- Randomly colored blocks approach from the right side of the screen.
- The goal is to match the left-side block’s color with the incoming block’s color.
The faster and more accurate the player is, the higher their score!
How i automated everything and build the app and deployed in 40 minutes - Using AmazonQ:
I used AmazonQ to create most of that app functions with just a single prompt, then i used it to code the loading as well as improving features like using animations at high score hits
Also to generate test cases and many more files, it was literally so easy to automate and write most of the boring things and it did it very accurately
Challenges Faced
- Input Timing: Balancing the responsiveness of the controls was critical to ensure smooth gameplay.
- Randomness: Ensuring the random colors were fair and didn’t make the game too difficult or repetitive.
- Mobile Compatibility: Handling touch events alongside keyboard inputs required additional testing and tweaks
Deployment was little bit tricky:
I told AmazonQ to analyse and tell the cheapest and the best way to host my files, it told me the best aws compatible service which was s3 in my case but also told other free alternatives that i can host which was very nice.
It created a python script and then hosted using boto3 api using infrastructure as code principle and build - copy - and gave me link of the website working additionally i used CDN to make it more reliable and to keep latency low for other regions. which was suggest buy it.
Try it here: http://color-block.s3-website.ap-south-1.amazonaws.com/
Try it here: http://color-block.s3-website.ap-south-1.amazonaws.com/