Hard Light Productions Forums

General FreeSpace => Multiplayer => Topic started by: SSJDiVaD on April 21, 2020, 09:51:16 am

Title: Horrible hit detection on LAN?
Post by: SSJDiVaD on April 21, 2020, 09:51:16 am
Hi all,
I was just playing FS2 MediaVPs 4.2.2, trying to go through the original campaign missions in a 2-player co-op over LAN. (I freshly installed Retail FS2, and knossos, on both PCs.) I noticed that the hit detection was pretty horrible. For example, on my screen, I'd hit my burners to close within 100m of an enemy fighter, hit them 50 times, but none of the hits counted on my partner's screen (my partner was host) and my target's shields/health never dropped. I'd like to ask, is this normal/expected for FS2 LAN?

In case you're wondering, I followed the suggestions posted in the FAQ post (eg. I set my connection type to LAN in the "multi" settings).

Additional detail: I got a warning that "one or more players is using hacked data tables" or something. Is that expected as well (given that both installations are fresh)? I figured it might come along with MediaVPs, but not sure.

Thanks!
Title: Re: Horrible hit detection on LAN?
Post by: wookieejedi on April 21, 2020, 09:54:06 am
That bad hit detection is normal indeed, and actually one of the SCP coders Cyborg is working very, very hard on updating it. Hacked data tables is also a normal thing that happens in my tests.
Title: Re: Horrible hit detection on LAN?
Post by: SSJDiVaD on April 21, 2020, 10:01:01 am
Wow, I didn't expect a reply that quickly. Thanks! And kudos to Cyborg.

I understand the game's code is written in C++, right? I have a limited amount of experience with C++ myself, but unfortunately no experience writing net code. Do you (or anyone else) think it might be worth me looking into pitching in to help?
Title: Re: Horrible hit detection on LAN?
Post by: wookieejedi on April 21, 2020, 10:29:53 am
Yeah, happy to help. Indeed, Cyborg has put in a massive amount of time and energy into working on updating it. The code is C++, I would say that's a question that Cyborg has to answer regarding extra help. In any case it's always great to have enthusiastic folks helping keep up motivation!
Title: Re: Horrible hit detection on LAN?
Post by: Cyborg17 on April 21, 2020, 08:12:54 pm
What I'm trying to do is a little involved.  It looks like it basically works, but I am doing some bugfixing and trying to some edge cases before asking people to beta test the whole thing. If you want I can PM you a build that has just improved object update packets and see if that has a significant impact on primary accuracy, while I try to finish implementing primary shot rollback.

Wookieejedi, it would be the same one I sent to you.
Title: Re: Horrible hit detection on LAN?
Post by: Mongoose on April 21, 2020, 11:53:32 pm
Wow, I didn't expect a reply that quickly. Thanks! And kudos to Cyborg.

I understand the game's code is written in C++, right? I have a limited amount of experience with C++ myself, but unfortunately no experience writing net code. Do you (or anyone else) think it might be worth me looking into pitching in to help?

Even if you can't help with net code, the Source Code Project is always looking for people willing to help with squashing bugs and writing new features. :)
Title: Re: Horrible hit detection on LAN?
Post by: SSJDiVaD on April 26, 2020, 01:37:56 pm
Wow, I really need to enable notifications.

Re Cyborg, I'd love to try! Naturally, I could give you some detailed feedback on my experience with it.

Just to add more detail to my original post: I feel like host and client are never properly sync'd, even from the start. For example, in The Place of Chariots, I've found that even shooting at stationary cargo containers doesn't register hits on the host machine, even if I can see my primary projectiles hitting them and I can see the particle effects on my own screen.

To my limited knowledge, this suggests that host and client started in different states (eg. xyz coordinates of the players and/or other objects were different on the different machines). My guess is that the net code is designed in such as way that the host sends relative updates (eg. "the target moved with vector [x_delta, y_delta, z_delta]") to the client(s), but never sends any "key frames" which guarantee a global sync (eg. disregard what the clients had before; the exact coordinates of the target are now [x_pos, y_pos, z_pos]), in case host and client de-sync'd.

