2D converting absolute top-down coordinates into relative third-person coordinates

I'm working on 2D top down zombie game. I started working on it as having a static 2D map and on every tick you update the coordinates of every object, including the player itself relative to the static map. Every object has x, y and angle against x axis x, y, theta.

But I would like to also provide a way to see it as a kinda third-person shooter (still top down 2d just different center of coordinates), where camera and coordinates are connected to the moving player object. So the player would always have the 0, 0, 0 coordinates and every other object transformed xT, yT, thetaT coordinates.

What approach should be used in such cases? Should I still keep the static coordinates and simulate the world over a static map, and then transform the coordinates of every object into relative coordinates? So every tick there will be two transformations - world simulation and static -> relative coordinate transformation?

• Just to be clear, are you talking about a 3D first-person view or merely a top-down view that follows the player? Dec 27, 2018 at 9:13
• Same top down, just different coordinates, yes top down that follows the player Dec 27, 2018 at 10:04
• Note that "first person" means you're looking through the character's eyes. If you can see the top/back of the character's head, then you're not in first-person view, but rather third-person. What you're describing is a top-down follow cam, not first-person view, and I recommend adjusting the terminology in your question to match. Dec 27, 2018 at 17:39