blank screen on android, help

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
tjkalinowski
Prole
Posts: 2
Joined: Tue May 07, 2019 2:24 pm

blank screen on android, help

Post by tjkalinowski »

Hello

This is my first post here. I made my first small LOVE2d game. When I run app on Android device or Android Simulator, screen is blank. Game is working itself, I can hear sounds. I can touch screen, and interact with user interface. The game is working without problems on Windows, MacOS, iOS simulator, iphone SE. Problem exist on either android simulator or real android phone. I did hello world program and its working on Android. Then I did program which display png graphics. And works fine.

I can send you whole code and can you examine? I have no idea where I have to look for error. The game is really short, has 284 lines. The main part is:

function love.update(dt)

love.graphics.setCanvas(canvas)
love.graphics.clear()
putImage(table, 0, 0)
drawGrid()
putImage(note,732,400)
--cut here

--cut here
love.graphics.setCanvas()
end

function love.draw(dt)
love.graphics.setColor(1, 1, 1, 1)
love.graphics.draw(canvas,0,0,0,love.graphics.getWidth()/1024,love.graphics.getHeight()/768)
end
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: blank screen on android, help

Post by Andlac028 »

Hello,
From where you have downloaded LÖVE for android? If from google play, you have downloaded old version, what is using colors 0-255 (new versions uses colors 0-1). Try download the latest version from here.
tjkalinowski
Prole
Posts: 2
Joined: Tue May 07, 2019 2:24 pm

Re: blank screen on android, help

Post by tjkalinowski »

Hello Andlac028

Thank you for replay.
I am using 0-1 colors.
I do not need to download LOVE from google play or any other source to run my game. I am making stand alone android package with embedded all LOVE libraries and frameworks files. The game run itself. Either in iOS or Android.

Check it out for yourself, here is source
https://1drv.ms/f/s!AlOEvPbIsfruum2UywICRvukOTFE
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: blank screen on android, help

Post by Andlac028 »

Hello,
I tried game (file mobile.love) on my android phone and is working fine for me (without blank screen). The problem is not in code, but in compiling. The question is: what version of LÖVE you are compiling with your game? Try compile only this code and run it on android:

Code: Select all

function love.draw()
  love.graphics.setColor(255,255,255,255) --set colour to white (use 255 instead of 1 !)
  love.graphics.print(string.format("Version %d.%d.%d - %s",love.getVersion())) --print version in format: major.minor.revision - codename
end
If version is 0.10.x or lower, problem is colours - these versions are using colours 0-255 (only multiply all colours with 255).
If version is 11.x, problem is somewhere else.

P.S.: main.lua, line 75: function to quit is love.event.quit (not love.system.quit)
Post Reply

Who is online

Users browsing this forum: markgo and 238 guests