3D First-Person Shooter Game

A simple 3D FPS game built with Three.js and running on Val Town.

Features

  • First-person camera controls with mouse look
  • WASD movement controls
  • Shooting mechanics with mouse click
  • Enemy AI that follows the player
  • Health and score tracking
  • Game over screen with restart option
  • 3D environment with walls and obstacles

How to Play

  1. Click the "Click to Play" button to start
  2. Use WASD keys to move
  3. Move the mouse to look around
  4. Click to shoot enemies
  5. Avoid enemies to prevent taking damage

Technical Details

  • Built with Three.js for 3D rendering
  • Uses PointerLockControls for first-person camera
  • Implements basic physics for movement and bullets
  • Simple enemy AI that follows the player
  • Collision detection for bullets and enemies

Project Structure

  • /index.ts - HTTP trigger entry point
  • /game/index.html - Main HTML file
  • /game/game.js - Game logic and Three.js implementation
  • /game/styles.css - Basic styling

Future Improvements

  • Add more advanced enemy AI
  • Implement different weapon types
  • Add sound effects and music
  • Create more detailed level designs
  • Add power-ups and collectibles