This is a submission for the Amazon Q Developer "Quack The Code" Challenge: Exploring the Possibilities
What I Built
I decided to test the capabilities of Amazon Q by building a web game. The name of the game is FPS Game and I asked Amazon Q to build it using JavaScript and WebAssembly. Here is the prompt I used to start the project:
create a a high-performance, web-based first-person 3D shooter game that leverages WebAssembly (WASM) for computationally intensive tasks and integrates AI-driven features to enhance gameplay. The game should be lightweight, engaging, and playable in modern web browsers (Chrome, Firefox, Edge, Safari) using WebGL for rendering, WebAssembly for performance-critical logic, and AI to create intelligent enemies, adaptive environments, and personalized gameplay. The game will use Three.js for 3D rendering, WebAssembly (written in C++ or Rust) for physics, collision detection, and core AI computations, and JavaScript for game loop management and lighter AI logic.
Screenshots
Home Page
Game Screen
About the project
fps-game web-based first-person shooter (FPS) game built with WebAssembly and JavaScript. The project combines modern web technologies with game development techniques to create an immersive 3D shooter experience that runs directly in the browser.
Core Features
- WebAssembly Integration: Uses Rust compiled to WebAssembly for performance-critical operations like physics, AI, and calculations
- 3D Rendering: Built with Three.js for high-quality 3D graphics
- Mission System: Comprehensive mission framework with different objective types, tracking, and rewards
- Advanced Visual Effects: Includes post-processing, PBR materials, and environment mapping
- UI System: HUD elements, mission tracking, and interactive menus
Technical Architecture
Rendering & Graphics
- Three.js-based 3D engine with custom post-processing effects
- PBR materials with features like subsurface scattering and normal mapping
- HD environment maps for realistic reflections and lighting
- Particle systems for visual effects
Gameplay Systems
- Mission System: Tracks different mission types (kill enemies, collect items, reach areas, defeat bosses)
- Weapon System: Manages different weapon types, projectiles, and damage models
- Enemy AI: Behavior trees implemented in WebAssembly for performance
- Player progression: Rank system with score tracking and rewards
- HUD components showing health, ammo, and objectives
- Mission UI with mission tracking, acceptance, and rewards
- Objective markers for navigation assistance
- Notification system for game events
Project Structure
The codebase is organized into logical modules:
/core: Core game engine and systems
/graphics: Rendering and visual effects
/level: Level management and environment
/missions: Mission creation and tracking system
/multiplayer: Networking and multiplayer functionality
/systems: Game systems like weapons and AI
/ui: User interface components
Development & Deployment
The game was built using:
- Amazon Q agentic coding
- Node.js for JavaScript bundling
- Rust with wasm-pack for WebAssembly compilation
- npm scripts for build automation
This project demonstrates the capabilities of Amazon Q in large codebases and code generation.
Demo
Explore the fps-game demo here
Code Repository
The full code repository for this project can be found here
How I Used Amazon Q Developer
I used Amazon Q to build the project from start to finish. Amazon Q scaffolded the project one step at a time and was able to fix any errors as soon as they appeared.
Top comments (0)