❚Godot❙15 Thousand Object Bullet Hell Spawner❰C#❙Object Pool❱❚
The framework I'm making for any potential bullet hell games I may make in C# with Godot. Using C#, object pooling, only sprites and some other code optimizations I can get over 10k bullets at 60 FPS no problem.
► SUBSCRIBE: http://bitly.com/2OtMG9b
► Godot Playlist: https://bit.ly/2RT910T
🌟-------------------------------------------------------------------------------------------🌟
► Twitch Channel: https://bit.ly/2OqIioK
► Clear List: https://bit.ly/37mDeuc
🌟-------------------------------------------------------------------------------------------🌟
🌟-------------------------------------------------------------------------------------------------------------------------------------------------🌟
I'm currently making this in C#, I have considered using the GPU method with shaders with which I could easily get over 2 million bullets instead. The problem I have with that is the GPU to CPU collision, I think I've figured it out, but my current method causes a memory leak.
image = GetViewport().GetTexture().GetData();
image.Lock();
getPixelColor = image.GetPixel((int)playerPos.x,(int)playerPos.y);
The problem is the GetViewport().GetTexture().GetData(); part, it causes a memory leak, eventually crashing the game. Haven't really found a solution for this yet, was wondering if anyone perhaps has any ideas?
Regarding the spawner, it takes bullets from the bullet pool, and "spawn them in" based on a number of parameters. Currently I have the following paramaters (and more if I forgot anything): Bullet count, bullet scale (x, y), current angle, spawn X and spawn Y, the angle increment, the shot arc, the bullet speed, a timer for how often to fire the attack, bullet curving, bullet acceleration (includes negative acceleration), bouncing bullets, spawner movement, spin time and spin reversal for angle increment, sine waves, paramaters for RNG, slight RNG and static attacks, multiple arrays of bullets within one spawner.
That's the circular spawner, for the wall spawner I also have the ability to spawn from all 4 walls, and define from what points they spawn in, and if the position there also changes.
I also have a spawner for polygons, where you can define the amount of edges and bullets per edge (so you can make triangles, squares, pentagons, hexagons etc...) and a different spawner for star polygons. Will probably make more of those for different polygon shapes, although realistically I can make any shape I want with the current system (in code, the editor only has the ones I mentioned so far, and of course I had to code that in myself in C# so it works in the editor).
The art and the music are not mine, but it's all public domain, and I will still link it below. I did however make the bullets myself, let me know what you think, I tried to make them look as good as possible. I also made the fog effect. And do note that this is just me testing the framework, anything I may make with this will probably look very different in the end.
🌟-------------------------------------------------------------------------------------------------------------------------------------------------🌟
🌟-------------------------------------------------------------------------------------------🌟
Assets used:
Music: https://opengameart.org/content/awake-megawall-10
Background: https://opengameart.org/content/warped-city
Ship: https://jonathan-so.itch.io/creatorpack
Everything else is by me.
🌟-------------------------------------------------------------------------------------------🌟
#Ythundyth
Other Videos By Ythundyth
Other Statistics
Counter-Strike: Source Statistics For Ythundyth
Ythundyth currently has 4,377 views spread across 1 video for Counter-Strike: Source. Less than an hour worth of Counter-Strike: Source videos were uploaded to his channel, making up less than 0.01% of the total overall content on Ythundyth's YouTube channel.