DEV Community

Cover image for I build a game within 15 minutes with Amazon Q CLI and AI Tools

I build a game within 15 minutes with Amazon Q CLI and AI Tools

Building a Geometry Dash-Style Game with Amazon Q and AI Tools

Overview

This guide walks through the process of creating a simple Geometry Dash-inspired game using Amazon Q, Bedrock, and various creative tools. The main steps include:

  • Drafting a game idea and refining it into a structured prompt using Bedrock (Claude 3 Haiku)
  • Generating the initial game project with Amazon Q CLI
  • Enhancing visuals and audio using Figma, Stable Audio & Claude 3 Sonet, and fonts from itch.io
  • Writing a helpful README.md with assistance from Amazon Q CLI

Prerequisites

  • Amazon Q CLI installed and configured
  • Python installed on your system

Step 1: Create a High-Quality Prompt with Bedrock

To kickstart the project, I drafted my initial game idea and used Amazon Bedrock (Claude 3 Haiku) to help refine it into a well-structured prompt for Amazon Q.

My initial idea:

I have an idea of using Amazon Q to create a game with Pygame, the game style is like Geometry Dash. The player presses SPACE to jump, R to restart the game. Include an "x2" coin that boosts speed and doubles coin collection. Provide a well-structured prompt for Amazon Q to generate the game project.
Enter fullscreen mode Exit fullscreen mode

Claude's refined prompt:

Create a 2D side-scrolling platform game inspired by Geometry Dash using Pygame with the following features and requirements:

## Game Mechanics:
- Auto-forward movement
- Jump with SPACE
- Restart with R
- Coins to collect
- "x2" power-up that doubles speed and coin value

## Technical Implementation:
- Object-oriented structure
- Classes for game manager, player, obstacles, coins, power-ups, UI

## Visuals and Controls:
- Simple geometric character
- Spikes and obstacles
- Parallax scrolling background
- Score counter and game over screen

## Additional Features:
- Sound effects and music
- Particle effects
- Progressive difficulty
- High score system

Please use modular code files and implement proper game loops, collision detection, and resource management.
Enter fullscreen mode Exit fullscreen mode

Run q chat, paste the prompt, and Amazon Q will generate a basic folder structure like the one below:

Generated folder structure


Step 2: Enhance the Game with Custom Assets

🎵 Generate a Custom Theme Song with Stable Audio

I used Claude 3 Sonet via Bedrock to generate a prompt for a custom game theme:

## Geometry Dash-Style Electronic Theme Song
- Tempo: 160 BPM
- Key: F minor
- Loop duration: 30s seamless loop
- Instruments: bright saw synth, digital tom rolls, square wave arpeggios, side-chained kick and snare, reverse cymbals
Enter fullscreen mode Exit fullscreen mode

Paste this into Stable Audio to generate a high-energy game soundtrack.

You can download my generated theme song here: Cloud Dash Song

Stable Audio Preview


🧍‍♂️ Create Custom Characters with Figma

Use Figma to draw and export a unique character sprite for your game.

Character design in Figma


🔤 Add Pixel-Style Fonts

You can find retro and pixel-style fonts on itch.io to enhance the game's visual appeal.


🛠️ Fix Bugs and Add Features with Amazon Q

Use q chat to ask Amazon Q for help with fixing bugs or extending game logic. It can assist in:

  • Debugging game logic
  • Adding new mechanics
  • Refactoring code

Also, ask Amazon Q to write your README.md file for better project documentation.


DEMO

All source code will be on my GitHub repo: Cloud Dash

Top comments (0)