Skip to content

Releases: Quillraven/Fleks

2.10

05 Nov 09:14
Compare
Choose a tag to compare

Changelog:

  • NEW: new single and singleOrNull functions for EntityBag
  • UPDATE: comparator and sortingType of a system are protected again instead of private
  • UPDATE: update following versions
    • gradle 8.10 -> 8.10.2
    • Kotlin 2.0.20 -> 2.0.21
    • kotlinx-serialization: 1.7.2 -> 1.7.3
    • kotlinx-benchmark: 4.11 -> 4.12
  • BUGFIX: fixed hashCode function of EntityBag. This fixes an issue if you have more than 64 components. (#159)

Shoutout to @AnderWoche for reporting the issues and helping in resolving them!

2.9

01 Sep 19:07
Compare
Choose a tag to compare
2.9

Changelog:

  • NEW: new isMarkedForRemoval entity extension function (#153)
  • NEW: systems can now be added and removed after world configuration (#145)
  • NEW: new systemOrNull function (#146)
  • NEW: new first and firstOrNull with predicate argument function on family (#147)
  • NEW: new update method on world using Kotlin's Duration (#152) [thanks to @RefuX]
  • UPDATE: update following versions
    • gradle 8.7 -> 8.10
    • Kotlin 2.0.0 -> 2.0.20
    • kotlinx-serialization: 1.7.1 -> 1.7.2

2.8

27 Jun 05:00
Compare
Choose a tag to compare
2.8

Changelog:

  • NEW: new wasm build target (#140)
  • UPDATE: update following versions
    • gradle 8.7 -> 8.8
    • Kotlin 1.9.23 -> 2.0.0
    • kotlinx-serialization: 1.6.4 -> 1.7.1
    • kotlinx-benchmark 4.10 -> 4.11

2.7

06 May 17:15
8f6cc7c
Compare
Choose a tag to compare
2.7

Changelog:

  • NEW: new partition and partitionTo function for EntityBag [#141]
  • UPDATE: optimized notifications for families. A family is now notified only once per world.entity or world.configure call, even in nested call scenarios [#138]
  • UPDATE: update gradle to 8.7 and use configuration cache
  • UPDATE: update github action versions to current latest ones
  • UPDATE: update following versions
    • Kotlin to 1.9.23
    • Dokka to 1.9.20
    • Kotlinx-Serialization to 1.6.3
    • Kotlinx-Benchmark to 0.4.10

2.6

17 Dec 17:05
a405044
Compare
Choose a tag to compare
2.6

Changelog:

  • NEW (BREAKING CHANGE): new onInit function of a system which gets called after the world is configured
    • the creation of entities in a system's constructor now throws an exception. Such logic must be moved to the onInit function. This is a necessary change to keep consistency of hooks and families in that specific scenario. [#128]
  • NEW: new onEnable / onDisable functions for systems to react on enabled changes. [#127]
  • NEW: new FamilyOnAdd / FamilyOnRemove interfaces that can be used on IteratingSystem to add family hooks for the system's family in an easier way. Refer to the wiki for more details. [#128]
  • UPDATE: Update versions:
    • Kotlin 1.9.21
    • kotlinx.serialization 1.6.2
    • Gradle 8.5
  • UPDATE: onEntityRemoved of a family is now called BEFORE the entitiy's components are removed. [#120]
  • UPDATE: Fixed an issue that you can write it = Component which broke Fleks internally. This was introduced with the Tags feature and will now show you a compile error again. [#125]
  • UPDATE: Systems onDispose and systems' onRemoveEntity functions are called in reverse order. Before, the order was the order of systems of the world. [#130]
  • UPDATE: extracted the sorting logic of a system to a separate onSort function and made the sorting attributes protected instead of private. This allows a better support for overriding the onTick function, if needed. [#133]

Shoutout to @metaphore for the different suggestions and contributions!

2.5

20 Oct 04:09
9471557
Compare
Choose a tag to compare
2.5

Changelog

  • NEW (BREAKING CHANGE): Entities are no longer value classes. They are now a data class that contains the previous id and a new version. With this new functionality it is now way easier to safely reference entities in components. Big shoutout to @dragbone for the contribution! [#115]
  • NEW: A new EntityTag functionality was added which is a more memory efficient and faster way to create components without data. Thanks to @LobbyDivinus for the suggestion and help during development [#119]
  • NEW (BREAKING CHANGE): a new Snapshot class was introduced to support the new EntityTag functionality. Check the wiki's serialization page for more details
  • UPDATE: Wiki contains updates for the new functionalities and an updated serialization page using kotlinx-serialization with the latest changes
  • UPDATE: improved ComponentsHolder memory usage slightly (no longer stores a string property of its name) [#110]
  • UPDATE: great performance improvement for BitArray usage which makes entity creation and removal even faster. Thank you @tommyettinger for the contribution! [#111]
  • UPDATE: memory improvement for MutableEntityBag. Thanks to @LobbyDivinus [#117]
  • UPDATE: some minor improvements when it comes to serialization with kotlinx-serialization
  • UPDATE: following versions got updated:
    • Kotlin 1.9.10
    • Dokka 1.9.10
    • Benchmark 0.4.9
    • Kotlinx-serialization 1.6.0
    • Gradle 8.4
  • BUGFIX: fixed a potential issue when iterating over the same family in a nested way while modifying it

2.4

22 Jul 16:06
1bbdffb
Compare
Choose a tag to compare
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 to configureWorld. I got several comments on my YT videos that people got confused between world and World (constructor vs DSL function). To make it clear, it got now renamed to configureWorld
  • Also, the order of configureWorld functions no longer matters. Before, it was mandatory to call systems last. Now you are free to call injectables, 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 an EntityProvider inside the configureWorld 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
  • ComponentHooks got replaced by normal component functions. The Component interface now has an onAddComponent and onRemoveComponent function which can be overridden to add custom functionality. Both functions run in the context of a World. This makes it easier to write such logic because you no longer need to add the ComponentHook 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.

2.3

26 Feb 17:05
Compare
Choose a tag to compare
2.3
  • NEW: EntityHook to react on entity creation and removal. They are added via the world configuration with onAddEntity and onRemoveEntity
  • NEW: componentTypeOf utility function to easily create a ComponentType. This makes it a little bit shorter and more readable for components with multiple types.
  • NEW: plusAssign function with a List<Component*>> parameter to assign multiple components at once to an entity. This will be useful in certain special cases where the normal typesafe variant is to restrictive.
  • NEW: loadSnapshotOf function to load a snapshot of a specific entity. This is similar to loadSnapshot but for a single entity.
  • UPDATE: minor grammar fixes (missing ,) in some docs
  • UPDATE: update Gradle to 7.6

2.2

26 Nov 18:13
Compare
Choose a tag to compare
2.2
  • BUGFIX: fixed an issue that was introduced in version 2.1 which caused families to not get updated properly when used in a nested iteration way. Thanks to @ernespn for reporting this issue!
  • NEW: added the get operator to the EntityBag interface. This allows to do a normal for loop over a family. Thanks to @ScottHamper for the proposal and contribution!
  • UPDATE: updated Kotlin to 1.7.21

2.1

23 Oct 16:40
Compare
Choose a tag to compare
2.1

A small update that brings some collection functionality when working with entities (EntityBag):

  • UPDATE: Kotlin and Dokka to 1.7.20
  • UPDATE: change Entity back to value class instead of data class
  • UPDATE: nested calls of entity and entity.configure are now possible. Also, the documentation of those two functions got updated to point out a potential risk.
  • NEW: add entity contains function to family
  • UPDATE: IntBag is now split into two classes: EntityBag and MutableEntityBag. You can use them in your own game if you want.
  • NEW: add a lot of collection functionality to EntityBag (thanks to @rubybrowncoat for the suggestion):
    • size
    • contains, containsAll
    • isEmpty, isNotEmpty
    • all, any, none
    • associate, associateBy, associateTo, associateByTo
    • count
    • filter, filterNot, filterIndexed, filterTo, filterNotTo, filterIndexedTo
    • find
    • first, firstOrNull
    • fold, foldIndexed
    • forEach, forEachIndexed
    • map, mapIndexed, mapTo, mapIndexedTo, mapNotNull, mapNotNullTo
    • random, randomOrNull
    • take
    • groupBy, groupByTo
    • flatMap, flatMapSequence, flatMapBag, flatMapNotNull, flatMapSequenceNotNull, flatMapBagNotNull