If that's the case, sending more frequent (relative-only) updates is unlikely to solve the problem, because it won't fix the fact that host and client were never in sync in the first place. I feel like the only way to solve this problem is to occasionally send "key frame" absolute updates, which would enforce the reality seen by the host on all clients. But again, I know basically nothing about this stuff other than my own limited experience playing multiplayer games.

I suppose another alternative would be to allow the clients to calculate their own hit detection, and then just tell the host "I just hit this target" when a hit occurs client-side. But of course, this might be undesirable for the obvious cheating reasons.

PS. I'm a casual DBZ fan. The dub I watched here in Canada called them Androids. I suppose you watched a different dub that called them Cyborgs? I understand that "Androids" was a bit of a mis-translation.
Title: Re: Horrible hit detection on LAN?
Post by: Rylek on June 27, 2020, 01:38:04 pm
Hello,

My buddy and I tried to play through some Coop campaigns in FSPort last night and while everything appeared to be working great, none of his hits seemed to be registering. (I was host)  I don't know if there was any progress made on helping with this issue or if its a lost cause but I thought I would ask since this thread seems to be the exact issue we're having.

Thanks!
Title: Re: Horrible hit detection on LAN?
Post by: General Battuta on June 27, 2020, 03:03:28 pm
Until the netcode is revised this game's multiplayer is basically a lost cause in any form, coop or pvp.
Title: Re: Horrible hit detection on LAN?
Post by: wookieejedi on June 27, 2020, 03:20:23 pm
Just posting this here for anyone not on Discord: there is being substantial work done on the netcode to improve this issue by two coders, and both are continuing their impressive work with regular private branch updates.
Title: Re: Horrible hit detection on LAN?
Post by: Cyborg17 on June 27, 2020, 06:53:45 pm
It is getting close to completion,  but some real life issues are just taking up most of my time, and there's one more bug that I am trying to track down.  I probably have enough time to post a working build and send some instructions on how to connect to the experimental standalone(s) some time in the next week.
Title: Re: Horrible hit detection on LAN?
Post by: SSJDiVaD on June 29, 2020, 01:00:11 pm
I look forward to the build! But I understand real life stuff comes first. I'm sure it will be ready when it's ready.
Title: Re: Horrible hit detection on LAN?
Post by: Rylek on July 02, 2020, 07:50:10 am
That is great to hear Cyborg!  I understand completely that things are bonkers right now and your work on this is truly appreciated.  I'd love to test out any experimental builds you have cooking whenever you get the opportunity to put them up.  :D
Title: Re: Horrible hit detection on LAN?
Post by: Colonol Dekker on July 02, 2020, 10:56:51 am
Hit detection was a bit iffy back in the original on multilayer missions like Rebel Intercept too 👍👍
Title: Re: Horrible hit detection on LAN?
Post by: General Battuta on July 02, 2020, 01:21:23 pm
Making this game playable in coop would be really good.
Title: Re: Horrible hit detection on LAN?
Post by: Rylek on July 20, 2020, 04:12:23 pm
Any word when we might see an experimental build we can test out? 

Hope everybody is doing okay and being safe.  :D
Title: Re: Horrible hit detection on LAN?
Post by: wookieejedi on July 20, 2020, 04:16:22 pm
Swing by the Discord link here https://discord.gg/pu5eDdE (https://discord.gg/pu5eDdE) and someone can probably get you hooked up.
Title: Re: Horrible hit detection on LAN?
Post by: halcyony2k on August 07, 2020, 02:32:56 pm
Hi friends, can I get in on this testing if I head over to the same discord channel? I have been waiting years for the multiplayer to be fixed. I stopped playing Freespace specifically because of how much the multiplayer sucked. I spent weeks converting single player campaigns to multiplayer campaigns hoping one day multiplayer would be feasible.
Title: Re: Horrible hit detection on LAN?
Post by: wookieejedi on August 07, 2020, 03:13:24 pm
Indeed! Just follow that link and state your interest  :)
Title: Re: Horrible hit detection on LAN?
Post by: Cyborg17 on August 07, 2020, 10:12:35 pm
Yeah. The second to last build posted on the pxo channel was apparently stable for an hour!  There's some weird bugs involving the briefing and possibly debriefing screens.  I'm working on it. : )