- I made a RTS game with HTML5 (with create.js) and want to add the multiplayer part with node.js.
- I can convert the html and javascript file as .exe to run the game as a "normal" application with Web2ExeWin-v0.4.2b
- I reaserched over node.js and started some simple servers.
The Concept: The user opens the game and can start a singleplayer(without server) or the user starts a multiplayer game an can invite friends to the lobby. After that he can start the multiplayer game. Like normal for a rts game.
the Idea: To start a server ingame i must execute a "node server.js" command. Now the user will join his server and can send the data to other ingame user to join the game.
Problem: What is wrong on this idea? I can't run a cmd command from an user to open a node server because its in javascript.
What is a normal way to implement the node.js multiplayer part in javascript so that every user can create there own ingame server?