Endless HTML running game. What is really moving: camera or world?

  1. Camera is moving and the environment is static.
  2. Camera is static and the environment is moving to the player (camera).

Environment maybe need physics and collider or trigger. To give you a visual intuition, I will use the Helix Jump game as an example.

Ball and Camera VS Circle Platforms. Which moves and which is fixed?

I was thinking about that “distance from the origin” and avoid floating-point errors.

Keep in mind that the player is unlikely to exceed a certain amount and is often game over. But this is not certain.

The important point is the performance of HTMLMobile Browser games.

It depends on what you are comfortable with. Whenever i do endless games i move the world and have the game objects move relative to the world based on their velocity.
I’ve worked on an endless car game which works in mobile browser with reasonable perf.

1 Like

Hi, and thanks for your answer.
Is this video the same game you said? Is this game made with cocos creator? And that this video has been recorded from a mobile browser?

If so, really amazing.

it is… yes, made using cocos creator 2.4 and works well on mobile browser as well. You can find it on MXPlayer games channel if you want to try it out.