I am currently working on a game where the world will have a fixed size say 2000x4000, but there will be no boundaries. When you get to one edge you just wrap around to the other side.
I have visibility of objects working OK. When you can see 0,0 and 2000,4000 at the same time, objects in all the corners draw in their proper relative positions, but I am sort of brute forcing it. I check x,y x+2000,y x+2000,y+4000 and x,y+4000 to see if any of those locations are visible.
Do I need to do something similar for collisions? Right now, if the bounding circle of an object crosses the world boundary, it won’t register a collision with an object on the other side, and the two can penetrate and overlap. I am concerned a bit about performance as I am treating each object as if it was in four different places for drawing and that would cause a lot of collision checks. For objects to register a collision they would need to check if any one of their four positions collided with any one of another objects four positions. I might be able to limit that to only doing the extra checks to when the bounding box crosses a boundary.
And that brings me to path finding. For that, I feel I am going to need four positions for every object all the time in order to find the shortest path between two of them for the computer AI to chase and target properly.
I am hoping I am waaay of base and there is a much less computationally intensive way to solve this problem.
Any help would be appreciated.