I am relatively new at game development, so I am still trying to find a good workflow for making new games.
First of all, let me just say that this community is amazing. There is always someone who is willing to help on the IRC.
So I made a function that helps you load all your helper scripts:
Code: Select all
function grab(folder)
--print("Opening " .. folder)
files = love.filesystem.getDirectoryItems(folder)
--print(folder .. " has " .. #files .. " files")
for k, file in ipairs(files) do
local path = folder.."/" .. string.sub(file, 0, -5)
require(path)
print("Loading ".. path)
end
end
All you need to do to use it is:
Code: Select all
function love.load()
grab("folder1")
grab("folder2")
grab("folder3")
end
Have fun.