MCPcopy Index your code
hub / github.com/Sean-Bradley/First-Car-Shooter

github.com/Sean-Bradley/First-Car-Shooter @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
106 symbols 193 edges 25 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Extension points exported contracts — how you extend this code

Face3 (Interface)
(no doc)
src/client/utils/cannonUtils.ts
Face3 (Interface)
(no doc)
src/server/utils/cannonUtils.ts

Core symbols most depended-on inside this repo

load
called by 20
src/server/OBJLoader.js
update
called by 8
src/client/car.ts
getSpawnPosition
called by 6
src/client/earth.ts
spawn
called by 4
src/client/car.ts
explode
called by 3
src/client/car.ts
updateTargets
called by 2
src/client/moon.ts
dispose
called by 2
src/client/player.ts
update
called by 2
src/client/XYController.ts

Shape

Method 59
Class 42
Function 3
Interface 2

Languages

TypeScript100%

Modules by API surface

src/client/car.ts10 symbols
src/server/utils/cannonDebugRenderer.ts8 symbols
src/client/utils/cannonDebugRenderer.ts8 symbols
src/server/OBJLoader.js7 symbols
src/server/utils/cannonUtils.ts6 symbols
src/client/utils/cannonUtils.ts6 symbols
src/client/player.ts6 symbols
src/client/spring.ts5 symbols
src/client/moon.ts5 symbols
src/client/explosion.ts5 symbols
src/client/earth.ts5 symbols
src/server/server.ts4 symbols

For agents

$ claude mcp add First-Car-Shooter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page