Tiles and regions #16, #17
Tiles and regions. I often debug my code using visual aids.
The idea is that each entity can occupy a tile and can exist in one of the region. This means less CPU needed to process logic because instead of looping through all objects to check collisions you only loop through the ones from one specific region (that you care at that point in time).
On right: the array of 0s and 1s represent the collision tiles.
Here are the full video logs: