Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.32 KB

File metadata and controls

24 lines (17 loc) · 1.32 KB

playcanvas-nodejs

A "headless" implementation of the PlayCanvas Game Engine for use in nodejs applications

dependencies

The implementation is pretty dirty, I simply create a fake window/jsdom, and nullify all WebGL required calls which is what PlayCanvas requires to run. This achieves the game engine running alongside nodejs in a "graphics-less" environment.

how to run

  1. Ensure you have NODEJS installed on your computer.
  2. Download this repository and open a Command Prompt on the directory (on windows), write "node gameserver.js" and press enter.
  3. Play the PlayCanvas Client I made as an example for this: http://launch.playcanvas.com/606346?debug=true

BE SURE TO OPEN THE CLIENT WITHOUT HTTPS, as this is a local test the server doesn't have SSL implemented and trying to connect from https will result in an unsecure operation error.

You should see a ball bouncing against a ground.

All the physics run on the server side, the client is just displaying the information.

You can see the client project here: https://playcanvas.com/editor/scene/606346