Making a Bullet-Hell Chart using code

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

Hope this helps!

1 Like

So . . . that’s not exactly what I am going for. Thanks though!

Have you heard of a bullet hell game?

How bullet hells work is that they are notoriously known for having tons of projectiles flying across the screen; hence the name.

Undertale is an example of a bullet hell.

I want to make a 3D bullet hell with bullets and projectiles following the beats of the music.

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?

Yup. The objects move around in rhythm to a song, and the player has to dodge them. In this case, it’s a black stage.

So I was wondering how I can make sure the bullets stay on rhythm with the actual song

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.

1 Like

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.

Does that make sense?

1 Like

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?

1 Like

That is probably one of the easiest ways to do it. You could just code the projectiles to be eight notes or sixteenth notes on beat with the BPM.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.