Duke4.net Forums: [CODE]Multiplayer Hack/workaround for instant death on spawn on host. - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[CODE]Multiplayer Hack/workaround for instant death on spawn on host.

#1

As part of family game night, I got my son into Duke Nukem, and we were looking to play it multiplayer. Downloaded eduke32, started the match and the host would always insta-die with health at 100. That bothered me, so I tracked it down to actors.c, in G_MovePlayers around line 1227 I found this little gem.

Quote

p->pos.x = s->x;
p->pos.y = s->y;
p->pos.z = s->z - (20 << 8);

p->newowner = -1;

if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS)
{
p->ang += G_GetAngleDelta(p->ang, getangle(sprite[p->wackedbyactor].x - p->pos.x, sprite[p->wackedbyactor].y - p->pos.y)) >> 1;
p->ang &= 2047;
}


I replaced that section with

Quote

if (!(g_netServer || g_netClient))
{
p->pos.x = s->x;
p->pos.y = s->y;
p->pos.z = s->z - (20 << 8);

p->newowner = -1;

if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS)
{
p->ang += G_GetAngleDelta(p->ang, getangle(sprite[p->wackedbyactor].x - p->pos.x, sprite[p->wackedbyactor].y - p->pos.y)) >> 1;
p->ang &= 2047;
}
}


The problem is gone, and the game is playable. TX has someone doing net stuff atm, so I'll the leave the hack as is and wait for the new net code :).

This post has been edited by icecoldduke: 06 November 2015 - 09:52 PM

9

User is offline   Spiker 

#2

Cool. But you promised me Polymer running much faster for my birthdayPosted Image
3

#3

View PostSpiker, on 07 November 2015 - 03:45 AM, said:

Cool. But you promised me Polymer running much faster for my birthdayPosted Image


That's coming :).
2

User is offline   Hollywood 

#4

View Posticecoldduke, on 07 November 2015 - 10:33 AM, said:

That's coming :lol:.



Hello, could someone advise on where about these edits need to be made, or upload a copy of the relevant file(s)? I just setup Duke 3d with newest eDuke and Duke VR. When we went to play we noticed the host (myself and another tried it) were dying instantly.
I looked around for a 'fix' or a patch though did not find one.

Thanks
0

User is offline   Mark 

#5

This solution is a hack to the main program code and not a patch to be added by having an add-on file.
0

User is offline   Striker 

  • Auramancer

#6

Just wait a while. Work on the MP has continued, and this bug is already fixed. Just hasn't been merged with synthesis yet, and won't be until more progress is made elsewhere.

This post has been edited by Striker: 29 December 2016 - 04:17 PM

1

#7

View PostStriker, on 29 December 2016 - 04:06 PM, said:

Just wait a while. Work on the MP has continued, and this bug is already fixed. Just hasn't been merged with synthesis yet, and won't be until more progress is made elsewhere.

Just curious, not like I should be throwing stones in a glass house, but why hasn't the new MP code been dumped into main yet?
0

User is offline   Mark 

#8

My uneducated guess is the devs don't want to make it barely playable and then have to read all the bug reports it will generate from players about things the devs already know will need fixing. Plus the all or nothing approach makes for a bigger "release party". And secondly, the menus and procedures to play MP will change from now and when its complete. Extra work to tailor it now and later. Again, just guessing.

This post has been edited by Mark.: 30 December 2016 - 07:58 AM

0

User is offline   Tea Monster 

  • Polymancer

#9

... because, I don't know if you noticed, they can get a bit touchy on the subject.
1

User is offline   Striker 

  • Auramancer

#10

There's a lot of reasons why it isn't merged into main. Mark's got it partly right though, don't want people complaining about things, thinking it's what they're getting, when the code is quite incomplete (albeit much better than current EDuke32). Also, don't want people building mods around the new netcode until it's complete, because everything is subject to major change.

This post has been edited by Striker: 30 December 2016 - 05:11 PM

0

User is offline   Hollywood 

#11

View PostStriker, on 30 December 2016 - 04:38 PM, said:

There's a lot of reasons why it isn't merged into main. Mark's got it partly right though, don't want people complaining about things, thinking it's what they're getting, when the code is quite incomplete (albeit much better than current EDuke32). Also, don't want people building mods around the new netcode until it's complete, because everything is subject to major change.



