🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

If your rhythm game has a bug, too...

A topic by bSam created 126 days ago Views: 115 Replies: 1
Viewing posts 1 to 2

If you are making a rhythm-based game, encountered the following problem, and were hoping the solution would magically appear on this page after 5h of headache then you're in luck:

You have a looping audio Source (e.g. background music) and you use Source:tell() to get the current playing position. On the first loop cycle you get the correct position and can perform well timed actions to your music's beats. On the following cycles, though, tell() returns a position which is about 20% off the actual playing position.

Apparently this only happens if your Source 's type is static (unlike the default stream). So make sure to load it like this:

    music = love.audio.newSource("music.ogg", "static")

Though it is generally recommended to use stream for longer audio tracks, there is no other simple solution for this problem, I think.

Anyway, good luck for the remaining time!

Thanks for the info!