4

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.

1
  • try typing in love . Commented Dec 8, 2022 at 19:41

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

I have no experience with flatpack but could it be a permission issue? docs.flatpak.org/en/latest/sandbox-permissions.html Did you try love . in the working directory?
Yes love . had the same result. I'll check for permission issues after work and post back here if it yields some results.
Do MAIN=~/test && env -i DISPLAY=:0 love ${MAIN} work for you?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.