You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Collision detection can be hard on a computer.. Lets say we have 100 enemies, each enemy would normally have to check if they have hit another enemy, this easily adds up, because just 100 enemies would mean 100^2 meaning 10.000 comparisons, and the number grows exponationally for obvoius reasons, however we can do something smart!.. If we split the whole world into smaller pieces, we can generate a tree like structure where we can search through only nearby enemies.. Or in our case, entities!..