Black screen

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.
Hastenmarlen
Prole
Posts: 6
Joined: Fri Dec 15, 2023 1:15 pm

Black screen

Post by Hastenmarlen »

When try to start code, just open black screen of love. IDE-ZeroBrane
saving not help
windows 10-64
code-
function love.draw()
love.graphics.setColor( 1, 1, 1)
end
User avatar
dusoft
Party member
Posts: 510
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Black screen

Post by dusoft »

Well, you are literally not drawing anything, just setting a text color to something very close to black. Try with more code including examples and tutorials and then come back to forum, if the issue persists.
Hastenmarlen
Prole
Posts: 6
Joined: Fri Dec 15, 2023 1:15 pm

Re: Black screen

Post by Hastenmarlen »

I've done this before, the code is for an example. No matter what I write, he's still black
User avatar
Bobble68
Party member
Posts: 160
Joined: Wed Nov 30, 2022 9:16 pm
Contact:

Re: Black screen

Post by Bobble68 »

Hastenmarlen wrote: Fri Dec 15, 2023 5:33 pm I've done this before, the code is for an example. No matter what I write, he's still black
setColor only affects future instructions, what you are doing here is essentially telling the program 'next time I tell you to draw something, draw it this colour', but that's it. Without telling it what to draw, it will not do anything. You might be thinking of love.graphics.setBackgroundColor instead.

dusoft wrote: Fri Dec 15, 2023 4:15 pm just setting a text color to something very close to black.
Not really sure what you mean here, (1,1,1) is pure white, and it effects most draw instructions, not just text.
Dragon
User avatar
dusoft
Party member
Posts: 510
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Black screen

Post by dusoft »

Bobble68 wrote: Fri Dec 15, 2023 5:39 pm
dusoft wrote: Fri Dec 15, 2023 4:15 pm just setting a text color to something very close to black.
Not really sure what you mean here, (1,1,1) is pure white, and it effects most draw instructions, not just text.
Ah yes, sorry, I always think in 0-255 interval of CSS colors. It does not matter after all, you just set the color and don't do anything else.
User avatar
pgimeno
Party member
Posts: 3551
Joined: Sun Oct 18, 2015 2:58 pm

Re: Black screen

Post by pgimeno »

Maybe you wanted to use love.graphics.setBackgroundColor instead?
Hastenmarlen
Prole
Posts: 6
Joined: Fri Dec 15, 2023 1:15 pm

Re: Black screen

Post by Hastenmarlen »

no, you didn't understand me, EVERYTHING I write doesn't output anything for, I tried every code that output something, nothing helps
User avatar
Bobble68
Party member
Posts: 160
Joined: Wed Nov 30, 2022 9:16 pm
Contact:

Re: Black screen

Post by Bobble68 »

Hastenmarlen wrote: Sat Dec 16, 2023 3:56 am no, you didn't understand me, EVERYTHING I write doesn't output anything for, I tried every code that output something, nothing helps
Here's a small demo, see if this works.

Code: Select all

function love.draw()
  local t = -love.timer.getTime()/4
  love.graphics.setBackgroundColor( t%1, (t/3)%1, (t/7)%1)
end
Dragon
Hastenmarlen
Prole
Posts: 6
Joined: Fri Dec 15, 2023 1:15 pm

Re: Black screen

Post by Hastenmarlen »

ok, the question is closed, I tried everything, nothing helped, I got tired of it and reinstalled Windows, after which everything worked
MrFariator
Party member
Posts: 512
Joined: Wed Oct 05, 2016 11:53 am

Re: Black screen

Post by MrFariator »

If reinstalling your OS solved the issue, it might have been that your GPU's drivers were at fault. AMD driver 22.7.1 for example is known to cause love2d to output purely black visuals.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 51 guests