zoom in the screen?

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

_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
Rocky Wrench
Rocky Wrench
Posts: 639
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?).

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: zoom in the screen?

Postby Emral » 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
Rocky Wrench
Rocky Wrench
Posts: 639
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
2025 Egg Hunter
2025 Egg Hunter
Posts: 547
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
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: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari