+ 3
How to make camera in platformer game?
Hello, I am making a platformer game in canvas using js. I have done tile collision and response part but I'm unable to make player's camera. Basically I want to make a camera which follows the player. Here is the code: https://code.sololearn.com/WWO2W5We2L3e/?ref=app If you know how to do it, please help and guide me!
7 Antworten
+ 2
Senku I would've attempted to explain how a camera works, but I don't think that's nessecary anymore when the exact personn I learnt from shared the exact code I learnt from😂❤️
Do check out what 「HAPPY TO HELP」 posted and if don't quite get it, feel free to ask us! We are 「HAPPY TO HELP」xD
+ 2
「HAPPY TO HELP」 Was thinking something similar...also...Senku if you want a fixed background, perhaps you could avoid drowning the background tiles (the light blue ones) and instead fill the whole canvas with that color, before translating the canvas then draw just the collidable tiles on top of that
+ 2
Runtime Terror
That's a good method. I will try it.
https://avinashpro.github.io/files/Platformer%20Game/index.html
+ 1
Hey Vachila64☕ 「HAPPY TO HELP」 ,
I tried it but whenever I move the player, some lines are render in canvas. How can I fix it and How can I improve it.
https://code.sololearn.com/W9bsL31CB9Ij/?ref=app
0
Runtime Terror Sure😀