Page 1 of 1

Modifications to network packets?

Posted: Sat Jan 16, 2016 11:01 am
by LanHikariDS
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.

Re: Modifications to network packets?

Posted: Sat Jan 16, 2016 2:11 pm
by edward850
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.

Re: Modifications to network packets?

Posted: Sat Jan 16, 2016 3:36 pm
by LanHikariDS
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.

Re: Modifications to network packets?

Posted: Sat Jan 16, 2016 3:47 pm
by edward850
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.

Re: Modifications to network packets?

Posted: Sat Jan 16, 2016 3:52 pm
by LanHikariDS
Okay, fine *Doesn't care enough to argue*

Re: Modifications to network packets?

Posted: Sun Jan 17, 2016 10:54 am
by NeuralStunner
Then this thread is really pointless, isn't it? :?

Re: Modifications to network packets?

Posted: Sun Jan 17, 2016 11:38 am
by wildweasel
NeuralStunner wrote:Then this thread is really pointless, isn't it? :?
About as much as this post.