Collision boxes,zones, and allocation
I have come to the conclusion that dividing a large map into zones is probably the best way to handle having many updates all the time for things that would be trivial to players. So my thought is to use bounding boxes to limit player's movements throughout the world.
I have come to the point where I am wondering how to make a bounding box divide itself into multiple sub boxes if one is placed over a zone seam...
example: lets say zones are 10 by 10 units big and we want a 10 by 10 unit box starting on zone0 5,5 and extending to zone4 5,5 making it a 10 by 10 bounding box. Now each zone would need it's own 5x5 box to use for updates in that specific zone. What routine would I use to split that box into sub boxes?
something like this maybe?:
if(box_x + box_w > zone_max)//push into next zone dec box_w by zone_max - box_x