Skip to content

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

Notifications You must be signed in to change notification settings

devMidgard/playcanvas-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: https://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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published