This Entity Component System (ECS) represents a manageable set of classes and interfaces that realize a component-based entity management for interactive applications and games.
The ECS does not contain any references to other external packages or libraries and can be used together with any game or graphics library to created applications that need entity management. However, due to the fact that is was originally intended to be used together with the Simple Game Library (SGL), it follows the intention and spirit of SGL. This means that the way it is implemented is more dedicated to idea of being readable and comprehensible and not of being the fastest component system on this planet.
Nonetheless, ECS happened to turn out as usable and fast-enough component system in each and every case of its reported usage. In almost any case where performance issues need to be addressed, the component-system is unlikely to be the bottleneck.
If you tend to disagree regarding these performance considerations, this is perfectly fine - but please do not tell us or start a discussion. Go ahead and use another component-system and be happy with it and so are we.
THIS CODE IS PROVIDED AS EDUCATIONAL MATERIAL AND NOT INTENDED TO ADDRESS ALL REAL WORLD PROBLEMS AND ISSUES IN DETAIL.
Release Date: unpublished
- Made EngineSystem abstract.
- Added abstract IteratingSystem that processes one family of entities.
- Added some additional JavaDoc comments.
- System can be enabled or disabled.
Release Date: 2016-05-03
- Convenience methods in Component are final now.
- Engine class offers option to iterate through all registered systems.
- Added support for entity listeners that get informed if entities get added or removed.
- Added method to Entity class to retrieve a list of components of a specific type.
- Added simple event system using signals to transmit events.
- Added
removeAll
method which removes all entities at once.
Release Date: 2016-04-16
- Fixed bug in component base class preventing components to get activated.
- Fixed several bugs in entity class.
- Added convenience method
getSystem()
to component base class. - Added convenience method
getComponent()
to component base class. - Added convenience method
getEngine()
to component base class.
Release Date: 2016-04-15
- Added JavaDoc comments.
- Improved access modifiers for several methods.
- Components are now deactivated in reverse order.
Release Date: 2016-04-14
- Initial version.