Open entry netgame spawning

Moderator: GZDoom Developers

Post Reply
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am
Contact:

Open entry netgame spawning

Post by Mr.Rocket »

Hi,

Is it possible to have it so player(s) can freely join a network game that is already in progress?
Instead of all clients connecting when the server is started and only then.

Thanks
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: Open entry netgame spawning

Post by Kate »

Dear Mr. Rocket:

Zandronum.

Signed, Kate.
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am
Contact:

Re: Open entry netgame spawning

Post by Mr.Rocket »

Hello, Kate

Thanks for the reply!
Yes I know about Csdoom, Zdaemon, Skulltag and Zandroum.
But I'm asking this about Zdoom.

Best wishes, Mr.Rocket
User avatar
Hellser
Global Moderator
Posts: 2787
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: Open entry netgame spawning

Post by Hellser »

Dear Jeff Foxworthy Mr. Rocket,

It is unlikely ZDooM would ever have join-in-session.

Signed, Hellraiser.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: Open entry netgame spawning

Post by Kate »

Well, the problem here is that the netcode is completely different. The way ZDoom works is analogous to the vanilla Doom, where it relies on everyone's machines being sychronized at game start, transferring things like random number generator seeds and player information at the beginning of the game.

This makes it inherently impossible to add mid-game joining because any newly-connecting computers will be completely unaware of what kind of state the level is in (among other things, like players, etc.), because that sort of thing cannot easily be transferred on-the-fly without a true a server/client structure, because that sort of thing is never transferred in the first place. All ZDoom sees are the other players' movements, and that's it.

This is exactly the reason that games are possible to go completely out of sync to the point of being hopelessly irrecoverable without doing some magic involving command-line saves.

Hopefully this should shed some light on the situation.
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am
Contact:

Re: Open entry netgame spawning

Post by Mr.Rocket »

Hi, and good evening Hellraiser.

It has come to my attention that it could be possible
for such an implementation based on Dos Doom
as such netcode structures that derived after the point
of its development.
However my concerns are now why, and why not?

I do not look like Jeff Foxworthy, I look more like Jesus.

Regards, Mr.Rocket
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am
Contact:

Re: Open entry netgame spawning

Post by Mr.Rocket »

Kate wrote:Well, the problem here is that the netcode is completely different. The way ZDoom works is analogous to the vanilla Doom, where it relies on everyone's machines being sychronized at game start, transferring things like random number generator seeds and player information at the beginning of the game.

This makes it inherently impossible to add mid-game joining because any newly-connecting computers will be completely unaware of what kind of state the level is in (among other things, like players, etc.), because that sort of thing cannot easily be transferred on-the-fly without a true a server/client structure, because that sort of thing is never transferred in the first place. All ZDoom sees are the other players' movements, and that's it.

This is exactly the reason that games are possible to go completely out of sync to the point of being hopelessly irrecoverable without doing some magic involving command-line saves.

Hopefully this should shed some light on the situation.
Ah ok, yeah it does well somewhat, you see Doom Legacy was based on Dos Doom 12 years ago?
It was possible then but I'm not sure exactly the way it works either.
It could have been seriously hackore'd into place as well back then too.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: Open entry netgame spawning

Post by Kate »

I'll be honest with you. Legacy in general is a huge Gross Hack. Even SoM, the person who implemented Legacy's 3D floors, admitted that it was entirely a huge gross hack. I'm not even joking.

What they probably did was have it transfer an initial gamestate silently, like a mini-save, and hacked it together so that one of the peer connections did a synchronization. The problem is that ZDoom's internal systems are more complex than Legacy's, and relies on more than just the state of actors and floors, having to run ACS, keep track of the level sector properties, the separate name-based RNGs as well as the main RNG, writing the state of user variables, and so on and so forth.

It can be hacked in, sure, but it would probably amount to something horrendously buggy and an absolute nightmare to keep track of, and it would take a long, long time to iron out the bugs. Even then, there are still things which can desync the game even now that would have to be dealt with first because that would wind up not transferring properly and causing an instant desync on connect, and not to mention ZDoom would need a MAJOR code overhaul to allow it to switch the states of certain RNG-related and game-related variables to allow it to go from single-player mode to netgame-mode so that you can do things like connect from the console, also the ability to load saves straight off of the network stack as opposed to using files, then utilizing that code.

It's a really horribly inefficient way of doing things compared to a true CS structure.
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am
Contact:

Re: Open entry netgame spawning

Post by Mr.Rocket »

Hey

Ok, thanks for the explanation and yeah I realize that legacy had a lot of things hacked in place, though I can understand that when the code base was very old and what they had to work with back then, new and starting from scratch heh. new idea? = make it work!

Not a problem, it's just that when a game is joined at once and another is left out, it is somewhat frustrating. Though I suppose I'v been a bit spoiled by today's source engines, where as back in the day we had no choice to connect all at once in Doom.exe, sersetup, dm.exe etc.
Not a big deal, but I thought it was worth asking.

Thanks!
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”