Their code targets an older version of Love, so I figured I'd clean things up while I'm at it.
The code uses some 3rd party Lua (such as https://github.com/Ulydev/push), so I wanted to drop the third party code into a common directory and just reference it from each project rather than leaving copies everywhere.
My directory structure is like this:
- common/push - Ulydev's push repo, so common/push/push.lua exists here
- pong/pong-0/main.lua - Initial version of the Pong implementation
- pong/pong-1/main.lua - next iteration
Code: Select all
-- Can't find push.lua at the require() call. love.filesystem.setRequirePath(love.filesystem.getRequirePath() .. ';../../common/push') -- Also doesn't work. love.filesystem.setRequirePath(love.filesystem.getRequirePath() .. ';C:/cygwin64/home/Chris/git/harvard-game50/common/push') -- This works, but I don't really understand why I have to include the filename, push.lua. package.path = package.path .. ';../../common/push/push.lua' push = require 'push'