Hi guys. I am fighting with this since like 3 months ago.
I asked a lot of questions here regarding networking and I never get any answer.
My case is this:
I am working on a multiplayer game for coin-op.
So basically the whole system are 4 pc connected via LAN.
I want any terminal to be server or client on demand realtime.
If all the terminals are IDLE and someone hits start, then that terminal will be the server
for a game. while this terminal is setting up for the game, other terminals can press start and then will join that game. once all players are set the game will start and will close doors so no others can join, but if there are idle terminals, someone press start and creates a new game and so on…so the goal is having 1 to 4 simultaneous games running.
I struggled a lot trying to know what is going on inside the games without joining the sessions. tried with beacon plugin upd, etc…finally i created a tcp system that can establish a clean realtime communication between all terminals and work as administrator to decide who will start a new game or join an open existent one. So this part is somehow solved.
One of the big problems I am facing now is the server/clients sequence and the times it takes to work.
the only working sequence I found is like this:
server creates a session (fast, almost no time)
server opens the game map with ?listen (some seconds)
clients find sessions (F I V E S E C O N D S ! ! !)
client picks the session and joins
the above order is the only that allows me to sucessfully join the game.
once all players are set to play, I must run that sequence in that order to successfully load the game map and have all players there. it takes like 10 secs! (couple secs for open map?listen and then 5 secs for find and couple secs again for players to open the map too.
I need to know if there is some way to decrease the find time because I cant find any parameter like some findMaxTime or findTimeout.
A local LAN with just 4 computers on it cant take 5 seconds to find some sessions.
I also would like if there is another sequence that can work to make the players to join the
map anyway like this:
first terminal press start —> creates a session
other terminals press start → find the session (5 secs is ok in this case as they must select some features of the game before start the actual game)
all set ----> server opens the map with ?listen and players JOIN
is there some way to accomplish it?
I pray for some answer
Thanks!
Daniel