Keep background music (silently) playing when not inside the GUI - #169
Merged
Merged
Conversation
Instead of always starting to play the VM GUI music from the beginning, start with an offset based on time. This gives the illusion that the music continues playing while the players in not in the GUI
cubefury
approved these changes
Sep 29, 2026
cubefury
left a comment
Collaborator
There was a problem hiding this comment.
im a fan of this change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gtnh-vending-machine-music-continuity.mp4
When you open the VM just for a quick purchase, you mostly get to hear the same initial notes/beats of the track. I thought it would be more immersive if the track would continue to silently play in the background and you get to hear a different portion of it depending on when you open the GUI.
This is built upon @eigenraven's work from the GT Jukebox that added
ISeekingSound.Note that the way I implemented the calculation of the seek time just based on system time, players will typically never hear the exact beginning of the track. I could think of maybe starting the timer from the first the GUI is opened per login, but depending on how often the machine is accessed this could still lead to the player mostly only hearing the beginning of the song.
Checklist