viewport.lua: make the screen smaller

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

viewport.lua: make the screen smaller

Postby The0x539 » Mon Jul 17, 2017 11:18 am

only designed to support 1-player mode

this is a scrapped aspect of a SCC level, I figured I'd put it out there. defaults to 640x480, can be changed by changing the values of viewport.width and viewport.height. aspect ratios other than 4:3 will be stretched rather than showing black bars.

code
save as viewport.lua, and load in the local/global level script as you would any other API.

SPEEDIE
Flurry
Flurry
Posts: 180
Joined: Sat Nov 03, 2018 6:22 pm
Flair: u fucking wot
Pronouns: he/him
Contact:

Re: viewport.lua: make the screen smaller

Postby SPEEDIE » Sat Oct 19, 2019 11:55 am

I love this, I changed the res and it looks way more like SMW now, thanks for this!

CheesyYoY
Hoopster
Hoopster
Posts: 48
Joined: Wed Aug 01, 2018 7:51 pm
Flair: I exist

Re: viewport.lua: make the screen smaller

Postby CheesyYoY » Wed Jan 01, 2020 11:20 pm

Woah i needed this! Thanks.

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: viewport.lua: make the screen smaller

Postby Hoeloe » Fri Jan 03, 2020 2:54 pm

This isn't needed in SMBX2 MAGLX3 or later. You can just do:

Code: Select all

local handycam = require("handycam")
handycam[1].zoom = 1.25
And that will do the same job. You can also make it support 2 player mode. You can also add black bars pretty easily yourself.

SPEEDIE
Flurry
Flurry
Posts: 180
Joined: Sat Nov 03, 2018 6:22 pm
Flair: u fucking wot
Pronouns: he/him
Contact:

Re: viewport.lua: make the screen smaller

Postby SPEEDIE » Sun Mar 15, 2020 5:47 am

Hoeloe wrote:
Fri Jan 03, 2020 2:54 pm
This isn't needed in SMBX2 MAGLX3 or later. You can just do:

Code: Select all

local handycam = require("handycam")
handycam[1].zoom = 1.25
And that will do the same job. You can also make it support 2 player mode. You can also add black bars pretty easily yourself.
2 bad I already released my episode with viewport though.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari