Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sean-bradley/first-car-shooter
Multiplayer First Car Shooter (FCS) written in Threejs with server side CannonJS physics and SocketIO
https://github.com/sean-bradley/first-car-shooter
Last synced: 1 day ago
JSON representation
Multiplayer First Car Shooter (FCS) written in Threejs with server side CannonJS physics and SocketIO
- Host: GitHub
- URL: https://github.com/sean-bradley/first-car-shooter
- Owner: Sean-Bradley
- License: other
- Created: 2022-01-07T09:22:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-22T18:13:18.000Z (3 months ago)
- Last Synced: 2024-08-22T20:27:14.633Z (3 months ago)
- Language: TypeScript
- Size: 23.3 MB
- Stars: 44
- Watchers: 3
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://fcs.sbcode.net)
![Demo](docs/demo.gif)
## 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
```bash
git clone https://github.com/Sean-Bradley/First-Car-Shooter.git
```2. CD into folder
```bash
cd First-Car-Shooter
```3. Install TypeScript
```bash
npm install -g typescript
```4. Install dependencies
```bash
npm install
```5. Start it
```bash
npm run dev
```6. Visit [http://127.0.0.1:8080](http://127.0.0.1:8080)
See start screen instructions for commands to Drive, Aim and Shoot
7. Edit project in VSCode
```bash
code .
```## Build
1. Build webpack production version.
```
npm run build
```2. Compile nodejs server script
```
tsc -p ./src/server
```3. Start
```
npm start
```4. Visit [http://127.0.0.1:3000](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/](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/B09GYTKRCHand my **ThreeJS and TypeScript** courses at [Udemy](https://www.udemy.com/course/threejs-tutorials/?referralCode=4C7E1DE91C3E42F69D0F), [YouTube (Channel membership required)](https://www.youtube.com/playlist?list=PLKWUX7aMnlEKTmkBqwjc-tZgULJdNBjEd) and [Skillshare](https://skl.sh/2uxctEP)
This is only just the beginning of what you will create.
**Course Discount Coupons** : https://sbcode.net/coupons#threejs
[![ThreeJS and TypeScript Course](docs/threejs-course-image.png)](https://youtu.be/fS4H7gm7gK4)