❚Godot❙Millions of Bullets❰Working Collisions❙GLES3❙GPU❱❚

❚Godot❙Millions of Bullets❰Working Collisions❙GLES3❙GPU❱❚

Channel:
Subscribers:
471,000
Published on ● Video Link: https://www.youtube.com/watch?v=P5nGh9nLkMo



Duration: 7:29
3,410 views
76


The framework I'm making for any potential bullet hell games I may make in GLES3 shaders with Godot (C# is used for some things as well). I have successfully been able to get up to 2-4 million bullets with the right conditions at 60 FPS.
► SUBSCRIBE: http://bitly.com/2OtMG9b

► Godot Playlist: https://bit.ly/2RT910T

🌟-------------------------------------------------------------------------------------------🌟
► Twitch Channel: https://bit.ly/2OqIioK
► Clear List: https://bit.ly/37mDeuc
🌟-------------------------------------------------------------------------------------------🌟



🌟-------------------------------------------------------------------------------------------------------------------------------------------------🌟
Just something I want to mention, ignore the occasional stutters in the video, it's because I set the recording bitrate way too high in an attempt to make it look as good as possible, which backfired a bit.



Much has changed since my previous C# framework here: https://www.youtube.com/watch?v=GZB21J4d75Q


Compared to before, using the GPU, I can now get far, far more bullets. Performance wise the bullets will never be an issue as any real gameplay scenario will have nowhere near millions of bullets. I have also used shaders for more than just the bullets, the background is actually a fairly resource intensive shader at the moment, this was mostly just a test to showcase what is possible, so I would probably optimize the background shader. The magic circles are also shaders, and so is The Kid's cape animation (yes, I used The Kid from IWBTG).


Another benefit this time around, although not directly as a result of shaders, is that I've improved my code significantly, by using a lot more math. Most bullet parameters are a line or two of code now.


I've also added some new parameters, such as bullets spawning a certain distance from the origin point in a circle or ellipse, gravity, tangential acceleration, aimed attacks (as demonstrated by the pattern that slowly goes inwards towards the center from the sides), orbiting behaviour and rotation of the bullets around the origin point while keeping their distance and forward velocity.



Regarding collision, for CPU to GPU, I just send the player position as a uniform to the shader. For GPU to CPU, it's a bit more complicated.
Basically what I do is I make a 2x2 pixel texture on a custom viewport (making a texture out of the entire screen every frame is simply not good for performance). Read from that texture and use get pixel. That texture moves with the center of the player. It's the hitbox. I then read the color to see if a bullet passed over the player. That way I use almost no CPU or GPU power checking for collisions. I can easily define the hitbox size using different colors and if statements.


The art is all done by me this time (except the Kid), although a lot of it is done through shaders anyway. The music is public domain and I will put a link to it below.

🌟-------------------------------------------------------------------------------------------------------------------------------------------------🌟


🌟-------------------------------------------------------------------------------------------🌟
Assets used:

Music: https://opengameart.org/content/hyperflight-racing
Everything else is by me.

🌟-------------------------------------------------------------------------------------------🌟


#Ythundyth




Other Videos By Ythundyth


2020-03-08❚Just Shapes & Beats❙Legacy ❰Hardcore❙S Rank❙No Dash❙75 FPS❱❚
2020-03-08❚I Wanna Be the Demeter❙Screen 2❰Hades Needle❱❚
2020-03-07❚Just Shapes & Beats❙Annihilate ❰Hardcore S Rank No Dash Attempt 1 Hit PB❱❚
2020-03-07❚DoDonPachi DaiOuJou❙White Label Washing Machine PB❚
2020-03-06❚Just Shapes & Beats❙Final Boss ❰Hardcore❙S Rank❙75 FPS❱❚
2020-03-06❚I Wanna Be the Demeter❙Screen 1❰Hades Needle❱❚
2020-03-05❚Just Shapes & Beats❙Try This ❰Hardcore❙S Rank❙Slow Poke❙75 FPS❱❚
2020-03-05❚Touhou Fantastic Danmaku Festival❙Stage 3 ❰Spell Card Challenges❱❚
2020-03-04❚Just Shapes & Beats❙Vindicate Me ❰Hardcore❙S Rank❙No Dash❙75 FPS❱❚
2020-03-04❚I Wanna Be the A.D.H.D❙❰One Jump Needle❱❚
2020-03-03❚Godot❙Millions of Bullets❰Working Collisions❙GLES3❙GPU❱❚
2020-03-01❚Just Shapes & Beats❙Into The Zone ❰Hardcore❙S Rank❙No Dash❱❚
2020-02-29❚Just Shapes & Beats❙Close To Me ❰Hardcore❙S Rank❙Slow Poke❙75 FPS❱❚
2020-02-29❚Just Shapes & Beats❙Unlocked ❰Hardcore❙S Rank❙Slow Poke❙75 FPS❱❚
2020-02-26❚Just Shapes & Beats❙Spectra ❰Hardcore❙S Rank❙Slow Poke❙75 FPS❱❚
2020-02-26❚Just Shapes & Beats❙The Lunar Whale ❰Hardcore❙S Rank❙No Dash❙75 FPS❱❚
2020-02-24❚Just Shapes & Beats❙Cool Friends ❰Hardcore❙S Rank❙No Dash❱❚
2020-02-23❚Just Shapes & Beats❙Lycanthropy ❰Hardcore❙S Rank❙No Dash❙75 FPS❱❚
2020-02-23❚Godot❙15 Thousand Object Bullet Hell Spawner❰C#❙Object Pool❱❚
2020-02-22❚I Wanna Defeat the Generic 50❙❰One Jump Needle❱❚
2020-02-21❚Just Shapes & Beats❙Clash ❰Hardcore❙S Rank❙No Dash❙75 FPS❱❚



Tags:
godot
godot bullet hell
godot thousands
godot millions
godot objects
godot bullet spawner
godot video
godot music
godot graphics
godot object pool
godot c#
godot 60 fps
godot sprites
godot bullet spawners
godot polygons
godot maths
godot vectors
godot code
godot cpu
godot gpu
godot spiral pattern
godot polygon pattern
godot star pattern
godot gles3
godot millions of bullets
godot working collisions
godot tangential
godot gravity