Black screen when running code in love2d

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
Dorito10
Prole
Posts: 3
Joined: Sun Jan 15, 2023 3:17 am

Black screen when running code in love2d

Post by Dorito10 »

Hello, I am new I just installed love2d supported by a tutorial on youtube, I completed every step, My compiler is visual studio code, At the moment of wanting to run a test code dragging the folder with the main.lua file, only a black screen appears with nothing else I tried several codes that I saw on the internet quite simple But none managed to do anything
Last edited by Dorito10 on Sun Jan 15, 2023 10:42 am, edited 2 times in total.
User avatar
knorke
Party member
Posts: 238
Joined: Wed Jul 14, 2010 7:06 pm
Contact:

Re: Black screen when running code in love2d

Post by knorke »

Hello
that example works for me.
First the obvious question even if it sounds silly:
Did you try to click in the black window?
What the code does is randomly changing the background if the user clicks on the window.
Dorito10
Prole
Posts: 3
Joined: Sun Jan 15, 2023 3:17 am

Re: Black screen when running code in love2d

Post by Dorito10 »

I did not click the black window but yeah Apparently the color does change, but still no text or figures appear
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: Black screen when running code in love2d

Post by Andlac028 »

This one example only changes background color on click, you can try some tutorials on wiki to help you in the beginning.

But make sure you use same love version as tutorial is made for (newest is 11.4, so use 11.0 - 11.4 tutorials)
Dorito10
Prole
Posts: 3
Joined: Sun Jan 15, 2023 3:17 am

Re: Black screen when running code in love2d

Post by Dorito10 »

Sorry I was distracted my bad lol
Post Reply

Who is online

Users browsing this forum: No registered users and 50 guests