Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mininthebox on Fri 17/01/2025 10:40:23

Title: (Solved) Confused on how viewport / camera works
Post by: Mininthebox on Fri 17/01/2025 10:40:23
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!
Title: Re: Confused on how viewport / camera works
Post by: eri0o on Fri 17/01/2025 12:38:12
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?
Title: Re: Confused on how viewport / camera works
Post by: Khris on Fri 17/01/2025 12:58:00
Try putting
Game.Camera.Y = 0;
in room_Load()
Title: Re: Confused on how viewport / camera works
Post by: Crimson Wizard on Fri 17/01/2025 14:24:53
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.