tanQ - Retro Tank Game - built using Amazon Q CLI

 

A retro-style tank destroyer game inspired by classic Atari games. Developed entirely using Amazon Q CLI without writing any code by hand!


Getting Started

You can get this game by cloning the GitHub repository:

git clone https://github.com/kaush/tanQ.git
cd tanQ

Then simply open index.html in your browser to play!

How to Play

  1. Open index.html in a web browser
  2. Press any key to start the game
  3. Use WASD or Arrow Keys to move your tank
  4. Press SPACEBAR to fire (only one bullet on screen at a time)
  5. Use Q/E to rotate your turret
  6. Destroy all enemy tanks to advance to the next wave
  7. Avoid enemy fire and survive as long as possible


Game Features

  • Retro 8-bit graphics with authentic pixel art style
  • Multiple enemy types:
    • Red tanks (Basic): Move randomly, fire occasionally
    • Yellow tanks (Smart): Aim at player, more aggressive
    • Orange tanks (Fast): Move quickly but less accurate
    • Purple tanks (Heavy): Take 2 hits to destroy
  • Wave-based gameplay with increasing difficulty
  • Obstacle-based levels with destructible cover
  • Classic arcade scoring system
  • Leaderboard and personal high score tracking
  • Powerups drop

Controls

  • Movement: WASD or Arrow Keys
  • Fire: SPACEBAR
  • Rotate Turret: Q (counter-clockwise) / E (clockwise)
  • Toggle Sound: M key or on-screen button
  • Restart: SPACE (on game over screen)

Scoring

  • Basic Tank: 100 points
  • Smart Tank: 200 points
  • Fast Tank: 150 points
  • Heavy Tank: 300 points
  • Wave Completion Bonus: 500 points

Technical Details

  • Built with vanilla JavaScript and HTML5 Canvas
  • Created entirely with Amazon Q CLI - no manual coding required!
  • 160x192 pixel resolution (scaled 3x for modern displays)
  • 60 FPS gameplay
  • Authentic retro color palette
  • No external dependencies

File Structure

/src
  ├── main.js       - Game initialization and main loop
  ├── game.js       - Core game logic and state management
  ├── player.js     - Player tank and bullet classes
  ├── enemy.js      - Enemy tank AI and behavior
  ├── collision.js  - Collision detection utilities
  ├── audio.js      - Sound management
  ├── powerup.js    - Power-up system  
└── highscore.js - High score tracking

Development Process

This game was developed entirely using Amazon Q CLI, demonstrating the power of AI-assisted game development:

  1. The initial game concept and architecture were prompted through Amazon Q
  2. All game mechanics, graphics rendering, and AI logic were generated by Amazon Q
  3. No manual code writing was required throughout the entire development process
  4. Iterative refinements were made through natural language prompts

Source Code: The complete source code is available on GitHub


Future Enhancements

  • More sound effects and background music
  • Power-ups and special weapons
  • More enemy types and behaviors
  • Level editor
  • High score persistence
  • Multiplayer support

Enjoy the retro gaming experience, powered by Amazon Q!

Get Moving Kid

Using LoRaWAN to create screen-free outdoor games for kids.


Thinking out loud.....