zoom in the screen?

Need help with any SMBX game-related issues? Ask your questions here.
_SleepyWhirl_
Bob-Omb
Bob-Omb
Posts: 23
Joined: Thu Aug 19, 2021 9:52 pm
Flair: Discord: SleepyWhirl#6093
Pronouns: he/him
Contact:

zoom in the screen?

Postby _SleepyWhirl_ » Mon Nov 08, 2021 10:34 pm

hello, just wanted to ask if its possible to somehow zoom the screen in to make the viewfield smaller?

deice
Buster Beetle
Buster Beetle
Posts: 442
Joined: Fri Jul 23, 2021 7:35 am

Re: zoom in the screen?

Postby deice » Tue Nov 09, 2021 6:39 am

while the camera class does have "width" and "height" fields you can change, this doesn't actually zoom the screen in, just cuts the screen visibility off.

what you can do is create a capture buffer to copy everything on screen into a renderable texture, then just redraw it scaled over everything else (i don't exactly remember so someone is free to correct me, but i believe that scaling a texture is possible using glDraw?).

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9491
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: zoom in the screen?

Postby Enjl » Tue Nov 09, 2021 7:29 am

While it's not documented on the docs yet, I recommend checking out handycam.lua in the scripts folder. I thinkkkkk you access the zoom via handycam[1].zoom = 2 for instance?

deice
Buster Beetle
Buster Beetle
Posts: 442
Joined: Fri Jul 23, 2021 7:35 am

Re: zoom in the screen?

Postby deice » Tue Nov 09, 2021 8:25 am

Enjl wrote:
Tue Nov 09, 2021 7:29 am
While it's not documented on the docs yet, I recommend checking out handycam.lua in the scripts folder. I thinkkkkk you access the zoom via handycam[1].zoom = 2 for instance?
i just tested, you indeed can do that. i actually didn't know about this library at all (thanks for mentioning it lol), and since it already does what i described in my previous post for you, it's an unequivocally better solution.

_SleepyWhirl_
Bob-Omb
Bob-Omb
Posts: 23
Joined: Thu Aug 19, 2021 9:52 pm
Flair: Discord: SleepyWhirl#6093
Pronouns: he/him
Contact:

Re: zoom in the screen?

Postby _SleepyWhirl_ » Tue Nov 09, 2021 3:22 pm

thank yall!

Added in 6 hours 33 minutes 51 seconds:
Enjl wrote:
Tue Nov 09, 2021 7:29 am
While it's not documented on the docs yet, I recommend checking out handycam.lua in the scripts folder. I thinkkkkk you access the zoom via handycam[1].zoom = 2 for instance?

Image

Marioman2007
Buster Beetle
Buster Beetle
Posts: 401
Joined: Tue Aug 25, 2020 3:19 am
Pronouns: He/Him

Re: zoom in the screen?

Postby Marioman2007 » Tue Nov 09, 2021 10:16 pm

_SleepyWhirl_ wrote:
Tue Nov 09, 2021 9:56 pm
thank yall!

Added in 6 hours 33 minutes 51 seconds:
Enjl wrote:
Tue Nov 09, 2021 7:29 am
While it's not documented on the docs yet, I recommend checking out handycam.lua in the scripts folder. I thinkkkkk you access the zoom via handycam[1].zoom = 2 for instance?

Image

Code: Select all

local handycam = require("handycam")
handycam[1].zoom = VALUE

_SleepyWhirl_
Bob-Omb
Bob-Omb
Posts: 23
Joined: Thu Aug 19, 2021 9:52 pm
Flair: Discord: SleepyWhirl#6093
Pronouns: he/him
Contact:

Re: zoom in the screen?

Postby _SleepyWhirl_ » Tue Nov 09, 2021 11:33 pm

thanks you! it worked very well!


Return to “Help and Support”

Who is online

Users browsing this forum: Google [Bot] and 2 guests