LoveWebBuilder icon indicating copy to clipboard operation
LoveWebBuilder copied to clipboard

Black Screen

Open sysl-dev opened this issue 7 years ago • 2 comments

I'm not sure what is causing it, but all my graphics seems to be black, while input appears to be working.

I'm trying with https://systemlogoff.itch.io/trimono

Is it a colors thing? Or is it a Canvas thing?

Thank you for working on this tool, I'm looking forward to using it for future game jams.

sysl-dev avatar Sep 08 '18 19:09 sysl-dev

Hi there

I poked around a bit and it turns out love.window.setMode seems to not work at all! While it successfully resizes the web canvas it's just a black screen from then on. So for Trimono I changed these lines in conf.lua and lovepixels.lua

t.window.width = 160*4
t.window.height = 144*4
function lovePixels:resizeScreen(newScale)
	if love.system.getOS() == 'Web' then
		lovePixels.scale = 4 --fixed scale on web
	else
		lovePixels.scale = newScale
		love.window.setMode(pixelWidth * lovePixels.scale, pixelHeight * lovePixels.scale, {})
	end
end

Also I had to remove the seemingly unused '_shaders.lua' because at least my current Chrome version on my PC doesn't like any custom shaders. In Firefox shaders run fine.

With that and memory set to 64MB it ran fine! I finished it even :-)

I added a hint to the top page about setMode not working.

schellingb avatar Sep 09 '18 08:09 schellingb

Thank you, I'm glad it's just setmode being strange. Looking forward to using it next jam. 😀

sysl-dev avatar Sep 09 '18 23:09 sysl-dev