#1: Do not post personal contact details for private help. This is a public site where answers to question are made public so that they can provide help for others with the same problem (and the rare ability to search before asking).
#2: Don’t code-dump. If you need to post any code, post it in the topic and keep it short and straight-to-the-point regarding the problem you have. superman3275 specifically told you that it is hard enough to read through all of the source code and few (none) of us have the time, and then you respond by posting all of your code? Do you read replies?
The answer to your question is really quite trivial—separate logic and rendering.
The game world has a non-changing coordinate system, so all of your concerns about AI etc. are unwarranted.
If the player is at [23,56] and the AI needs to aim at him from [10,78], the logic is the same no matter where the camera is. The world isn’t moving just because the camera is moving.
So you have a static game world full of non-moving coordinates. This is the logic part.
When you want to render, this is a different and completely unrelated step.
When you render an object, you take its world coordinates, convert them to screen coordinates, move to the next object, and repeat.
The converted coordinates exist only during the render. They don’t overwrite world coordinates etc.
So let’s say you have 3 objects:
Aardvark [12,75]
Bicycle [142,22]
SterilFart [0,13]
And the “camera” is at [33,40].
foreach (Object) {
tempCoords = Object.Pos - Camera.pos;
Render(Object, tempCoords);
}
Aardvark gets rendered at [-21,35].
Bicycle gets rendered at [109,-18].
SterilFart gets rendered at [-33,-5].
As you can see, there is absolutely nothing here related to AI or game logic of any kind.
Game world is updated by game logic in a coordinate system that never changes.
Objects are rendered with a translation for presenting them to the screen.
L. Spiro