Very noob question. I only get black screens.

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
kanttarino
Prole
Posts: 2
Joined: Sat Dec 04, 2010 1:59 am

Very noob question. I only get black screens.

Post by kanttarino »

Hello everyone. I have been testing löve for 3 days, but I just get black screens.
No matter if I copy some code, or if I try to write something, everytime I compile (I think I am compiling) I get the same black screen.

I am using Ubuntu 10.10 x64 and Löve 0.5.0 (Ubuntu updater don't let me update to a newer one)

Don't know what to do. :(
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Very noob question. I only get black screens.

Post by tentus »

Just to confirm, love files created by others are rendering properly, correct?

If so, could you post some code that you have tried?
Kurosuke needs beta testers
kanttarino
Prole
Posts: 2
Joined: Sat Dec 04, 2010 1:59 am

Re: Very noob question. I only get black screens.

Post by kanttarino »

I tried this code right now, http://love2d.org/wiki/love.filesystem.enumerate, and get the same black screen. I think that I am doing something wrong, but don't know what is.

Code: Select all

function love.load()
    filesString = recursiveEnumerate("", "")
end

-- This function will return a string filetree of all files
-- in the folder and files in all subfolders
function recursiveEnumerate(folder, fileTree)
    local lfs = love.filesystem
    local filesTable = lfs.enumerate(folder)
    for i,v in ipairs(filesTable) do
        local file = folder.."/"..v
        if lfs.isFile(file) then
            fileTree = fileTree.."\n"..file
        elseif lfs.isDirectory(file) then
            fileTree = fileTree.."\n"..file.." (DIR)"
            fileTree = recursiveEnumerate(file, fileTree)
        end
    end
    return fileTree
end
    
function love.draw()
    love.graphics.print(filesString, 0, 0)
end
I compile it with: love "path"
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Very noob question. I only get black screens.

Post by bartbes »

That code is for love 0.6.0 and higher, unfortunately 0.5.0 broke the API hard. Since you're on ubuntu you might want to try adding my ppa at ppa:bartbes/love-stable .
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 23 guests