Multiple issues with fin

A couple of (I suspect) bugs:

  • String formatting in fin causes a crash in the simulator. It works in browser, so I haven't tested too much as exporting to test is fiddly. I was trying to format in multiple variables, some with front padded characters.
  • Calling fin restarts the game, but if the screen was inverted with invert, that inversion appears to persist over to the new game. My expectation is that is should revert to the default uninverted state.

More fin issues:

  • If a song is playing, pressing any button while the fin message is displayed (once all the text is visible) makes the volume jump up.
  • The game seems to buffer input while fin is displayed, as if I have a fin called in the player's cancel event (i.e. on B press) and press B while a fin is displayed, the B press is triggered as soon as the game restarts.

Some speculation:

  • The volume might be jumping up to a full 1 value rather than whatever was set because the game is being restarted and that info unloaded?

Anyway, this is an issue for us at the moment in Resonant Tale as we have a "death knell" song (it's a single chime but is a song to make use of multiple channels) that plays on game over and the volume jump is frustrating!

Another issue worth adding here:

  • Sometimes the last character of the fin text is not displayed e.g. it will read "GAME OVE" instead of "GAME OVER". Spamming button presses possibly makes this more likely?

I've also noticed a bit more nuance with the buffering of inputs while fin is displayed as reported above. I have a game loading into a debug room where my player tile is at 12,9. If I press up on the d-pad while the fin text is displayed the game can start with the player at 12,8, as if that up on the d-pad has been processed, but the player tile is still facing downwards - something that is scripted to change to face upwards on upwards input. Either pulp is processing the up input but not running my event handlers, or some initialisation is surprisingly running after that input has been processed.