After spending some frustrating hours, I am resorting to asking in this forum for opinion of experts out there.
I have a map.json file and I am using Berrys Tiled engine to load it.
How to make sure the camera follows the character ?
- The character when moves to the right, the camera should follow it
- Similar behavior when character moves up or down
- The map.x should move opposite to the direction of player.x so that there is a feeling that the camera is on the character
But how exactly to do it?
I tried :