I just started to learn lua and like to work with it on a mac.
I installed Lua using Brew and can execute the files via terminal.
And now I like to work with Love2d like the guy in this (i think great) tutorial.
https://youtu.be/I549C6SmUnk?t=7020
In the section "Setup and LUD basics" (after 1 hour 57 minutes) he is installing love2d.
I downloaded löve for mac and can start it via the app (to see the balloon that is flying).
But I like to use it with the terminal, like in the video. So I use:
Code: Select all
_G.love = require("love")
What am I missing?lua: main.lua:1: module 'love' not found:
no field package.preload['love']
no file '/usr/local/share/lua/5.4/love.lua'
no file '/usr/local/share/lua/5.4/love/init.lua'
no file '/usr/local/lib/lua/5.4/love.lua'
no file '/usr/local/lib/lua/5.4/love/init.lua'
no file './love.lua'
no file './love/init.lua'
no file '/usr/local/lib/lua/5.4/love.so'
no file '/usr/local/lib/lua/5.4/loadall.so'
no file './love.so'
stack traceback:
[C]: in function 'require'
main.lua:1: in main chunk
[C]: in ?
How can I tell lua where to find love (or the other way arount)?
I know I could start the app using the description here:
https://love2d.org/wiki/Getting_Started
But I would like to understand, what (and how) he is doing it.
Thank you so much :-)