Page 1 of 1

Camera resolution similar to SMW

Posted: Sun Jul 14, 2024 10:05 am
by Locus
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.

Re: Camera resolution similar to SMW

Posted: Thu Jul 18, 2024 2:24 pm
by roroopi

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