Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Component based entity system in scala

I'm searching some library which implement the Component Based Entity System (ECS) framework used in multiple game and implementend in many game engine (unity, libgdx, etc.)

I'm starting a little game project in scala ( ECS roguelike), and at this time i only find a java library named ashley.

Do you know if other ECS libraries (in Scala) exists, or if the only way is to use or reimplement this library in scala (ashley) ?

Another related question, the Actor paradigm and Component Based Entity System is not so distant, what is the difference ?

like image 932
reyman64 Avatar asked Sep 03 '15 15:09

reyman64


People also ask

What is an ECS in programming?

Entity Component System (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on entities' components.

Is ECS better than OOP?

There are cases where ECS would be a better fit to use while there are cases befitting OOP as well. For game development, ECS would be the way to go. High-profile game developers greatly encourage the application and design following ECS instead of OOP as it provides more flexibility and better performance.

What is a component system?

A component system is comprised of individual equipment or material items connected together to operate as a system, such as when individual computers and servers are joined together to create a network.


1 Answers

Regarding the question about differences with an Actor system, the purpose of an Actor system is to allow asynchronous communication between actors. i don't see anything in ECS which is related to asynchronicity. In fact, from one of your links:

Each system will be updated once per frame in a logical order

This implies synchronous, blocking progress through the program, so quite different from an actor system where the components would be sending each other messages in a concurrent fashion.

Regarding your need for an ECS library in Scala. Scala and Java are interoperable, is there any reason you can't simply use ashley within your scala code?

like image 149
mattinbits Avatar answered Oct 03 '22 11:10

mattinbits