Help with experimenting with cameras and GUIs [SOLVED]

Started by Stranga, Thu 22/07/2021 03:44:41

Previous topic - Next topic

Stranga

Hello everyone,

I'm trying out an idea I had to add some visual effects to an almost completed game and I don't really want to redo all the art. My idea was to add screen overlay images (Like a dirty tv glass screen or something) and I had an idea to use cameras (I hope I'm on to something, ha!).

My idea was to increase the size of the viewport and zoom the camera in to fill the game window (So it still looks like it originally does) then I want to place a GUI overlay with the screen effects over say the camera lens, that way I can use higher-res images on top of pixel art without having to resize the art.

Not sure if this makes sense but if there is anyone that could help I'd be very grateful! 

Crimson Wizard

If you want to use high-res GUI, then first of all you will have to change your game's resolution.

Then, if you want to see the room art at the same size as before, you will have to keep standard viewport size, but reduce the size of camera to the size of the old game resolution. This way old sized room will be scaled to whole screen of a new resolution.

Stranga

#2
This is something that I was worried about. If I increase the size of the game's resolution wouldn't that remove all walkable areas hotspots and such?

EDIT: I've played around with the idea and so far and I've got it to work (I forgot about the viewports  :P), I've noticed that the GUI doesn't scale up with the camera view, which is what I technically wanted but I think I may have to upscale the GUI's that I want to be zoomed in. Is there another way around this perchance?

Crimson Wizard

Quote from: Stranga on Fri 23/07/2021 01:53:27
This is something that I was worried about. If I increase the size of the game's resolution wouldn't that remove all walkable areas hotspots and such?

No, the masks are only invalidated when you change the size of the room, which is not the same as game resolution.

Quote from: Stranga on Fri 23/07/2021 01:53:27
EDIT:  I've noticed that the GUI doesn't scale up with the camera view, which is what I technically wanted but I think I may have to upscale the GUI's that I want to be zoomed in. Is there another way around this perchance?

Well, either you resize GUI in the editor, or you resize them programmatically in script, there's no other way in AGS at the moment.

Stranga

Thanks for your help CW, my major question was solved anyway just wanted to clarify those extra points.

eri0o

There's also a "hack" using a character @Stranga, just make sure you have Draw sprites at screen resolution then you can have a character ignoring your game native resolution and just set a view with the thing you want and carry this character around.

https://www.adventuregamestudio.co.uk/forums/index.php?topic=55289.0

Stranga

Thanks @ eri0o! Sounds like just the "hack" I was looking for ;)  I'll take a look at the link :)

SMF spam blocked by CleanTalk