문제

Sorry, this is a total Lua-noob question, but from what I have learned about LÖVE so far, it seems that in order to use it, you must run the love executable on a folder/.love file with a main.lua file in the root.

Is it possible, as an alternative, to write an arbitrarily-named Lua script and just require("love") instead, or do you have to start your app with the love executable? (And if so, how?)

도움이 되었습니까?

해결책

You really need to run it with love.exe

It is possible to build love as a shared library so you could, in principle, write an openlib wrapper over it. However, to get it to work in a reasonable fashion as a lua module would need a fair amount of work.

I wouldn't want to put you off doing this if that's of interest to you but it's not really intended to work that way.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top