Phantom Forces Wiki


182pages on
this wiki
Add New Page
Comment1 Share

What is a hitbox?

A hitbox is literally what it is - a box you can hit. The term hitbox has become more and more loosely related to an actual box-shaped collision area as it is just referring to the area where a game would consider the collision valid.

Pictures speak a thousand words, so here's a ROBLOX example of various different hitboxes.

What you'll see More expensive -> less expensive
Default Hull Box
A can of soda. Tasty.
Default "sees" depressions.
Hull ignores depressions.
This is where it all started.

As we go from left to right, you can see that each mesh is simpler - and is therefore less computationally expensive for your computer to compute. Most modern AAA games that get pumped out of well-funded studios use a combination of the polygon-based collision mesh (what Roblox terms Default) and the Hull-styled collision mesh. As we look at games that are older and older, the collision meshes go from the polygon-based collision meshes to hull collision meshes, and then simple box collision meshes.

But why?

It's all to do with the computational cost. A hull collision mesh will always be less expensive than the polygon collision mesh, simply because of the fact that there's less data to crunch. Of course, drawing a three-dimensional box will always be the cheapest operation available in terms of collisions. Older computers were not as powerful as the ones we have today. They needed a simpler, more efficient method available to them. Generating a polygon-based collision mesh would have looked similar to the ones generated in Roblox today - oversimplified and chunky. Even then, that was more than likely reserved to the most intensive games at the time.

How does this relate to Phantom Forces?

The bullets that get fired from your gun are using a raycast system - that is, they shoot out invisible lasers in front of them - and are then simulated as if they were physically moving through space. What results is bullets that can hit their target properly, don't just rebound off of walls randomly, and look and act somewhat realistically. The raycast is a powerful operation - and when this "laser" crosses through the collision mesh, it does a few sanity checks, then "hits" whatever it found. If it's a wall, you get a satisfying shower of particles, a bullet hole, and the sound of your bullet having hit something. When you hit a player, the bullet checks to see what limb it hit, deals damage to that player, and you get a hitmarker. Very good.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.