Skip to content

vallrand/vinculum

Repository files navigation

Vinculum

github-pages Status

Puzzle Platformer. Entity Component System / TypeScript Demo.

Demo

Build

npm install
npm run start //development
npm run build //production

Open Browser at http://127.0.0.1:9000?debug

Features

  • Spritesheet packing and optimization.
  • 2D Batched renderering.
  • 2D Physics.
  • Audio
  • Animation System
  • Particle System

Framework

Creating system example:

class LogicSystem extends ProcedureSystem {
    private readonly components: DataView<LogicComponent>
    constructor(manager: EntityManager, options){
        this.components = manager.aquireDataView(LogicComponent)
    }
    execute(context: IUpdateContext){
        for(let i = 1; i <= this.components.data.length; i++)
            this.components.data.get(i).updateLogic()
    }
}

const manager = new EntityManager()

manager.registerSystem(LogicSystem, options)

Creating entity example:

const entity = manager.createEntity()

manager.createComponent(entity, Transform2D, { position: [100, 200] })
manager.createComponent(entity, Material, { texture: 'assets/texture.png' })
manager.createComponent(entity, Sprite2D)
manager.createComponent(entity, LogicComponent, { value: 112 })

About

Puzzle Platformer demo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors