Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intro cinematic sync #2043

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Jannify
Copy link
Member

@Jannify Jannify commented May 21, 2023

@Jannify Jannify marked this pull request as ready for review June 23, 2023 13:48
@Jannify
Copy link
Member Author

Jannify commented Jun 23, 2023

Syncing the cinematic and basic team-up/skip UI is done.

Notes on the state of this pr:

  • The intro is disabled in DEBUG by default, edit MainGameController_ShouldPlayIntro_Patch for testing
  • The intro works better with multiple lifepods but that is out of scope for this pr, mainly broken bc:
  • Interacting with the lifepod by a third player (using hatch ladder, etc.) will hard cut the intro cinematic with unknown side effects. Therefor the server should spawn one lifepod per player pair/intro cinematic and it should be locked for other players
  • We need a config options so big server can disable intro and spawning multiple lifepods

@NinjaPedroX
Copy link
Contributor

Instead of locking the lifepods, have them fall out of the sky during the intro cutscene :)

Copy link
Collaborator

@Measurity Measurity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise seems fine and working but did notice a side effect:

  • On every join you get a "press to continue" screen which is different from master branch. I don't know if this was intended and if we want it. I personally prefer not to have the screen.

Copy link
Collaborator

@tornac1234 tornac1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encountered an issue for the second player who joined.
Also my two local players didn't start the cinematic at the exact same time. Maybe it could be made so that the packet sent from the server tells them to start at a precise timing like Time.now + 3 seconds (but it would change the packet structure).
Another issue to me is the fact that a player can't just skip waiting for a partner and start the cinematic without other people (let's say a group of 3 people want to play, 2 players will see the cinematic but the other one will be stuck).
image

Copy link
Member

@dartasen dartasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine IG

@tornac1234 tornac1234 added the Area: story Related to story progression and persistence label Dec 23, 2023
@Jannify Jannify force-pushed the introCinematicSync branch 3 times, most recently from 4036467 to 700ab91 Compare January 5, 2024 00:15
- Reformat and enforce file-scoped-namespace
- Added IL logging for CodeMatcher in TranspilerHelper
# Conflicts:
#	NitroxClient/MonoBehaviours/AnimationController.cs
# Conflicts:
#	NitroxModel/MultiplayerSession/PlayerContext.cs
#	NitroxServer/GameLogic/PlayerManager.cs
Measurity and others added 2 commits November 14, 2024 22:59
# Conflicts:
#	NitroxClient/GameLogic/PlayerLogic/PlayerCinematics.cs
#	NitroxModel/MultiplayerSession/PlayerContext.cs
#	NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
# Conflicts:
#	NitroxClient/GameLogic/PlayerLogic/PlayerCinematics.cs
#	NitroxPatcher/Patches/Dynamic/uGUI_SceneIntro_IntroSequence_Patch.cs
Copy link
Collaborator

@tornac1234 tornac1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests revealed it was good apart from the critical issue below


private static void EndRemoteCinematic()
{
if (partner != null)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"partner" is not null even when the partner disconnects to fix that we can either:

  • replace: partner != null by IsPartnerValid() in the two methods
private static bool IsPartnerValid()
{
    return partner != null && Resolve<PlayerManager>().Find(partner.PlayerId).HasValue;
}
  • have the patch listen to PlayerManager.OnRemove, which might be a bit too much pain to find the right time to register and then to unregister the callback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: story Related to story progression and persistence
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants