snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.6k stars 291 forks source link

Save System (Old & New) Won't save character last position when saved in the middle of moving/tweening #962

Open breadnone opened 3 years ago

breadnone commented 3 years ago

Describe the bug Saving a game while the character is in the middle of movements will make the character not appearing after being loaded. I tried this with the default Fungus Save System and The new Save System (cherry picked from related PR)

To Reproduce Save the game when a character is tweening/moving between stages, then load the game back, the character is missing/not showing on screen.

Expected behavior Would appear at the right position

TheEmbracedOne commented 3 years ago

I know this is not really a solution to your problem the way you would prefer fixing it, but it might be worth considering working around this issue by disallowing saving while a character is moving, because saving character position the way you have in mind is probably more complicated than its worth.

breadnone commented 3 years ago

Hello, thanks for your input. But that's not a feasible solution when the game itself consists lots of tweening (moving characters, characters expression, moving UI elements, etc...)

stevehalliwell commented 3 years ago

The new save system (targeting 3.14) doesn't attempt to save positions and does not make any attempt to save tweens. It does save character state though.

Can you give more detail on the repro circumstance so I can add test case for it to the new save system.

breadnone commented 3 years ago

I should've clarified that I was using a custom command via LeanTween to make sorta like character expression. For example, when the character is happy, the portrait would jump up and down etc.

And yes those custom commands work under Fungus Stage system, with slight adjustment to it.