-
Notifications
You must be signed in to change notification settings - Fork 0
Performance Considerations: Octa trees
Daxode edited this page Oct 2, 2020
·
1 revision
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!..