There's something I am missing. eDuke worked online before ; is it a version issue?
0

User is offline   Micky C 

  • Honored Donor

#12

View PostStriker, on 29 December 2016 - 04:06 PM, said:

Just wait a while. Work on the MP has continued, and this bug is already fixed. Just hasn't been merged with synthesis yet, and won't be until more progress is made elsewhere.


Wait, there has actually been some work on the MP? This brightens my mood after 2016! Glad to know that nothing isn't happening (sorry for the double negative).
1

User is offline   Paul B 

#13

View PostHollywood, on 01 January 2017 - 04:20 PM, said:

There's something I am missing. eDuke worked online before ; is it a version issue?


The old multi-player code which worked previously in Eduke was the original multiplayer code. This is what worked with the original version of Duke Nukem 3D. This multi-player was perfect for local area network games. However, the Internet is now the main medium used for connecting people in games and since all players connect at different connection speeds it is this latency between the computers that cause the original net code to break. Over time people have patched the original net code to minimize the errors, however you ended up with an experience much like Duke Nukem Megaton and when you force something which it was never really intended for, it just doesn't work right.

The developers of Eduke are well aware of the older net code limitations and rather than release a broken or half baked solution they have opted to rebuild the net code from the ground up and only release the multi-player once they have been able to fully implement and test it. This saves a lot of frustration and aggravation for everyone. Their new net code will also allow players to join & leave a game mid stream and in my opinion it will be worth the wait.

I want multiplayer to work just as much as anyone.

This post has been edited by Paul B: 01 January 2017 - 05:35 PM

1

User is offline   Hollywood 

#14

View PostPaul B, on 01 January 2017 - 05:06 PM, said:

The old multi-player code which worked previously in Eduke was the original multiplayer code. This is what worked with the original version of Duke Nukem 3D. This multi-player was perfect for local area network games. However, the Internet is now the main medium used for connecting people in games and since all players connect at different connection speeds it is this latency between the computers that cause the original net code to break. Over time people have patched the original net code to minimize the errors, however you ended up with an experience much like Duke Nukem Megaton and when you force something which it was never really intended for, it just doesn't work right.

The developers of Eduke are well aware of the older net code limitations and rather than release a broken or half baked solution they have opted to rebuild the net code from the ground up and only release the multi-player once they have been able to fully implement and test it. This saves a lot of frustration and aggravation for everyone. Their new net code will also allow players to join & leave a game mid stream and in my opinion it will be worth the wait.

I want multiplayer to work just as much as anyone.


Does it state any where what version of eDuke stopped (or last used) the old multiplayer code?
0

User is offline   Striker 

  • Auramancer

#15

View PostMicky C, on 01 January 2017 - 04:56 PM, said:

Wait, there has actually been some work on the MP? This brightens my mood after 2016! Glad to know that nothing isn't happening (sorry for the double negative).


Hopefully I'm not saying more than I'm supposed to in saying this, but yes, it's being worked on, and I'm helping with bugtesting, pointing out potential issues, and making test maps and mods. A lot of progress has been made over the Holidays, it's already a considerable improvement over the official EDuke32 SVN, but it still has a ways to go before it can be considered truly playable, so OldMP is still the best option until then, but when it's done, it'll blow everything else out of the water. The person actually working on the netcode also has to deal with University, and won't be done until April, so it may be a while before anything is ready for public consumption, so it's best everyone stays patient, respectful, and doesn't pester anyone involved until it's ready and released. I'm serious about that.

View PostHollywood, on 02 January 2017 - 01:53 AM, said:

Does it state any where what version of eDuke stopped (or last used) the old multiplayer code?

Use this build for the old MP code: https://forums.duke4...-eduke32-oldmp/

Use with Meltdown (which already includes it anyway), YANG, or Dukematcher.

This post has been edited by Striker: 02 January 2017 - 08:08 AM

2

User is offline   Mateos 

#16

Hello,

Is the code reachable through some branch on the SVN repo? Or by an other mean? I would like to read some of it and compile/test it with a friend or two :lol: If it's possible!
1

User is offline   Striker 

  • Auramancer

#17

View PostMateos, on 10 January 2017 - 02:10 AM, said:

Hello,

Is the code reachable through some branch on the SVN repo? Or by an other mean? I would like to read some of it and compile/test it with a friend or two :lol: If it's possible!

