What can cause love2d not to draw

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Gunroar:Cannon()
Party member
Posts: 1143
Joined: Thu Dec 10, 2020 1:57 am

Re: What can cause love2d not to draw

Post 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
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What can cause love2d not to draw

Post 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.
User avatar
Gunroar:Cannon()
Party member
Posts: 1143
Joined: Thu Dec 10, 2020 1:57 am

Re: What can cause love2d not to draw

Post 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.
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
ddabrahim
Party member
Posts: 201
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: What can cause love2d not to draw

Post 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?
User avatar
Gunroar:Cannon()
Party member
Posts: 1143
Joined: Thu Dec 10, 2020 1:57 am

Re: What can cause love2d not to draw

Post 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?
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
ddabrahim
Party member
Posts: 201
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: What can cause love2d not to draw

Post 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.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: What can cause love2d not to draw

Post 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:
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
pgimeno
Party member
Posts: 3674
Joined: Sun Oct 18, 2015 2:58 pm

Re: What can cause love2d not to draw

Post 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.
User avatar
ddabrahim
Party member
Posts: 201
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: What can cause love2d not to draw

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests