Open meltzow opened 9 years ago
I have no experience in that, but I'm wondering : the server should manage interaction between players, doesn't it?
For exemple, the A-player's unit send an attack event to the server, and the server create and send a damage taken event to B-player.
It seems necessary to me to prevent crash from lags or wild disconnections, and of course cheating. But it's confuse to me and I could use some more info ☺
Le sam. 16 mai 2015 10:19, Mario Meltzow notifications@github.com a écrit :
I created a branch named "networking" in my own repository for that. First step should be, is to create a server client architecture with onboard JME networking (see http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:networking ). The client logged into the server and create events of all needed thing. The server only reports the events. In next step, another second client can connect to the server. The clients are "talking" (with events) to each other to synchronize your games.
— Reply to this email directly or view it on GitHub https://github.com/methusalah/OpenRTS/issues/66.
Yes, you are right, the server must rule the game. Thats one of the reason for https://github.com/methusalah/OpenRTS/issues/62 . I have some experience for that. I will take a smooth refactoring for that.
@methusalah should we have a central server, where the clients can logged in? It will be easier as starting the server on localhost everytime you want to play. Starting the server local should be a alternative.
Many games even run a local server when they in fact start an single-player game. I think this is a good way to do it as it treats multiplayer first and stuff like cooperative campaigns etc. will always work out of the box and not require hacking the singleplayer only code.
absolutely. That's the current plan. Thx for comment.
inspect this: https://github.com/menacher/java-game-server (MIT Licence)
Hmm, does it have to be written in Java? I guess... otherwise there would be also Raknet: https://github.com/OculusVR/RakNet
Yes its in Java. I must inspect the feactures. But RakNet is written in C++. Why we should use it?
Just if you are interested to know: https://github.com/EsotericSoftware/kryonet is also looking good. But none of them have realized tickrate support (like here described https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking )
Raknet is a very fully featured networking middleware used by several commercial games and which was only recently acquired and open-sourced by OcculusVR. So going by those credentials it should be one of the best options if java is not a strict requirement.
I created a branch named "networking" in my own repository for that. First step should be, is to create a server client architecture with onboard JME networking (see http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:networking ). The client logged into the server and create events of all needed thing. The server only reports the events. In next step, another second client can connect to the server. The clients are "talking" (with events) to each other to synchronize your games.