No, I already said this in the thread. There's several good reasons as to why the repository is private, getting a free-for-all flood of bug reports is one of them, it would only be a hindrance and cause confusion/a lack of focus right now.

Aka. It's in a state where it would be pointless to report that certain features are missing, because a certain important piece of groundwork that would allow them to work isn't finished (but is already in the works and nearing completion). Once that groundwork is done, the general bug reports can start coming in. Right now, we're only testing for very specific things to make sure everything comes together nicely when that stuff is complete.

Hope this makes sense.

This post has been edited by Striker: 15 January 2017 - 02:54 PM

0

User is offline   Micky C 

  • Honored Donor

#18

TLDR: it's not finished so there's no point to releasing it.

I'd like to think Duke fans are amongst the most patient of the gaming community and wouldn't mind the wait (just don't mentioned betas :lol: )
0

User is offline   Striker 

  • Auramancer

#19

Also don't want to disappoint either. Better to release something that works well, and is up to snuff to other existing options. Not half-assing it and having to deal with the inevitable bitching & embarrassment of such. As someone who understand the frustration of waiting for something that never comes (not referring to the DN3D betas, I understand fully why those are on hold), if something were to happen that stalls development indefinitely (which I very highly doubt will happen at this point), I'd do everything I can to make sure it doesn't stay that way.

This post has been edited by Striker: 15 January 2017 - 03:56 PM

0

User is offline   Toasterboy 

#20

I want to play Duke coop multiplayer in VR on my LAN, so I tried integrating the above suggested code change into 4554(DukeVR is a patch for 4554 that adds Oculus sdk 1.3 support) as well as tried current svn (6437, similar change but without VR). I successfully built it, with this change. I don't think this is a complete fix... it lets you move, but the USE key still respawns you, making it useless for actual coop because you cant open doors or throw switches. It's like you're still dead. This code is supposed to knock you over when dead and probably shouldn't be bypassed.

I suspect that the actual problem is that in multiplayer something is insta-killing Duke on spawn.(or maybe Duke is spawning already dead). Perhaps a better workaround/fix would be to prevent whatever is killing Duke on spawn? Maybe we just need to enable god mode on spawn for a few seconds? Took a stab at unravelling what's going on but I'm new to the codebase and don't have my bearings in it yet, will take a while. Suggestions on some function names to break on that could be causing the death would be appreciated.

Is there any update on when the "in progress" network stack might go in? It's been in progress for years...why can't we have the old multiplayer functional while we wait? Sure it's not perfect but it's fine on a LAN.
0

User is online   Hendricks266 

  • Weaponized Autism

  #21

The proper fix for this bug has been committed, thanks to Striker.
2

User is offline   jwaffe 

#22

Sorry, probably should have replied to this sooner, I've been working on the new netcode (I also go by 75). Some RL stuff got in the way for a while but I've been working on it consistently after I graduated.

I've been working on a major fix for the netcode for a good while now, it's not done yet. The code for syncing structs (actors, walls, and sectors) is done but it's been a lot harder to integrate into the main engine than I thought. I still need to do gamevars and the player struct too, and I'm still working out the details on the best way to handle clientside actors in CON.

There's been a ton of work done but it's mostly happened in a private repo -- I haven't released anything publicly from that yet mostly because I don't want people to mess with their mods to try to work around limitations that won't be there later on (also, things might change at this point). When it gets stable enough to release, I'll let you guys know.

As for r6459 (9/27/2017) we added some quick fixes to make multiplayer a bit more functional for the time being (mostly just to fix the spawn kill glitch mentioned in the thread). It's somewhat playable but the new protocol I'm working on will take care of a lot of the desync issues when it's done.

This post has been edited by jwaffe: 01 October 2017 - 08:02 AM

12

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#23

Keep on the good work.
0

User is offline   Striker 

  • Auramancer

#24

Just letting everyone know that jwaffe (75) has been working his ass off on the Client/Server multiplayer still, and it's making a lot of progress. It's still not at a point where we need external testing, so don't bother asking for builds yet... However, I will say that now it's possible to actually carry out a Dukematch (as long as you don't switch maps), among the crazy, unpredictable, and often funny glitching that's going on (and to be expected, it's not finished yet). The important part is, it's actually at a loose definition of playable now. We're getting somewhere.

This post has been edited by Striker: 13 May 2018 - 05:32 PM

8

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options