Page 1 of 1

Black Screen

Posted: Sat Jul 15, 2023 7:29 pm
by Lovingsoul1337
hi i made this code.

Code: Select all

function love.draw()
    love.graphics.print("Hello World!", 0, 0)
  end
already installed the newest version of love and have windows 11 and using this with visual studio code.

i start the code like this.

PS C:\Users\brotm> cd desktop
PS C:\Users\brotm\desktop> love lovepractice
PS C:\Users\brotm\desktop> love --version
PS C:\Users\brotm\desktop> LOVE 11.4 (Mysterious Mysteries)

and i just get a black screen can someone tell me why ?

thanks in advance !

ps. if i do this i see the player drawn.

Code: Select all

function love.load()
    player = love.graphics.newImage("assets/untitled.png")
end
function love.draw()
    love.graphics.draw(player, 300, 200)
end
ps.ps

now this startet working magically...dunno why after i did use the second code...

Re: Black Screen

Posted: Sun Jul 16, 2023 1:44 pm
by dusoft
Lovingsoul1337 wrote: Sat Jul 15, 2023 7:29 pm hi i made this code.

Code: Select all

function love.draw()
    love.graphics.print("Hello World!", 0, 0)
  end
already installed the newest version of love and have windows 11 and using this with visual studio code.

i start the code like this.

PS C:\Users\brotm> cd desktop
PS C:\Users\brotm\desktop> love lovepractice
PS C:\Users\brotm\desktop> love --version
PS C:\Users\brotm\desktop> LOVE 11.4 (Mysterious Mysteries)

and i just get a black screen can someone tell me why ?

thanks in advance !

ps. if i do this i see the player drawn.

Code: Select all

function love.load()
    player = love.graphics.newImage("assets/untitled.png")
end
function love.draw()
    love.graphics.draw(player, 300, 200)
end
ps.ps

now this startet working magically...dunno why after i did use the second code...
https://love2d.org/wiki/love.graphics.setColor

Re: Black Screen

Posted: Mon Jul 17, 2023 10:18 am
by Lovingsoul1337
shouldn't this work without calling the setcolor function ?

As the official wiki say's ? (What it's now doe's)

best regards

Lovingsoul1337

Re: Black Screen

Posted: Mon Jul 17, 2023 10:31 am
by GVovkiv
Aren't it by default 1, 1, 1, 1, so you don't need to manually use setColor?

Re: Black Screen

Posted: Mon Jul 17, 2023 11:03 am
by dusoft
GVovkiv wrote: Mon Jul 17, 2023 10:31 am
Aren't it by default 1, 1, 1, 1, so you don't need to manually use setColor?
It is so. But when nothing shows, first thing to debug is using different colors.

Re: Black Screen

Posted: Mon Jul 17, 2023 2:56 pm
by knorke
Lovingsoul1337 wrote: Sat Jul 15, 2023 7:29 pm now this startet working magically...dunno why after i did use the second code...
Maybe the first time you had forgotten to save the file?

Re: Black Screen

Posted: Mon Jul 17, 2023 7:30 pm
by Lovingsoul1337
no could be but i ain't remember if this was so.

Re: Black Screen

Posted: Thu Aug 10, 2023 12:35 am
by Nekhil
It happened to me too
I have put setcolor and everything but it isnt showing up.