Game camera following the player. How to? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

Game camera following the player. How to?

I found this article from Mozilla Developer. https://developer.mozilla.org/en-US/docs/Games/Techniques/Tilemaps/Square_tilemaps_implementation:_Scrolling_maps Copied the code and it's works but I don't understand how to make camera to follow the player. Course they have example of that but it's too complicated for me. Can you write simple code for following the player based on that example in the link? I tried many options so far an every time my player is going by itself. I want to center him on the screen

8th Aug 2020, 10:50 AM
Вадим Лукашенко
Вадим Лукашенко - avatar
1 Answer
- 1
https://github.com/mozdevs/gamedev-js-tiles Here's what you want I searched it for you but that's a ready made package do edit and add up you assets and codes
14th Aug 2020, 11:43 AM
Jaison John
Jaison John - avatar