Skip to content

Conversation

@Daniel-Cortez
Copy link
Contributor

@Daniel-Cortez Daniel-Cortez commented Oct 4, 2025

This PR does the following:

  • Fixes a bug with Speed Shoes theme not replacing Invincibility theme (and vice versa) properly.
    For example, when breaking an Invincibility monitor while the Speed Shoes theme is still playing, Level theme continued playing simultaneously with the Invincibility theme.
  • Optimizes Orbinaut code
    Some of the calculations are moved out of the loop and the orbs are now updated only when the player is on ground and moving (there's no reason to update them all the time if their position haven't changed since the previous physics frame).
  • Optimizes checkpoint searching code in Player.gd.
  • Fixes a bug with the checkpoint time only being restored when respawning at the last checkpoint (for every other checkpoint the time was being reset to zero).
  • Fixes 1-up monitors not giving an extra life.
    It seems that I accidentally removed the Global.lives += 1 line when implementing MusicController, as that line was "hidden" among the other lines of code that played the 1-up jingle.
  • Makes ShieldAnimations.gd use named constants for blend modes, instead of hardcoded IDs.
  • Fixes color inconsistencies in HUD graphics.
  • Other small adjustments.

…instead of a combination of `min()`/`max()`
The X part remains zero anyway, so there's no need to multiply the whole vector.
`frame` is already an integer, so there's no reason to use `fmod()`.
…x using `range()`.

When `range()` is used to specify a loop range, the loop is compiled into optimal bytecode that doesn't actually allocate an array or even call `range()`, so using that function should be zero-cost in such cases.
`Vector2` is not an object, so we don't need to call the constructor explicitly in order to create a copy.
…sistent with white and yellow in `hud_results_text.png`)

Also fixed red and blue to be more consistent with Sonic's palette.
This also fixes a bug with the checkpoint time only being restored when respawning at the last checkpoint (for every other checkpoint the time was being reset to zero).
… code block, so it would be more obvious why exactly it won't work on player 2
It seems that I accidentally removed that line in 1a9d355, as it was inbetween the lines of the old code that played the 1-up jingle.
…y belongs to `_process()`, not `setState()`, so move it there

Also, move `setState()` before the private functions (or "underscore-prefixed" functions, to be precise, as sadly there's no concept of private functions in GDScript), while we're at it.
… theme (and vice versa) properly

For example, when breaking an Invincibility monitor while the Speed Shoes theme is still playing, Level theme continued playing simultaneously with the Invincibility theme. Hopefully this is fixed now.
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.

1 participant