TheYellowArchitect / doubledamnation

Exclusively Co-Op Metroidvania with Movement as smooth as Smash Bros Melee
GNU General Public License v3.0
19 stars 2 forks source link

"up" pillar to resynchronize properly #16

Open TheYellowArchitect opened 2 years ago

TheYellowArchitect commented 2 years ago

When you cast "up" while desynchronized, pillar shows only on you. That is a good thing. However, on resynchronization, I kill all pillars, otherwise real desync would happen. Ideally, on resynchronization, the pillars while desynced would merge in the same game.

Let's see at an example. You cast "branch" You move away from the other player, and mage casts "up" Both players have 1 pillar (different position) When you cast "link", both players should have 2 pillars, adding the pillar of the other player.

Code-wise, I would have to refactor how "up" works for netcoding, as currently, it is a hack on "wait some frames, then relocate", instead of truly creating a new pillar. The important classes to refactor:

Ideally, you would mark which pillars were made on desynchronization, and send to the other player to create these pillars alongside their positions.