Network, host lost connection - what now

Hey there,

currently i make my hands dirty with the spidermonkey network stuff. I made the tutorial and the server/client is working fine.
Now i have some Question to this.

I don’t make a server/client game like minecraft where u can connect and disconnect when ever u want. I will make a network system like in Warcraft, C&C … where u have one session for the game and if the game is over the connection will close.
I guess there is something like a server/client topology (for Warcarft) where, if the hosting player gets disconnected, another player use the role of the host.

any idea / hints how to implement this, that another user gets the host?

and is there a smooth way to run the server inside the game state? or shutdown the server if the game will be closed? i tried out something an got every time a nullpointe exception (inside the thread) after the server gets closed

1 Like

What you are looking for is a non-authoritive peer to peer implementation. Im not sure spidermonkey can work in this way.

1 Like

ok then i use the p2p way

thanks 4 the tutorial link

1 Like

hmm the tutorial was not very helpful

does someone used p2p in his game and/or has some nice libs / links / tuts for me?

1 Like