How can I set up a headless version of three.js on a node server like the babylon.js-NulEngine?

Orac Bancksy
Orac Bancksy used Ask the Experts™
on
I have been working towards creating a multiplayer three.js fps game and am planning to only do client-side prediction in the browser. On the other hand, I am using Node.js Express.js and Socket.io for the authoritative server-side implementation of the multiplayer game and would like to check collision server-side.

Using three.js or external libraries, what are the possible options to create a headless version of the game state like the babylon.js-nullengine and calculate raycasting collision on the server-side?

Similarly, how do three.js multiplayer io-based games keep track of game states server-side and do bullet and movement collision?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Three.js is a graphics rendering library and does not do collision detection.

You need something else for that, here some possibilities

http://chandlerprall.github.io/Physijs/
http://schteppe.github.io/cannon.js/
https://github.com/kripken/ammo.js

RayCaster tutorial
http://webmaestro.fr/collisions-detection-three-js-raycasting/
https://en.wikipedia.org/wiki/Ray_casting

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial