Hi i have developed a game with cocos creator and now i want to make it multiplayer with nodejs.
I want my server can handle object create, destroy, movement and collider event like in cocos creator.
Can u tell me how to use cocos core/engine in nodejs server.
I searched and try cocos engine github but dont know how to use it ( I build it via gulp successfully, play the test unit in browser ok but dont know how to achieve my need)
You should simulate an editor environment. Search “Editor”, “process”, “electron” in the engine code to see how to achieve it. And try something like
global.Editor = {
isMainProcess: true,
versions:{}
};
process.versions.electron = "";
var em = require("./engine-master");
for(var i in cc){
console.log(i);
}
But since it is in environment, there is no node object so i cant use the Node Action rules as i want. I will research about it, but any help is so wonderful.