EUB System Overhaul: Hitboxes!

This somehow became a lengthy rambling post, if you want to look at the shiny hitboxes check the pictures below

Howdy. It’s me, Trickysticks, here with the first devlog in quite a long time. Porygon Productions has been a bit quiet lately, but we’ve definitely been putting work into the game. A lot of what we’ve done since the last update is fairly boring technical stuff, such as updating ancient code to be compatible with all of the new libraries we’re using, lots of bugfixes, and fixing Porygon’s efforts to break half the game by misspelling things. Whoops.

One of the less boring technical changes has serious impact on gameplay, though. There have been changes to one of the fundamentals of how all danmaku-based games work: hitboxes.

If I tell Danmakufu that a 10 pixel by 10 pixel area on an image is a shot, then it’ll take whatever’s in that area, render it, and give it a hitbox. Simple enough – it gets tedious with a few hundred bullets but that’s life. It helps that there’s ways to automate this process. This explains why shot sheets look like this.

Hitboxes are generated by finding the center of the rectangle you give Danmakufu, and drawing a circle or oval with a radius that’s a ratio of whatever dimensions the rectangle is. In other words, big rectangle = big hitbox, small rectangle = small hitbox. This is simple, but it works…for regularly shaped bullets. For generic round shots and bubbles, and even some more oval-shaped bullets, this works fine! It’s when you get to more special bullets, like the infamous knives, that this system starts producing weirdness.

The hitboxes have always erred on the side of generous because of this, and it’s worked until now. For the sake of being more accurate to what the bullets actually look like, we’ve done a small overhaul on some of the more weird bullets. How?

We’re using more than one circle.

Amazing.

Anyway I’ve rambled on long enough, here’s some pictures of the changes. Note that multiple circles mean more collision detection, and more processing power needed. We’ll use these bullets sparingly.

Before:

image

After:

image

Quite the change, isn’t it?

Leave a Reply

Your email address will not be published. Required fields are marked *