So for some reason I decided it'd be a good idea to put a rhythm game mini-game in my current project.
I've put together the basic gameplay. Notes fly across the screen and you can hit them if you time it right, or miss them if you don't.
Since its supposed to be like a rhythm game, everything should probably be synced up with the music. But since the game doesn't run at a consistent perfect 60 fps at all times no matter what, waiting a certain amount of frames before spawning a note in is gonna desync the game with the music.
Is there a way to get it count seconds instead of frames? Preferably down to the hundredth of a second. Or alternatively, is there a way to get the current position of the song playing and base the spawning of notes off of that instead?
I've put together the basic gameplay. Notes fly across the screen and you can hit them if you time it right, or miss them if you don't.
Since its supposed to be like a rhythm game, everything should probably be synced up with the music. But since the game doesn't run at a consistent perfect 60 fps at all times no matter what, waiting a certain amount of frames before spawning a note in is gonna desync the game with the music.
Is there a way to get it count seconds instead of frames? Preferably down to the hundredth of a second. Or alternatively, is there a way to get the current position of the song playing and base the spawning of notes off of that instead?