I'm going to give my bits of advice here!
On rhythm games, as the name say, notes fall down at a very fixed speed. Thing is, normally, the song current playing time is what dictates when the note will hit the bottom of the screen.
For an example, note number one will hit the bottom of the screen when the music is at 0:15 seconds..
Code: Select all
note[1].y = - 15000 --this value should be in milliseconds!
Remember: objects moving down ingame needs to have their Y value added, not subtracted! Otherwise, notes would slide up instead of down.
Then, every frame, you draw the note according to the song time and making sure it hits the bottom of the screen, or your hitBar Y height...
Code: Select all
for i = 1, #notes do --for every note in your list, do
note[i]:draw(note[i].x, (note[i].y - hitBar.y + screenHeight + currentSongTime))
end
So, instead of defining the note will slide down a fixed bit every frame (which is what you're doing), to make sure it stays synchronized with the music you
must update it's position using the songTime as basis for this, otherwise,
you're gonna have a bad time.
Then later, you can worry about song timer interpolation, relaxed hitInterval, audio delays..
Now, as for the problem you're facing, this is because the interval you have to press the note is quite short i'm afraid. So, i'd start relaxing the precision the user has to have to hit the note correctly, of, say, 30ms