Hello there, hope you’re having an amazing day! I was wondering, how would I align music to the bullets of a bullet hell game?
I know how to make the bullets and hazards you need to dodge, but how can I script them so they are on time?
My idea is, let’s use an example, before a spike comes out of the ground a transparent warning thing appears, so it lets the player know. How would I make sure that it shows 3 seconds before the spike appears, but the spike is still on rhythm.
How would I make a chart for this? Should I just hand-chart it by telling it what second to appear? Could I somehow chart it in studio in-game and have it save to studio code?
Yes, you would have to hand-make them. I don’t have a ton of experience with rythem games but here is my idea on how to script one.
local Music1 = {"NotePress_4","NotePress_3","NotePress_2","NotePress_1"} -- Notes
local BPM : number = 120 -- Beats per minute
local function Create_Note(NoteLane : number) -- makes a note in the lane
warn(NoteLane)
end
for index , value : table in Music1 do task.wait(60 / BPM) -- waits the bpm
local Lane = string.split(value,"_")[1]
Create_Note(Lane)
end
Oh, I see now! Sorry, I was a little confused about the game and how to play it. Correct me if I’m wrong but, bullet hell is where you go around a circle dodging objects and clicking to go in different directions. Are you trying to have music played in rhythm with the objects?
I imagine the easiest way to do this would be to analyze the music. First, you can take the BPM. That could be your base-line for the standard projectiles. Then, in any audio software (such as Audacity, that one’s free) you could look at the amplitude of the audio. A spike means an increase in volume, which probably means you’d want to fire it there. Then you just chart those times…
Note: this might be easy, but it is definitely tedious. With some simple programming you could probably write some python code to automatically analyze an audio file for you, to find any place where the amplitude changes heavily in a short timespan.
Well with the complexity of Bullet hell you would have to make it so you can easily make stages and enemies (Plugins or etc). Once you have done that I would still use a loop through a table to make enemies and other effects as I showed above. The enemies would be in line with the BPM. You also would have to make your own bezier curves so the enemies can move smoothly.
So I suppose what you are saying is that I should analyze the music, and save that all somewhere – all the “beats” and then write that into every object that will be shot?