CDarrow / DXX-Retro

A source port of Descent 1 and 2, focused on quality competitive play. Uncompromising commitment to original gameplay (except where the original sucked). Based on the Rebirth project.
Other
50 stars 16 forks source link

Potential object overlap issue with robots and observers in co-op #96

Closed roncli closed 5 years ago

roncli commented 6 years ago

Currently happening in 1.4X6:

Sequence: 1) Host a co-op game in Descent First Strike level 5. Start game as the only pilot. 2) 2nd player observes first player. 3) Host should go all the way to the yellow door and aggro the cloaked lifter. 4) Hilarity ensues.

What is happening from the observer perspective is that as long as the cloaked lifter is aggro'd, the observer's camera will rapidly switch between the host's PoV and the cloaked lifter's PoV. Further, when the cloaked lifter is killed, the observer's camera will be bugged out for the rest of the level.

I have a feeling that there is either memory corruption or an incorrect object being addressed somewhere in the code that deals with robots in co-op. It would be nice to find this issue and squish it since it is quite annoying for observers.

roncli commented 6 years ago

More on this:

1) You don't have to observe the first player. Then, whenever the cloaked lifter is activated, you see its PoV. If you don't move, it's like you're observing the lifter. 2) The lifter DOES NOT ACTUALLY EXIST on the observer's end. This leads me to believe that maybe this is less a memory corruption issue and more of an object collision issue, ie: the cloaked lifter and the observer somehow are sharing the same object.

Since this doesn't actually happen if you join the game (both players see and can interact with the cloaked lifter, and handing off ownership works like a charm), I think this may be part of a larger issue similar to #88 where hosts are not sending observers enough information about the game. I'll play around with this idea and see if I can't figure this out.

CDarrow commented 6 years ago

I bet I can guess what's happening. The observer is object 8, a spot normally reserved for players in multi, and why a max of 7 can play in an observed game. It wouldn't surprise me if only 4 slots are reserved for players in coop, and object 8 is a robot. I never did test observer mode that hard in coop.

On Jan 25, 2018 1:36 AM, "Ronald M. Clifford" notifications@github.com wrote:

More on this:

  1. You don't have to observe the first player. Then, whenever the cloaked lifter is activated, you see it's PoV. If you don't move, it's like you're observing the lifter.
  2. The lifter DOES NOT ACTUALLY EXIST on the observer's end. This leads me to believe that maybe this is less a memory corruption issue and more of an object collision issue, ie: the cloaked lifter and the observer somehow are sharing the same object.

Since this doesn't actually happen if you join the game (both players see and can interact with the cloaked lifter, and handing off ownership works like a charm), I think this may be part of a larger issue similar to #88 https://github.com/CDarrow/DXX-Retro/issues/88 where hosts are not sending observers enough information about the game. I'll play around with this idea and see if I can't figure this out.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CDarrow/DXX-Retro/issues/96#issuecomment-360385027, or mute the thread https://github.com/notifications/unsubscribe-auth/AA1XBWcwVoRgNtjLEHtgW_x1yjkjMW0Oks5tOC7_gaJpZM4Rq2S0 .

roncli commented 6 years ago

Hmmm, that would make sense. So let's make the number of starts always be 8.

roncli/DXX-Retro@66af4ff is an attempt at fixing this. So far it's been working okay. This is going to get a ton of testing though.

Incidentally, this would match the solution I suggested for the starting locations problem in #4, and also nearly matches Descent 3's behavior when it comes to spawn locations.

roncli commented 5 years ago

I'm going to call this fixed for now, haven't had an issue with it yet.