Help with player camera veiw

Hi- i need help. I want to make it so that in my game on lvl 1 for example i can see set x and y amount, whilst on level 2 i can see more- cause the levels xy is meant to be bigger and taller.
I know that the solution is simple- i just have no idea how the camera and number code works tbh.

PLEASE help- this is for a school project :.C

We can help, but you should send a link to the game to better explain it.
There are several ways to go about this:

  • Create a camera object for each level (Easiest). Set the camera settings to where in the level you want the camera to automatically go in the level. On these camera objects, uncheck “movable” and uncheck “is solid”. And finally make it follow the player by using globals (check “Updates activate all globals”).
Player Object Code

image

Camera Object Code

  • Programming a single camera in the player object (Harder). You tell the camera where it can and cannot go based on the what level your in. Move the camera by setting the set x and set y inputs. To center the camera, you will need to subtract half of the screen height and width to center onto the player.
Player Object Code (something like this)

  • Use my camera+ example (Advance). This system is nice to learn and good to use, but not great if you are short on time for like a school assignment. Camera+ Example - JR01
1 Like

THANK YOUUUUUUUUU- ill have a look at that code, and ill try it all out and see if it works ^v^