Jump to content

Replace p2p and connect to remote server


Zenok
 Share

Recommended Posts

¿How difficult could be to replace the current p2p model to a player-server communication? I was trying to figure out how the game connects from one player to another, but i don't know where to start.

I just found there is a lobby connected through xmpp and a simulation part where players sends an Engine.broadcast(). But i didn't see from where comes that JS Engine class.

I wanted to try adding a NodeJS server but i don't know if this is possible, don't know how to replace that broadcast to a socket connection

Link to comment
Share on other sites

the 0ad / pyrogenesis network protocol is based on the enet protocol, that is indeed p2p. That is based on UDP.

But the 0ad networking protocol uses a central server, the host of the match. (See also the wiki page noone wrote.)

XMPP is lobby code, but that's not essential for a multiplayer game.

Since 0ad defines its own network protocol on top of requiring enet, a NodeJS server can't run 0ad unless interacting with a 0ad binary, maybe through HTTP or a similar API...

Not sure what you wanted to achieve, probably a dedicated server I suppose.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...