Talk:Empyrean/@comment-72.49.192.171-20191225025654/@comment-65.96.46.50-20191230064905

Assuming map boundries are abstract "entities are not allowed to exceed a mathematically defined area" rather than actual objects in the environment, a rectangular map is far easier to check if an entity is still within the bounds in a cartesian coordinate system. Admittedly, you have to do more checks, but they're just simple comparisons. "Does the object's position along any axis exceed +/- X?" 6 checks in total, but simple ones. A spherical map is only one check "does the object's position exceed X units from the center?" but to get the answer requires trigonomic functions which are far more computationally involved than simple comparisons. In fact, you could even optimize the square one a bit if you don't care which way it's going out of bounds. Strip the sign bit, and then just do the positive comparison.