In a music game, whats the best way to spawn your notes?

XD005

Member
Hey all, me again.
Still working on this music project. I've hit a bit of a snag.
For those of you who are familiar with music games, I'm trying to implement velocity/scroll modifiers.
Currently the game's notes have a tendency to spawn on top of each other and get rather jumbled up.
I'm trying to figure out a way to keep the notes spaced out but still have them arrive to the receptors on time.
Currently this is what the note object consist of...

GML:
    x = lerp(startx, obj_discs_controller.zone1_x, timing_prog);
    y = lerp(starty, obj_discs_controller.zone1_y, timing_prog);
Timing prog is a percentage of how close the note is to it's "timing goal".

For the object that creates the notes...
Code:
//If this condition returns true, create the note
        if (global.millisecond>=note_millisecond - ( (BPS * 1000) * global.gem_speed ) )
BPS is the current Beats Per Second and then its converted to milliseconds.
So basically, I'm subtracting one beat and then applying a multiplier.
I feel like the size of the nodes should be factor in some kind of way but I don't know.
I'm sorry if this is unclear, any advise is much appreciated.
 

obscene

Member
It's hard to understand what exactly you are doing and what the problem is, so just talking theoretically here...

If I were making a music game I would be using audio_sound_get_track_position() every step and comparing that to an array or ds_list, trigger something to occur when the position passed the current list entry and then begin watching the next. I can only talk from experience regarding lip-syncing, but that's how I did it. If I were moving points from a to b based on that position, then yes I might use lerp as you have knowing the start and end track positions.
 
Top