Hello, new user of Construct 2 here.
My background is programming, but not game programming nor networking. So far I really like how easy it is to use Construct 2 to put together games. Love that it also has things like dictionary objects, arrays, and functions. I think it is going to be very easy for me to make the core gameplay mechanics using Construct 2.
Having said that, I would ideally like to make the game multiplayer (doesn't every newbie?) and have some questions centered around that. Would be great if someone could help out and point me in the right direction.
1. I have the idea of there being a global variable isServer in C2. This is mostly so the game mechanics and logic can all be in the same place, and will control how messages are sent back and forth. For example, if an input message comes in and this is the server, it will execute it and return the results. If an input message comes in and it isn't the server, it will just execute it. Things like that. Then I will include with the server version an additional file that contains server only logic (networking and whatnot) and sets the global variable to true. Or I can just manually set it on after I export it. While I realize this isn't the ideal solution, it should let me keep the code together and create it within C2. Are there any potential problems with this approach?
2.a. UDP for HTML5? The game doesn't have to require instant messaging, but certain core parts would have to be reworked to better fit with a TCP solution and it would be a little less fun in the end, in my humble opinion. I see that WebSocket is included out of the box, but has anyone got a UDP solution up and running, or something similar? I saw JohnnySheffield did one that required Node-Webkit and wasn't HTML5. HTML5 is more important to us than UDP. Does anyone have thoughts on this: EmiNet. It seems good to me, but I don't know enough about this type of thing to really tell.
2.b. I see some posts about WebRTC, and combining that with node.js. I realize this would require changing the server logic some since there would be broadcasts going P2P in addition to going through a server. Any thoughts on the feasibility (and challenge) of doing something like this? I understand computers and programming, but am worried I'm missing something when it comes to networking protocols, servers, and the like.
That's all I've got for now. Love the tutorials and how easy it was to jump right in! Thanks everyone!