Pixel Hitboxes.

Pixel Hitboxes.

Pixel Hitbox, Accuracy, Limb Damage.

Hello! Update on my current project. I showed off Procedural 2D model generation a day ago here:
https://www.reddit.com/r/Unity2D/s/ihpzoJ9zoA

Now for an update on some game mechanics. This is an Auto-battle, Inventory Management game. Similar to games like Backpack Battles.

Characters generated randomly virtually infinite outcomes. Everything has a purpose, albeit a pro, con or compromise. Limb symmetry, Fat, Digit count, Eyes count, Part sizes, Bone density, Bone girth, many different characteristics all play a small role in main statistics.
Like Accuracy which is my topic today.

Design Philosophy is removing coins flips. Example with the targeting system and accuracy, your character does not miss.

https://preview.redd.it/kmzeq453fkkh1.png?width=658&format=png&auto=webp&s=dfd31e122d9660301c148d8a2eba24861d53b404

This can be a bit confusing, bare with me...

Here we draw a circle around your target.
Center is your target. (above is Jaw)
Radius expands as your accuracy is lower.
(There is a ceiling and floor)
Volume of parts inside circle and dead space volume.
Almost like a pizza slice, the jaw will be the smallest piece.
biggest area especially with low accuracy will be the dead space.
More dead space = more glancing blows.
(Glancing blows deal 50% damage and do not cause fractures)
Part hit by glancing blow is determined by part volume.
Target volume gains bonus from accuracy.
Jaw would be smaller than Cranium, but jaw gets a little bonus to be hit.

Progress bar

Avoiding coin flips with progress bars!

Your goal is to hit the target once the bar is filled target is hit!

Biggest slices hit first, smaller parts and then finally target hit on fill.

Bar fills with each hit.
The total bar is the total volume of the circle. Each unique slice in the circle has it's own volume as stated above (Mostly Glancing blows).

Amount filled = target volume + accuracy.
We get the volume by counting pixels.
Large bodies have more pixels, less dead space, bigger heads. (Big head target fills bar faster)
Higher accuracy rating will help progress the bar past glancing stage and into some actual full part damage.
You can completely bypass hitting the ribs with high accuracy, and be rewarded by hitting a probably less protected body part.

reddit.com
u/MojoBubu — 13 hours ago
▲ 92 r/proceduralgeneration+1 crossposts

Procedural PNG, WIP

42 parts with 8 knobs. Using 2D Renderer, doesn't create any PNGs. Layers, pixels all created in code. Able to add/remove Skin layer. Fat simulation (See Image 3). Defomities (Image 4). Every creation is from a seed. A seed can be called and will return the exact creation.

What's not in the photo: I've since added more modifiers like Accuracy, based on Eye placement, Body Symmetry and other deformities. Stability is low center mass, wide stance, etc.

There are other Mutations, Tails, Horns but are rough drafts. Tails are fairly uncanny with skin. Would likely change this if I end up using it. Horns are the most believable looking out of the mutations.

EDIT: appologies, title is a little misleading this isn't a "Procedural PNG" its just using the renderer. However I can export any seeded creation to a PNG!
EDIT#2: Link to next post: https://www.reddit.com/r/Unity2D/comments/1vtpyzn/pixel_hitboxes/

u/MojoBubu — 2 days ago