[BUG] pause menu and time of day system #7

Closed
opened 2026-06-09 21:34:26 +02:00 by abgit · 2 comments
Owner

When you fish and play, since the "fish caught" window pauses the game, the time of day (not the hours:minutes time but the noon/night color overlay) gets out of sync and night (music and darkness) can start at around 13:00, thats bad because the rest of the afternoon is in the dark.

Also if you have the "fish caught" window open and you want to open your deck, 2 things :

  • the deck is behind the new fish
  • the game unpauses when you click "next fish" while the deck is still visible, and then when you close the deck, the game pauses hehe
When you fish and play, since the "fish caught" window pauses the game, the time of day (not the hours:minutes time but the noon/night color overlay) gets out of sync and night (music and darkness) can start at around 13:00, thats bad because the rest of the afternoon is in the dark. Also if you have the "fish caught" window open and you want to open your deck, 2 things : - the deck is behind the new fish - the game unpauses when you click "next fish" while the deck is still visible, and then when you close the deck, the game pauses hehe
Author
Owner

@abgit wrote in #7 (comment):

When you fish and play, since the "fish caught" window pauses the game, the time of day (not the hours:minutes time but the noon/night color overlay) gets out of sync and night (music and darkness) can start at around 13:00, thats bad because the rest of the afternoon is in the dark. This is fixed in an upcomming commit

Also if you have the "fish caught" window open and you want to open your deck, 2 things :

  • the deck is behind the new fish
  • the game unpauses when you click "next fish" while the deck is still visible, and then when you close the deck, the game pauses hehe
@abgit wrote in https://git.pipicaca.online/abgit/UGJ128/issues/7#issue-12: > ~When you fish and play, since the "fish caught" window pauses the game, the time of day (not the hours:minutes time but the noon/night color overlay) gets out of sync and night (music and darkness) can start at around 13:00, thats bad because the rest of the afternoon is in the dark.~ **This is fixed in an upcomming commit** > > Also if you have the "fish caught" window open and you want to open your deck, 2 things : > > * the deck is behind the new fish > * the game unpauses when you click "next fish" while the deck is still visible, and then when you close the deck, the game pauses hehe
Author
Owner

all of this is fixed by b8c8fd28ef

changelog :

  • make navMenu (and deckContainer) z-index higher than fishingInterface

  • change type of variable "UserInterface.menuUp" from boolean to int, each menu that's not the pause menu (eg "fish caught" window, deck window) increments this variable when it's shown, and decreases it when you close it, game will behave as paused if UserInterface.isGamePaused == 1 or if UserInterface.menuUp > 0

  • implement this change in all functions and nodes that need pausing (fish movements, cloud movements, tweens for time of day color overlay, process function of pond.gd)

  • fix a bug caused by previous commit : I tried to fix the bug that would make menu music the music that plays outside of paused state, when switching fast back and forth between paused/unpaused states. I thought I fixed it, and for 100% volume it worked, but the volume change did not work for music anymore, this is now fixed, see game_interface.gd function switchSong

  • fix a bug (not really a bug tbh) that would give a line length of 128 instead of default of 96 after a gameover, the function GameGlobals.restartGame() used old values, now it resets the deck and recalculates values based on an empty deck, this will be easier to maintain than whatever I wrote before (each variable one by one had to be added to the restartGame function)

all of this is fixed by b8c8fd28efd3b416d6d85d0a1fa2bedfe66bf92d ## changelog : - make navMenu (and deckContainer) z-index higher than fishingInterface - change type of variable "UserInterface.menuUp" from boolean to int, each menu that's not the pause menu (eg "fish caught" window, deck window) increments this variable when it's shown, and decreases it when you close it, game will behave as paused if UserInterface.isGamePaused == 1 or if UserInterface.menuUp > 0 - implement this change in all functions and nodes that need pausing (fish movements, cloud movements, tweens for time of day color overlay, process function of pond.gd) - fix a bug caused by previous commit : I tried to fix the bug that would make menu music the music that plays outside of paused state, when switching fast back and forth between paused/unpaused states. I thought I fixed it, and for 100% volume it worked, but the volume change did not work for music anymore, this is now fixed, see **`game_interface.gd`** function `switchSong` - fix a bug (not really a bug tbh) that would give a line length of 128 instead of default of 96 after a gameover, the function `GameGlobals.restartGame()` used old values, now it resets the deck and recalculates values based on an empty deck, this will be easier to maintain than whatever I wrote before (each variable one by one had to be added to the restartGame function)
abgit closed this issue 2026-06-10 01:25:54 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
abgit/UGJ128#7
No description provided.