lazd / DuneBuggy

A 3D multiplayer dune buggy battle game written entirely in JavaScript
Other
10 stars 5 forks source link

DuneBuggy

A 3D multiplayer dune buggy battle game written entirely in JavaScript.

Running the client

Open client/index.html in your WebGL capable browser. You'll have to run a simple webserver or enable local file access to load the models. See How to run things locally.

Controls

Accelerate: W / Up arrow / Gamepad Right trigger

Brake: D / Down arrow / Space / Gamepad Right bumper

Turn left: A / Left arrow / Gamepad left stick

Turn right: D / Right arrow / Gamepad left stick

Switch weapons: Q

Fire weapon: Control / Left mouse button / Gamepad left bumper

Nitrous: Shift / Gamepad X

Switch view: V

Toggle chase/turret camera: C

Toggle full screen: Enter

Starting a server

  1. Make sure you have NodeJS installed
  2. Do a npm install inside of server/
  3. Run node server/index.js

Technology

WebGL - Used to render the game environment

WebSockets - For real time client/server communication

WebWorkers - To ensure physics engine calculations do not block visuals

Node.js - As a server

HTML5 audio - To play sounds/music

Full-screen API - For a real desktop gaming experience

Pointer lock API - For smooth first-person style rotation of the turret

HTML5 Gamepad API - For gamepad support

Software used

Socket.IO - Socket communication for the client and server

three.js - Lightweight JavaScript 3D library

Physijs - A physics plugin for three.js that utilizes the ammo.js/Bullet physics engine

Credits

DuneBuggy couldn't have been made without the following freely available works:

Models

Dune buggy by wta

Oil tank by jo2bigornia

Walls by stuklek

Crate by Rick SL

Missile by piojoman

Barrels by PancakeMan96

Turret by Angryfly

Jet by PyrZern

Textures

Oil tank texture by DeathniteDT

Explosion by etayrien

Sounds

Missile Launch by Kibblesbob

Various sounds from Bolo © 1993 Stuart Cheshire

License

Copyright © 2013 Lawrence Davis

Licensed under the GPL license