How do i expand the size of my level?

I’m too new to phaser, i read the tutorial and i reproduce it, but i want to know how i can expand the size of the level so the player won’t be closed to only the first scenario, and he can explore more the level (like kirby, for example, you move to the right and the level continues, and if you return to left, the level will continue to the left)

Thanks!

1 Like

Something like this? https://phaser.io/examples/v3/view/camera/follow-sprite-small-bounds

Two important concepts to understand: the world and the camera are different pieces of functionality that Phaser provides.

The world is actually an “unlimited” size. You can put a sprite at the coordinates (0, 0) or (1000, 1000) if you want, it doesn’t matter to Phaser.

The camera is an object that points to a specific rectangle of that world, and renders whatever is in that rectangle to the screen.

You can control what part of the world is being rendered to the screen by moving the camera around, like in @Rob’s example.

  1. See world.setBounds(…) (32) in physics/arcade/100 world bodies.
  2. See physics/arcade/wrap sprite.

Yes!! something like this, that’s the thing i want to do :slight_smile: