Typhoon Unit ~ Butterfly Requiem
banner
typhoonunitgame.bsky.social
Typhoon Unit ~ Butterfly Requiem
@typhoonunitgame.bsky.social
Side-scrolling bullet hell #shmup by @ghostlyfeline.bsky.social! Switch heroes on the fly!
Wishlist on Steam!
https://store.steampowered.com/app/1198710/Typhoon_Unit__Butterfly_Requiem/
For the ocean background, I wanted to go for a 3D look, but couldn't get GameMaker to cooperate, so I got creative with 2D layers. The water gradient is a static backdrop, while the waves and sparkles are parallax layers at different scales and speeds to simulate depth.
November 28, 2024 at 10:41 PM
Finally, I should probably also mention a technique called Object Pooling. Recycling bullets into new ones when they are no longer active. This basically lets you skip the process of creating and destroying instances. Typhoon Unit hasn't needed this yet, but it's something to keep in mind.
November 25, 2024 at 7:45 PM
Basically, I create a list for each color of bullet, and populate it with all bullets of that color. Before looping through all of them to draw them, I set the shader to that color's parameters. That way I'm only doing it once per color instead of per bullet.
November 25, 2024 at 7:45 PM
Other than that, a lot of the optimization work comes in the rendering step. Typhoon Unit uses central renderer objects assigned to each layer. Since the bullets are color-coded, I can render them in batches to save on gpu computations. Code's a little long to show, but I can describe it.
November 25, 2024 at 7:45 PM
First, the more times you have to run collision code, the longer it takes. So put it on the things that the bullets will hit, rather than the bullets. There's usually less. Make the player check for enemy bullets, and enemies check for player bullets.

Here's a sample of the player code.
November 25, 2024 at 7:45 PM
Great question!

Each bullet in Typhoon Unit is an object instance. Since the bullets are rather large in size, I can get away with using fewer of them in patterns than other danmaku games might use. I can give a few implementation tips though.

✨🧵✨
November 25, 2024 at 7:45 PM
Thanks!
November 24, 2024 at 5:19 PM