Artemis Entity System Framework

Summary

Artemis is a Entity System framework written in Java, inspired by Adam Martin's articles on Entity Systems. The framework is written by Arni Arent and Tiago Costa.

It also uses design ideas from Fast Entity Component System, but extended to handle "aspects" of entities, that is a set of components. Artemis goes much further.

The framework provides multiple type of systems, and there is a demo game provided. Usage is simple and performance is excellent.

For further details, code, javadoc, jars, demo game and demo code see Artemis site:
http://www.gamadu.com/artemis/

Discussion
http://gamadu.com/forum/
http://slick.javaunlimited.net/viewtopic.php?f=10&t=3076

Ports and forks

artemis-odb - fork and continuation of original Artemis. Sports additional component types, GWT compatible and has greatly improved performance.
https://github.com/junkdog/artemis-odb

A C# port can be found here:
https://github.com/thelinuxlich/artemis_CSharp

Objective-C port:
https://github.com/adamgit/ArtemisObjC

D language port:
https://github.com/elvisxzhou/artemisd

Implementation

Entity is an object that contains the id of the entity, and certain framework related data concerning that entity.

Components contain pure data and are attached to the entities via the EntityManager.

The framework comes with three type of entity systems provided in the library, in order to process the entities.

  • EntitySystem processes a bag of entities that the system is interested in.
  • IntervalEntitySystem processes entities at certain intervals, e.g. every 100 ms., this is great for optimizing the game's performance where some systems don't need to process every game loop.
  • DelayedEntitySystem processes entities when needed, e.g. if you need to expire entities such as bullets or run certain scripts or triggers after a period. This is essentially used as a timer to process entities, a timer that can be reset.

All systems are also provided with a "Processing" system that only processes a single entity at a time.

Managers are provided for tagging and grouping entities.