In case you want to create a tile vased game you often need a camera to follow tge player or smth. So I created a little example for you. I tried to make it as short and efficient as possible without losing readability - will need your feedback to be sure it is :)
On the request of @ManuelLopes I will also make an example with pathfinding. I had posted an A* example in the past - so I will just take it and include it somehow to the current code
happy coding!