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.
Post Reply
Lovingsoul1337
Citizen
Posts: 53
Joined: Fri Feb 21, 2020 1:26 pm

Black Screen

Post 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...
User avatar
dusoft
Party member
Posts: 539
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Black Screen

Post 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
Lovingsoul1337
Citizen
Posts: 53
Joined: Fri Feb 21, 2020 1:26 pm

Re: Black Screen

Post 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
User avatar
GVovkiv
Party member
Posts: 678
Joined: Fri Jan 15, 2021 7:29 am

Re: Black Screen

Post by GVovkiv »

Aren't it by default 1, 1, 1, 1, so you don't need to manually use setColor?
User avatar
dusoft
Party member
Posts: 539
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Black Screen

Post 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.
User avatar
knorke
Party member
Posts: 262
Joined: Wed Jul 14, 2010 7:06 pm
Contact:

Re: Black Screen

Post 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?
Lovingsoul1337
Citizen
Posts: 53
Joined: Fri Feb 21, 2020 1:26 pm

Re: Black Screen

Post by Lovingsoul1337 »

no could be but i ain't remember if this was so.
Nekhil
Prole
Posts: 1
Joined: Thu Aug 10, 2023 12:15 am

Re: Black Screen

Post by Nekhil »

It happened to me too
I have put setcolor and everything but it isnt showing up.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests