Search found 2 matches

by Ragusa
Tue Dec 22, 2015 1:04 pm
Forum: Support and Development
Topic: Several Game files
Replies: 8
Views: 5017

Re: Several Game files

I think OP was talking about require(). To organize your game files into different modules, you can just put a require('yourModuleName') at the top of your main.lua and it will carry over all your global variables/functions to main.lua as if it were all one file. When you require() a lua file, don'...
by Ragusa
Mon Dec 21, 2015 8:43 pm
Forum: Support and Development
Topic: Several Game files
Replies: 8
Views: 5017

Several Game files

Hello! I have been using love2d a bit now and I have taught it to myself by googling stuff. But there is one thing I cannot find out how to do after several google sessions: I want to load another lua file from the main.lua, so I can have a Menu file, a game file and such. How do I go about doing so...