isZumpo / ECSGame

A libgdx game using the entity-component-system ashley

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backstory

A while ago a group of friends and I tried to create a game using java and libgdx. However following the object oriented aproach for structuring our code eventually caught up on us. It ended up with a sort of messy code.

Solution

It seems like for more modern game some of the object oriented thinking is thrown away and replaced with a entity-component-system(ECS). Instead of creating multiple objects depending on eachother using inheritance a component system is used which allows easy construction and changing of game functionality. A simple container called a entity holds a list of components and then utilizing a sort of database systems can query for entities with certain components and do logical things with them.

  • Entity - Container
  • Component - Data
  • System - Logic

Libraries

  • Libgdx will be used for everything game related like rendering and helpfull classes like Vectors.
  • Ashley will be used for the entity-controller-system(ECS) as it has good documentation for libgdx. However after futher research artemis might be a better choice as it way faster.
  • Box2D will be used for physics.

About

A libgdx game using the entity-component-system ashley


Languages

Language:Java 88.9%Language:HTML 6.5%Language:CSS 4.5%Language:JavaScript 0.1%