1 decade ago by lazer
I have a question about rhythm games with Impact - say for example I began to play a music track when the player presses Start, then triggers come up at certain points in the beat. Let's say it's a red square you have to click. What I was thinking about doing is this:
Measure how many seconds there are from the start of the song to the beat and use ig.Timer to trigger the red square spawning at that second.
However, I have not done much looking into things like how system lag affects timers and I have no idea if music has any potential to lag by any amount of time (though it would be preloaded). Before I flesh out this idea any further I'd like to see if anyone has done anything with rhythm mechanics in Impact and if there are any particular things I need to keep in mind to keep everything in sync (and most importantly if it's even possible)
EDIT: I just found another thread on rhythm games where Dom suggests syncing to ig.music.currentTrack.currentTime. However, the thread is from two years ago. Is this still a good way to go to get synchronized gameplay?
Measure how many seconds there are from the start of the song to the beat and use ig.Timer to trigger the red square spawning at that second.
However, I have not done much looking into things like how system lag affects timers and I have no idea if music has any potential to lag by any amount of time (though it would be preloaded). Before I flesh out this idea any further I'd like to see if anyone has done anything with rhythm mechanics in Impact and if there are any particular things I need to keep in mind to keep everything in sync (and most importantly if it's even possible)
EDIT: I just found another thread on rhythm games where Dom suggests syncing to ig.music.currentTrack.currentTime. However, the thread is from two years ago. Is this still a good way to go to get synchronized gameplay?