Fast Grid-Based Collision Detection


Just a little sneak peek of the grid-based collision detection I’ve just finished implementing!

Collisions are now resolved by looping over grid cells. When actors move into a new cell coordinate, they occupy new grid cells and un-occupy old ones. This approach is quite fast because no searching needs to be done for intersecting boxes, and static actors are skipped entirely, unless they occupy the same cell as an active actor, like the player or a slime.

Leave a comment

Log in with itch.io to leave a comment.