AKA "Project Ben Biri"
Game for Ludum Dare 47 - "Stuck in a loop"
- Install Love2d https://love2d.org/#download
- (Windows) add "C:\Program Files\LOVE" to your path - guide
In VSCode, press F4 then choose "Launch game".
Copy files into /src/lib then reference them with `require "lib/"
Create a class with
MyClass= { }
functionMyClass:create()
instance= {}
setmetatable(instance, self)
self.__index=selfreturninstanceendextend a class with
SubClass=MyClass:create()add a method to your class with
functionClass:foo()
print("Hello world");
end-- Methods on subclasses will be used instead of the method on the parent class.functionSubClass:bar()
self.foo()
endcall methods with :
localinstance=SubClass:create()
instance:bar() -- This will print "Hello world"set and define properties with .
instance.prop="hi"print(instance.prop)