Skip to content

A simple boilerplate for making PSP games using the Entity–component–system architectural pattern with OneLua.

License

Notifications You must be signed in to change notification settings

jcnmsg/OneLua-ECS-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneLua ECS Boilerplate

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.

Usage

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)

Contributions

The code can always improve so feel free to contribute.

License

MIT

About

A simple boilerplate for making PSP games using the Entity–component–system architectural pattern with OneLua.

Resources

License

Stars

Watchers

Forks

Languages