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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...