Scaling to lowest "native" resolution with Gamera and LightWorld

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
0x29a
Prole
Posts: 27
Joined: Sun Jul 06, 2014 10:22 pm

Scaling to lowest "native" resolution with Gamera and LightWorld

Post by 0x29a »

Hi there!

I'm doing low-res pixel art game and I want it to scale nicely on all monitors, with lowest possible resolution for a given monitor without image stretching.

I'm using Gamera library for camera handling ( https://github.com/kikito/gamera ) and Light_World (aka. Light vs. Shadow v2) library for real time lighting/shadows ( https://github.com/tanema/light_world.lua )

I've been trying to use Maid64 (viewtopic.php?f=5&t=82034 , https://github.com/adekto/maid64 ) but it doesn't do anything...

Code: Select all

function love.load()
--
    -- Resolution settings
    love.window.setMode(0,0,
    {
        fullscreen = true,
        fullscreentype = "exclusive",
    })
    maid64.setup(640,480) -- just an example, normally it'll be calculated using getFullscreenModes. 
--
    -- Light_World init
    LW = LightWorld({
     -- options here
    })
    LW:refreshScreenSize(640,480)
--
    cam = gamera.new(0, 0, world_size_x, world_size_y)
    cam:setWindow(0,0,640,480)
--
end

Code: Select all

function love.draw()
	maid64.start()--starts the maid64 process
	cam:draw(function(l, t, w, h) -- Gamera draw function
        		LW:draw(function() -- Light_World draw function 
        			 -- All the love.graphics.draw calls for different objects
        		end)
    		end)
	maid64.finish()--finishes the maid64 process
end
What I get
Image

What I (kinda) want:
Image

How do I proceed with this problem?

Thanks in advance for any help!

Edit: adding .love file for tinkering.
Attachments
ScalingNotWorking.love
(35.38 KiB) Downloaded 179 times
User avatar
adekto
Prole
Posts: 35
Joined: Thu Dec 06, 2012 11:42 am

Re: Scaling to lowest "native" resolution with Gamera and LightWorld

Post by adekto »

hi i made maid64.
i looked at the code and im sorry but i cant realy change anything to my side of the library.
light world is using a ton of shaders and canvases and ends up drawing to the screen directly as far as i understand the code.
if you can find or intercept the the shader thats the last one to render and grap that canvas and send it back to the love.draw it might work

hope this helps
0x29a
Prole
Posts: 27
Joined: Sun Jul 06, 2014 10:22 pm

Re: Scaling to lowest "native" resolution with Gamera and LightWorld

Post by 0x29a »

Thanks, I'll try to nail it down
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests