/First-Car-Shooter

Multiplayer First Car Shooter (FCS) written in Threejs with server side CannonJS physics and SocketIO

Primary LanguageTypeScriptOtherNOASSERTION

First Car Shooter (FCS)

Multiplayer FCS written in Three.js, SocketIO and with client and server side CannonJS physics.

Playable Demo : https://fcs.sbcode.net

Demo

About

This is an experiment with,

  • spherical gravity
  • some CannonJS physics calculated server side, everything else calculated client side
  • uses CANNON.Trimesh for ground topography
  • multiplayer using SocketIO
  • sfx with THREE.AudioListener

Scoring

  • 10 points for shooting moons
  • 100 points for shooting other players

Commands

Desktop

  • Drive : WASD
  • Brakes : SPACE
  • Look : MOUSE
  • Shoot : Left Mouse Click
  • Respawn : R

Mobile

  • Left XY Controller : Drive, Tap to shoot
  • Right XY Controller : Look, Aim, Tap to shoot

Develop

  1. Clone Repository
git clone https://github.com/Sean-Bradley/First-Car-Shooter.git
  1. CD into folder
cd First-Car-Shooter
  1. Install TypeScript
npm install -g typescript
  1. Install dependencies
npm install
  1. Start it
npm run dev
  1. Visit http://127.0.0.1:8080

See start screen instructions for commands to Drive, Aim and Shoot

  1. Edit project in VSCode
code .

Build

  1. Build webpack production version.
npm run build
  1. Compile nodejs server script
tsc -p ./src/server
  1. Start
npm start
  1. Visit http://127.0.0.1:3000

Server script uses Express and SocketIO on port 3000

For more in depth information on some deployment options, such as SSL, Domain name & Cloud hosting, visit https://sbcode.net/threejs/nginx-host/

Support

To help support my free projects, please take a look at my ThreeJS and TypeScript Book

   https://www.amazon.com/dp/B09GYTKRCH
   https://www.amazon.co.uk/dp/B09GYTKRCH
   https://www.amazon.in/dp/B09GYTKRCH
   https://www.amazon.de/dp/B09GYTKRCH
   https://www.amazon.fr/dp/B09GYTKRCH
   https://www.amazon.es/dp/B09GYTKRCH
   https://www.amazon.it/dp/B09GYTKRCH
   https://www.amazon.nl/dp/B09GYTKRCH
   https://www.amazon.co.jp/dp/B09GYTKRCH
   https://www.amazon.ca/dp/B09GYTKRCH
   https://www.amazon.com.br/dp/B09GYTKRCH
   https://www.amazon.com.mx/dp/B09GYTKRCH
   https://www.amazon.com.au/dp/B09GYTKRCH

and my ThreeJS and TypeScript courses at Udemy, YouTube (Channel membership required) and Skillshare

This is only just the beginning of what you will create.

Course Discount Coupons : https://sbcode.net/coupons#threejs

ThreeJS and TypeScript Course