Camera resolution similar to SMW

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

Locus
Rex
Rex
Posts: 35
Joined: Sun Mar 17, 2019 12:47 pm
Pronouns: he/him

Camera resolution similar to SMW

Postby Locus » Sun Jul 14, 2024 10:05 am

Hello. I'm wondering if there is a way to make the screensize similar to that of Super Mario World? It's been a really long time since I've last used SMBX so I'm not quite sure.

roroopi
Goomba
Goomba
Posts: 3
Joined: Sat Jun 08, 2024 3:14 pm

Re: Camera resolution similar to SMW

Postby roroopi » Thu Jul 18, 2024 2:24 pm

Code: Select all

local CAMERA_WIDTH = 512
local CAMERA_HEIGHT = 448

function onStart()
    camera.width = CAMERA_WIDTH
    camera.height = CAMERA_HEIGHT
    Graphics.setMainFramebufferSize(CAMERA_WIDTH, CAMERA_HEIGHT)
end

function onCameraUpdate()
    camera.width, camera.height = Graphics.getMainFramebufferSize()
end


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 5 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari