Love 2d showing black screen

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Lekic
Prole
Posts: 5
Joined: Tue Sep 15, 2020 9:56 pm

Love 2d showing black screen

Post by Lekic »

Please i downloaded love2d some weeks ago then working with it with code compiler so yesterday when i wanted to run a code on it the love2d was just a black screen.please what happened and what can i do?
Attachments
Screenshot_20200914-074126.png
Screenshot_20200914-074126.png (14.88 KiB) Viewed 6538 times
Screenshot_20200914-074138.png
Screenshot_20200914-074138.png (112.66 KiB) Viewed 6538 times
User avatar
AuahDark
Party member
Posts: 107
Joined: Mon Oct 23, 2017 2:34 pm
Location: Indonesia
Contact:

Re: Love 2d showing black screen

Post by AuahDark »

Honestly I don't see anything wrong. What about this very little example? It should draw red and blue rectangle with white text.

Code: Select all

function love.draw()
    love.graphics.setColor(1, 0, 0)
    love.graphics.rectangle("fill", 10, 10, 20, 20)
    love.graphics.setColor(1, 1, 1)
    love.graphics.print("In white")
    love.graphics.setColor(0, 0, 1)
    love.graphics.rectangle("fill", 25, 25, 20, 20)
    love.graphics.setColor(1, 1, 1)
    love.graphics.print("In blue but actually white")
end
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Lekic
Prole
Posts: 5
Joined: Tue Sep 15, 2020 9:56 pm

Re: Love 2d showing black screen

Post by Lekic »

Still the same black screen 😕
User avatar
CogentInvalid
Prole
Posts: 27
Joined: Sat Dec 14, 2013 12:15 am

Re: Love 2d showing black screen

Post by CogentInvalid »

Your file should be named main.lua.
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: Love 2d showing black screen

Post by Jeeper »

Just like "CogentInvalid" pointed out, Löve requires you to name your main file "main.lua".
Also it would be best to share the file, rather than a printscreen. Bonus points if you do it in the "Support and Development"
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 4 guests