DEV Community

loading...

I need an information

AndyBullet
・1 min read

Hi guys!
I need an information.
Do you know how to make the screen follow a moving element as in this web game? https://example-io-game.victorzhou.com/
I searched the game's programming code https://github.com/vzhou842/example-.io-game?files=1, but couldn't figure anything out.

Discussion (1)

Collapse
avalander profile image
Avalander

You want to implement a camera system that is centered on the moving element. Check this docs and google a bit how to implement a camera viewport in your language/engine of choice.