Skip to content

Conversation

Alrysc
Copy link

@Alrysc Alrysc commented Jul 28, 2025

Improves netplay stability compared to the patch 5 release.

  • The network times out in 20 seconds instead of 5 seconds. This helps weaker connections get through the DownloadScene.
  • Version is compared on handshake to abort if both players don't match.
  • Various netplay desync fixes, working from efforts towards this that are on the development branch.

A few miscellaneous changes were made along the way:

  • Decrossing no longer resets Custom progress. Custom progress resets in the CardSelect state instead of the combat state. The Mob battle state treats the form state as a subcombat state, but netplay currently does not. This may be important to change later, but poses no issue for now.
  • A bnDirection.h change that helps some compilers.

There is code in this PR's history that would create a new log file for the Logger every time the DownloadScene is constructed. I've removed it from the current commit, because I wasn't able to test if the methods would work on other OSes, but it could be useful to look back on in the future.

NOTE: This PR has changes coming from development up until the patch 5 release. That includes up to 55d2c2f.

Additionally, code was picked out from the following commits on development, but they were not directly pulled:

TheMaverickProgrammer and others added 30 commits January 4, 2022 21:01
…on() and set_move_direction(). fixed 1 letter-off Personal menu area name. un-auto'd my code
Allow component creation for more entity types and add is_counterable function
…ata. shaking fx is requeued if not in time freeze due to drag or applied earlier otherwise.
…ad' point in blind status used otherwise it is calculated from player height
… on chip art. Emotion window UI flicker speed adjusted. Fixed counters not appearing. Removed more auto's.
…t for swoosh::Timer which uses seconds. ESC key in battle must have app in focus to trigger. Tweaked some problems detecting and displaying combos and counter info text.
…n updates that serve to refresh the screen. Frame time objects replace swoosh timers.
…ut's in mob battle scene and network battle scene.
…s subtracted from the entity's health. updated sound font.
…her misc. Some of these need to be undone later.
…nloadScene handshake, aborts if version mismatch detected. Remove net logging from InputManager.
 help sync softlocks on scene start and shouldn't desync because inputs are not being sent yet. Bump version.
…rting and ending. CustomBarProgress is now reset in CardSelectBattleState::onStart instead of the CombatBattleState. Version bump.

The desync fixed was one where being decrossed during the turn and then not choosing a form on the following card select would cause the remote player to think you changed forms to the form at -1, which would animate and desync.

SetCustomBarProgress call moved in order to prevent progress from resetting during transitions between combat and transformation state during combat, ,such as through decross. Transformation state should not be added as a subcombat state, so this makes more sense.
Copy link
Owner

@TheMaverickProgrammer TheMaverickProgrammer left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! PR looks clean.

@TheMaverickProgrammer TheMaverickProgrammer merged commit 0e5ac1d into TheMaverickProgrammer:master Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants