DEV Community

AndyBullet
AndyBullet

Posted on

1 2

I need an information

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.

Top comments (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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay