Page 2 of 2

Re: What can cause love2d not to draw

Posted: Sat Sep 17, 2022 8:19 pm
by Gunroar:Cannon()
Disclaimer: I run this on android

Wait! Don't leave. It's still a weird problem that needs to be fixed, right :cry: ?

GPU:
Mali-T628 MP6

Android 6.01 if I got that right

Re: What can cause love2d not to draw

Posted: Sat Sep 17, 2022 11:37 pm
by slime
Gunroar:Cannon() wrote: Sat Sep 17, 2022 8:19 pm It's still a weird problem that needs to be fixed, right :cry: ?
Depending on where the underlying problem is, it might need to be fixed by the people who develop your phone's graphics drivers, rather than anyone here.

Re: What can cause love2d not to draw

Posted: Sun Sep 18, 2022 9:06 am
by Gunroar:Cannon()
Funny though that I've done quite a few (a lot) of projects there and this hasn't happened once, ...with an project....but this one.

Anyway as long as it works on PC and since you don't know what can cause this it's fine.

Re: What can cause love2d not to draw

Posted: Sun Sep 18, 2022 10:12 am
by ddabrahim
But if it happens only occasionally, how can it be a driver problem?
I would be also curious what exactly causing this. Maybe canvas, draw order or a shader or else.

Even though it is not drawn, as far the program concerned are the objects present and can you get their position, image, animation?
Wait, maybe it is the images are not finished loading and it is a filesystem operation problem? Can you check if it's not drawn on the screen, but you can still get the width and height of the image or is it nil?

Re: What can cause love2d not to draw

Posted: Mon Sep 19, 2022 9:50 pm
by Gunroar:Cannon()
ddabrahim wrote: Sun Sep 18, 2022 10:12 am Wait, maybe it is the images are not finished loading and it is a filesystem operation problem? Can you check if it's not drawn on the screen, but you can still get the width and height of the image or is it nil?
Is it possible?

Re: What can cause love2d not to draw

Posted: Tue Sep 20, 2022 9:30 pm
by ddabrahim
Is it possible?
Well, I have No idea how loading works but I can imagine some sort of empty image data caused by slow filesystem maybe. As I mentioned I had similar problems with love.load where it failed to initialise objects, the game did run, did not crash but collision and controls did not work for example and it was caused by a delay with the execution of love.load.

Re: What can cause love2d not to draw

Posted: Wed Sep 21, 2022 5:05 pm
by milon
ddabrahim wrote: Tue Sep 20, 2022 9:30 pm ... the game did run, did not crash but collision and controls did not work for example and it was caused by a delay with the execution of love.load.
Wait, I thought love.load was a blocking function. How could the other love callback functions fire before love.load exited? :shock:

Re: What can cause love2d not to draw

Posted: Wed Sep 21, 2022 6:14 pm
by pgimeno
I seriously doubt that love.load was the cause. It's executed immediately after the top level of main.lua is run. It's more likely that it was a problem of misuse of locals (e.g. declaring variables local to love.load) or anything else, but moving execution from love.load to the top level should make no difference.

Re: What can cause love2d not to draw

Posted: Wed Sep 21, 2022 9:11 pm
by ddabrahim
pgimeno wrote:moving execution from love.load to the top level should make no difference.
milon wrote:Wait, I thought love.load was a blocking function. How could the other love callback functions fire before love.load exited?
Yes it is weird. I suspect my Antivirus interfere sometimes when I launch LÖVE, it is create the window but the window is black and there is nothing drawn on the screen for a few seconds like 5-10 seconds, once it is start drawing the screen all kind of weird staff was happening that made it look like love.update and love.draw did run BEFORE love.load completed.
Since I moved everything out of love.load, I have never experienced this problem. No idea what is happening there with the AV and the delay.
It is not easy to reproduce usually happened maybe once every 20 times I launched my project.