Is there way to convert some part of the build.py script to work with the nodejs? Knowing the that window,document, webgl, and other things that doesn’t exist in nodejs. Since the headless server without the web browser functions.
Just guess there is way to simulate or emulator those functions in some way without breaking too much engine. Done some search but it hard with some ideas. While doing some a lot testing some leading dead end on few.
Reason is to create a co-op app for fun to test out the local play lan game.
First of all build.py - just builds JS file out of many for engine. It is “pre-process” stage, and not needed for using engine. It is used only for engine-developers.
So in order to use engine outside of tools you simply can download pre-build version: https://github.com/playcanvas/engine#how-to-build
Then you want to load playcanvas engine inside of nodejs environment, with headless browser? What purpose of that I might ask? As if you want to build stand-alone multiplayer game, then you can simply use node-webkit or electron and that is essentially a browser. Which is stand-alone, can work with playcanvas engine, and you can build it like stand-alone game. With multiplayer features utilizing powers of node.js.
For server-app you don’t need node-webkit, pure nodejs will be all you need.
And to make client-app you can use Editor. Tanx for example were built exactly that way: nodejs for server side, and playcanvas using editor for client-side.
I well I don’t know much how it code well in server side stuff yet. Learned some basic setup. Just thinking some basic idea before doing some detail work and idea testing.
Building the server side is hard work trying to best deal with the collision and trace ray on the server to prevent bug on the client side when there two are more players in the scene or some user glitch for intent.
Thinking of some turn base game or game that I am working on (Farming game).
Here the prototype build for the playcanvas physics nodejs while learning and answers.
This just a ball hitting the wall and resetting timer. It just the raw output of the server object to the client web browser. Note it just lag depend host local or web host.
Been working on trying to load the map using the json files and fail to load. I am missing something or coded wrong some how. I update the my github. It work fine without the json but seem there some thing that I need to find out how to fixed this config.json to load right.