(Solved) Confused on how viewport / camera works

Started by Mininthebox, Fri 17/01/2025 10:40:23

Previous topic - Next topic

Mininthebox

Hello everyone,
Ive read the manual and forums too, but im still confused on how it works. Even though ive added the code, the game isnt displaying what i want. My screen is 1920 x 1200 and my background is 2200 x 1875. It displays the lower part of the background which i dont want (the upper body and part of bg i want to be visible).
Can someone please help me on this? Thanks!

eri0o

When you mentioned the size of background this is the image you imported in the room background? Where is the player character positioned in this room?

Khris

Try putting
Game.Camera.Y = 0;
in room_Load()

Crimson Wizard

Quote from: Mininthebox on Fri 17/01/2025 10:40:23Ive read the manual and forums too, but im still confused on how it works. Even though ive added the code, the game isnt displaying what i want. My screen is 1920 x 1200 and my background is 2200 x 1875. It displays the lower part of the background which i dont want (the upper body and part of bg i want to be visible).

Please always post your code with the question like this, don't just say "i've added the code and it does not work". We need to see your code to tell what's wrong with it.

SMF spam blocked by CleanTalk