Jibble

Author Topic: Help with experimenting with cameras and GUIs [SOLVED]  (Read 408 times)

Stranga

  • Zzz...
    • I can help with making music
    • I can help with story design
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! 
« Last Edit: 24 Jul 2021, 11:48 by Stranga »
Follow me on twitter: https://twitter.com/StrangaGames

Re: Help with experimenting with cameras and GUIs
« Reply #1 on: 22 Jul 2021, 15:10 »
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

  • Zzz...
    • I can help with making music
    • I can help with story design
Re: Help with experimenting with cameras and GUIs
« Reply #2 on: 23 Jul 2021, 01:53 »
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?
« Last Edit: 23 Jul 2021, 03:33 by Stranga »
Follow me on twitter: https://twitter.com/StrangaGames

Re: Help with experimenting with cameras and GUIs
« Reply #3 on: 23 Jul 2021, 11:33 »
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.

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

  • Zzz...
    • I can help with making music
    • I can help with story design
Re: Help with experimenting with cameras and GUIs
« Reply #4 on: 24 Jul 2021, 11:48 »
Thanks for your help CW, my major question was solved anyway just wanted to clarify those extra points.
Follow me on twitter: https://twitter.com/StrangaGames

eri0o

Re: Help with experimenting with cameras and GUIs [SOLVED]
« Reply #5 on: 24 Jul 2021, 12:49 »
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
« Last Edit: 24 Jul 2021, 12:56 by eri0o »

Stranga

  • Zzz...
    • I can help with making music
    • I can help with story design
Re: Help with experimenting with cameras and GUIs [SOLVED]
« Reply #6 on: 26 Jul 2021, 02:53 »
Thanks @ eri0o! Sounds like just the "hack" I was looking for ;)  I'll take a look at the link :)
Follow me on twitter: https://twitter.com/StrangaGames