Sir Robin
Sir Robin

Reputation: 176

love2d - cannot run hello word

I just started learning love2d but I can't test it because it does not seem to detect any main.lua file in the directory passed as argument.

Here's a bash output that quickly summarize the issue:

~/test ❯ pwd   
/home/simon/test
~/test ❯ lse -a
Permissions Size User  Group Date Modified Name
.rwxrwxrwx    74 simon simon  8 Dec 15:52  main.lua
~/test ❯ love /home/simon/test
Error: [love "boot.lua"]:323: Cannot load game at path '/home/simon/test'.
Make sure a folder exists at the specified path.
stack traceback:
    [love "boot.lua"]:345: in function <[love "boot.lua"]:341>
    [C]: in function 'error'
    [love "boot.lua"]:323: in function <[love "boot.lua"]:126>
    [C]: in function 'xpcall'
    [love "boot.lua"]:355: in function <[love "boot.lua"]:348>
    [C]: in function 'xpcall'
~/test ❯ cat main.lua                 
function love.draw()
    love.graphics.print("Hello World", 400, 300)
end

The exact same command and script works on the Windows 10 laptop of my colleague. On my side I'm using Ubuntu 22.04.1 and love2d has been installed to the latest stable version (11.4) using Flatpak.

Upvotes: 4

Views: 279

Answers (1)

Sir Robin
Sir Robin

Reputation: 176

So in the end I managed to resolve that issue by building love2d from source and using that to run the hello world.

I don't know why the Flatpak installation didn't worked (just typing love in the terminal was correctly displaying the "no game" window just as it would do on my coworker's machine), I'll check if there were additional configuration steps with that kind of install and post it here if it's the case

Upvotes: 1

Related Questions