2.4
This version contains some breaking changes which add some more flexibility to Fleks and also keep it up-to-date with other technologies. The most important change is the requirement of Java 11 instead of 8. This seems to be safe nowadays, even for Android. For LibGDX users, please use Gdx-Liftoff as your setup tool which already creates proper Java11 projects.
Changelog:
- Several version updates:
- Kotlin 1.7.21 -> 1.9.0
- Dokka 1.7.20 -> 1.8.20
- Kotlinx-benchmark 0.4.5 -> 0.4.8
- Gradle 7.6 -> 8.2.1
world
function got renamed toconfigureWorld
. I got several comments on my YT videos that people got confused betweenworld
andWorld
(constructor vs DSL function). To make it clear, it got now renamed toconfigureWorld
- Also, the order of
configureWorld
functions no longer matters. Before, it was mandatory to callsystems
last. Now you are free to callinjectables
,systems
,family
in any order. - Kotlinx-serialization got added to Fleks. The
@Serializable
annotation is now part of the entity and makes it easier for certain serialization topics. This was suggested by the KorGE community. - A new
EntityProvider
interface got added which allows to provide your own entity ID logic. Per default it will still use the Fleks built-in recycle ID logic. However, you can now define anEntityProvider
inside theconfigureWorld
function to use your own implementation. This should improve the usability for network gaming. - We now have a new built setup with Gradle 8.x, thanks to @aSemy. The entire gradle setup is now more modern and easier to maintain. Also, Snapshot and LTS releases are now automatically published when the build is successful.
- In addition to the gradle setup changes, Fleks now supports more native targets:
- linuxarm64
- macosarm64
- linuxx64
- macosx64
- mingwx64
ComponentHook
s got replaced by normal component functions. TheComponent
interface now has anonAddComponent
andonRemoveComponent
function which can be overridden to add custom functionality. Both functions run in the context of aWorld
. This makes it easier to write such logic because you no longer need to add theComponentHook
to your world configuration. Thanks to @geist-2501 for the contribution!- documentation fixes for
Entity.configure
function (@aSemy)
For more information about the new functionality, please check out the updated wiki.