A simple boilerplate for making PSP games using the Entity–component–system architectural pattern with OneLua. The framework is implemented based on this tutorial on how to develop a simple ECS framework for Love2D.
Simple clone this repository and start hacking away. The entities/components/systems included in the example library are just that, examples, so feel free to remove them once you're comfortable with creating your own.
Creating a component:
local example_component = ECS.Component.new("example_component")
Creating a system that requires x components:
local example_system = ECS.System.new("example_system", { "example_component" })
Creating an entity:
local example_entity = ECS.Entity.new()
ECS.World.add(example_entity)
-- or create and add automatically to the world
local example_entity = ECS.World:create()
Adding component to an entity:
example_entity.add(example_component)
The code can always improve so feel free to contribute.
MIT