Modifications to network packets?

Talk about multiplayer ZDoom games here.
Forum rules
Image

Modifications to network packets?

Postby LanHikariDS » Sat Jan 16, 2016 12:01 pm

Through some experimentation, I've learned that ZDoom typically uses a minimalistic approach to multiplayer packets, essentially just streaming live Demo files for the other player's movement, which is susceptible to desyncs in certain environments. For vanilla Doom, and possibly ZDoom in it's early days, I could understand this being used, as it's great for low-speed internet connections that were common around that time, and worked for the primitive engine. Is there any way to have ZDoom sync up players' X/Y coordinates every few tics, instead of streaming their button inputs, to iron out some of these desyncs? If not, are there any other source ports that use this method? I have a neat Cooperative map idea that desyncs commonly with the 'Demo Streaming' method.
User avatar
LanHikariDS
Some people call these demons, I call them bitches.
 
Joined: 05 Aug 2015
Location: Playing in the snow

Re: Modifications to network packets?

Postby edward850 » Sat Jan 16, 2016 3:11 pm

LanHikariDS wrote:Through some experimentation, I've learned that ZDoom typically uses a minimalistic approach to multiplayer packets,

Or you could have checked the Doom wiki or just asked. That was a waste of time, wasn't it?

LanHikariDS wrote:essentially just streaming live Demo files for the other player's movement, which is susceptible to desyncs in certain environments.

Not exactly. They are only susceptible in an environment that isn't designed for the data, just like demos (also calling it streamed demos is somewhat off point but whatever). As long as you design the environment to be deterministic, which Doom is, then everything is good to go. So incidentally this means you can play the most seemingly random mod for hours on end with absolutely no issues, as the data is already informationally correct.

LanHikariDS wrote:For vanilla Doom, and possibly ZDoom in it's early days, I could understand this being used, as it's great for low-speed internet connections that were common around that time, and worked for the primitive engine.

For ZDoom nowadays it's still needed, as object state changes can range at an easy 100 bytes-per-object. Incidentally, the cost of customization means you need to store and transfer the data somehow, and ZDoom outgrew any possibility of that changing.

LanHikariDS wrote:Is there any way to have ZDoom sync up players' X/Y coordinates every few tics, instead of streaming their button inputs, to iron out some of these desyncs? If not, are there any other source ports that use this method? I have a neat Cooperative map idea that desyncs commonly with the 'Demo Streaming' method.

Then you're simply not making a Doom compliant map. No, you can't resync the player positions because the data is most certainly not only reliant on that, however your bigger issue is that's not simply how Doom is designed to start with. Breaking things deliberately just leaves you with a broken thing. Design smarter, not faster.
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

Re: Modifications to network packets?

Postby LanHikariDS » Sat Jan 16, 2016 4:36 pm

edward850 wrote:Or you could have checked the Doom wiki or just asked. That was a waste of time, wasn't it?

But where's the fun in that? Besides, I wasn't explicitly trying to find out how it's netcode works, I just did while testing a concept map I made.

edward850 wrote:They are only susceptible in an environment that isn't designed for the data, just like demos (also calling it streamed demos is somewhat off point but whatever). As long as you design the environment to be deterministic, which Doom is, then everything is good to go. So incidentally this means you can play the most seemingly random mod for hours on end with absolutely no issues, as the data is already informationally correct.

By 'Environment', I meant 'Situation', my mistake.
As for calling it a streamed demo, it may not be EXACT, but it really sums up what even the Wiki says

edward850 wrote:For ZDoom nowadays it's still needed

Not exactly. Networking in gaming has evolved, and just simply relaying keyboard inputs isn't the way it has to be done anymore. Games can transmit more to other peers than was possible in 1993. Back then, it made more sense to have as little sent over the network, as the internet was still in it's infancy. Now, we could use a more modern model, where what one player transmits can be more than, "I moved in this path", for the other player's game to say "So, you picked up this and this."

edward850 wrote:Then you're simply not making a Doom compliant map.

Probably not, but that won't stop me from trying.
User avatar
LanHikariDS
Some people call these demons, I call them bitches.
 
Joined: 05 Aug 2015
Location: Playing in the snow

Re: Modifications to network packets?

Postby edward850 » Sat Jan 16, 2016 4:47 pm

LanHikariDS wrote:Not exactly. Networking in gaming has evolved, and just simply relaying keyboard inputs isn't the way it has to be done anymore. Games can transmit more to other peers than was possible in 1993. Back then, it made more sense to have as little sent over the network, as the internet was still in it's infancy. Now, we could use a more modern model, where what one player transmits can be more than, "I moved in this path", for the other player's game to say "So, you picked up this and this."

You kind of need to read why I said that instead of just pulling something out of nothing that completely missed the point. Yes of course I know a different engine can do things differently. It's kind of my job to know that. Please re-read:
For ZDoom nowadays it's still needed, as object state changes can range at an easy 100 bytes-per-object. Incidentally, the cost of customization means you need to store and transfer the data somehow, and ZDoom outgrew any possibility of that changing.

Specifically, it's 100 on average. It can be 600 at most for actors alone. and that' needs to be of every actor on the map as all are active at once. And with ZDoom's unique list-of-lists-of-lists object storage situation (inventory is just one gigantic object chain), it's almost impossible to track what needs to be contained in what without constant reserialization. Tic-selective rendering interpolation also introduces its own unique challenges for object deltas.
User avatar
edward850
[netcode intensifies]
 
Joined: 19 Jul 2005
Location: New Zealand

Re: Modifications to network packets?

Postby LanHikariDS » Sat Jan 16, 2016 4:52 pm

Okay, fine *Doesn't care enough to argue*
User avatar
LanHikariDS
Some people call these demons, I call them bitches.
 
Joined: 05 Aug 2015
Location: Playing in the snow

Re: Modifications to network packets?

Postby NeuralStunner » Sun Jan 17, 2016 11:54 am

Then this thread is really pointless, isn't it? :?
User avatar
NeuralStunner
Worldcrafter
 
 
 
Joined: 21 Jul 2009
Location: A Dynamic Link Library
Discord: NeuralStunner#1293

Re: Modifications to network packets?

Postby wildweasel » Sun Jan 17, 2016 12:38 pm

NeuralStunner wrote:Then this thread is really pointless, isn't it? :?

About as much as this post.
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest