Collide bodies

Collide bodies are simple convex polyhedra and spheres that represent the object approximate hull for calculating intersections.


First picture is the simple approximation of the human, 5 spheres correspond to the 5 important parts of the body. Pros of this approach include simplicity, as spheres are very easy to understand, manage and transform. But this form poorly represent the body shape. If we try to approximate further (fig.2), we’ll get a lot of parts, which will be complex to manage (either you’ll need to draw sprite for every part or have to use containers, increasing complexity further). It’s possible, of course, to create and use very complex human figure, but for now it falls from my scope as the output is minor and problems can stall the development for months.

Instead of that, i’ve decided to use simple convex polygonal structures. They are quite painful to initialise with the need of writing out every coordinate of every vertex by hand, but overall suitable. There’s only 5 parts, and they resemble the human figure much better. They are detailed enough to be actually seen in the game in one of my neat planned features which i won’t tell you for now.

Figure 3 is the example of such body. There’s also examples of armor collide bodies (orange), that will be hooked up when you equip an armor.


Live view of the collbody model.

Engine will map the sprites based on the body origin points upon each object, so it will be less wireframe and more pixel-art.