-
Notifications
You must be signed in to change notification settings - Fork 112
Artemis vs Ashley: (Don't) Fight!
Disclaimer: i'm one of the maintainers of artemis-odb, might be a bit biased.
Performance For a basic game with a couple hundred entities and limited composition changes, it probably doesn't matter which framework you pick. A minimal artemis-odb setup is basically a slightly faster Ashley with dependency injection.
Artemis-odb benchmarks better towards the extremes; loads of transitions, particles, slow platforms etc. Enabling the more advanced features, artemis-odb becomes both faster and a bigger gun to shoot yourself in the foot with. If you are confident around Java and Gradle (or Maven) doesn't scare you, this shouldn't be too much of an issue. If you are new to Java, ECS or Gradle - Ashley might be a better choice.
Community health: Both frameworks see a fair amount of use and are similarly maintained. Ashley has better support on the libGDX Discord.
Maintenance: If all developers of Ashley get hit by a bus a fork wouldn't be too hard to maintain. If all the developers of artemis-odb get hit by a bus it'll take a bit more effort.
libGDX support: Ashley depends on libGDX for some utility classes, artemis-odb supports libGDX but does not have a dependency on any artifacts.
Prototyping: Artemis-odb has some nice features to prototype really quickly;
- Dependency injection saves a lot of typing.
- Fluid entities make entities really easy to edit without having to use component mappers in the first place
e.pos(10,10).anim("chicken").deleteFromWorld()
(at the cost of some performance). - Save and load: single entities or full levels, Prefabs for parameterized loading. Great when coupled with some basic editor tooling.
tldr; Ashley is at its core a capable ECS with no frills, and part of the core libGDX package. Artemis-odb is performance oriented, feature rich and extensible with several pre-made plugins, requiring a bit more skill to set up.
Core features | Ashley | Artemis | Notes |
---|---|---|---|
Version | 1.7.3 (2017) | 2.2.0 (2019) | |
Part of libGDX | Yes | No | |
libGDX dependency | Yes | No | Ashley depends on libGDX for collections and some other bits. odb has optional modules designed for libGDX, like libGDX-json. |
Setup | Easy | Medium/Experienced** | ** quickstart available |
Dependency injection | No | Built in | |
Reflection on HTML5 | libGDX* | Yes | odb injects component mappers and systems automatically. |
Maximum components | ? | ? | |
Maximum systems | ? | ? | |
Multiple engine instances | yes | yes | |
Entity change listeners | yes | yes | |
Custom update cycle | extend Engine? | via interface | See InvocationStrategy |
Multithreaded access to world | ? | not out of the box | |
Plugin framework | No | Built in | |
Entity exposed | as object | as object or int |
Plugins / Addons | Ashley | Artemis | Details |
---|---|---|---|
Operations-DSL (change entity over time, tweening) | - | Yes | artemis-odb-orion, contrib-plugin-operations |
Events | - | Yes | GMWolf/artemis-odb-eeel, contrib-eventbus |
Fluid entities (convenience fluent API for altering entities) | - | Yes | |
Kotlin DSL | Yes | - | ktx-ashley |
Full/partial World serialization (Json) | - | Yes | 3 lines of code to/from json save |
Full/partial World serialization (binary/Kryo) | - | Yes | 2 lines of code to/from binary save |
System profiler (time-per-system) | - | Yes | contrib-plugin-profiler |
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference