Page 1 of 1

Very noob question. I only get black screens.

Posted: Sat Dec 04, 2010 2:04 am
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. :(

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

Posted: Sat Dec 04, 2010 2:08 am
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?

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

Posted: Sat Dec 04, 2010 2:14 am
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"

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

Posted: Sat Dec 04, 2010 9:47 am
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 .