Releases: libktx/ktx
KTX 1.12.1-rc2
Maintenance release with some minor improvements and dependency updates. The last planned release to officially support Kotlin 1.
- [UPDATE] Updated to Kotlin 1.9.25.
- [UPDATE] Updated to Kotlin Coroutines 1.8.1.
- [UPDATE] Updated to Gradle 7.6.4.
- [UPDATE] Updated to Dokka 1.9.20.
- [MISC] JDK 11 or newer is now required to build the KTX project.
- [CHANGE] (
ktx-assets
) Thepool
factory method now attempts to resetPoolable
objects with the defaultdiscard
lambda to match the default libGDX pool behavior. Pass a custom function to override it. - [FEATURE] (
ktx-math
) Added component deconstructing operators for 2D shapes:Rectangle
: x, y, width, heightEllipse
: x, y, width, heightCircle
: x, y, radiusPolygon
: x, yPolyline
: x, y
- [CHANGE] (
ktx-scene2d
)image
factory method can now be called without parameters or withnull
to create anImage
without aDrawable
. - [FEATURE] (
ktx-tiled
) Addeduse
extension method toBatchTiledMapRenderer
that automatically callsbeginRender()
andendRender()
.
KTX 1.12.1-rc1
The first release to support libGDX 1.12.1.
- [UPDATE] Updated to libGDX 1.12.1.
- [UPDATE] Updated to Kotlin 1.9.20.
- [UPDATE] Updated to Kotlin Coroutines 1.7.3.
- [UPDATE] Updated to VisUI 1.5.3.
- [UPDATE] Updated to Dokka 1.9.10.
- [FEATURE] (
ktx-math
) New extension and factory functions were introduced toVector4
, offering similar utilities to the other vectors.vec4
factory methods allow creating newVector4
instances with default and named parameters.+=
,-=
,*=
,/=
mutating operators are now supported.+
,-
(including unary-
),++
,--
,*
,/
operators are now supported, returning new instances of vectors as a result.- Vectors are now comparable by length, adding support for
<
,>
,<=
,>=
operators. Vector4
instances can now be deconstructed into 4 four values (X, Y, Z, W) using extension component methods.dot
infix function allows calculating the dot product of 2 vectors.
Known issues:
- (
ktx-assets
) Pools created via thepool
factory method do not reset the discarded objects by default, which is inconsistent with the libGDX pool behavior. To replicate this, pass adiscard
lambda parameter callingreset
on the discarded objects that implement thePoolable
interface.
KTX 1.12.0-rc1
The first release to officially support libGDX 1.12.0 and Kotlin 1.9.0.
- [UPDATE] Updated to libGDX 1.12.0.
- [UPDATE] Updated to Kotlin 1.9.0.
- [UPDATE] Updated to Kotlin Coroutines 1.7.2.
- [UPDATE] Updated to VisUI 1.5.2.
- [UPDATE] Updated to Dokka 1.8.20.
- [MISC] KTX project should now work locally under JDK 17, including the test suite.
- [FEATURE] (
ktx-app
)KtxInputAdapter
now supports thetouchCancelled
event handling. By default, it calls thetouchUp
method for consistency with the previous libGDX versions.
KTX 1.11.0-rc6
The first KTX release to support the gdxAI library with a new module: ktx-ai
. Includes notable updates to core dependencies.
- [UPDATE] Updated to Kotlin 1.8.21.
- [UPDATE] Updated to Kotlin Coroutines 1.7.1.
- [UPDATE] Updated to Gradle 7.6.1.
- [UPDATE] Updated to Dokka 1.8.10.
- [FEATURE] (
ktx-ai
) new KTX module with utilities and type-safe builders for gdxAI.- Type aliases to avoid name clashes with common libraries:
GdxAiSequence<E>
forcom.badlogic.gdx.ai.btree.branch.Sequence<E>
GdxAiSelector<E>
forcom.badlogic.gdx.ai.btree.branch.Selector<E>
GdxAiRandom<E>
forcom.badlogic.gdx.ai.btree.decorator.Random<E>
- Extension functions for building behavior trees:
add
behaviorTree
dynamicGuardSelector
parallel
randomSelector
randomSequence
selector
sequence
alwaysFail
alwaysSucceed
include
invert
random
repeat
semaphoreGuard
untilFail
untilSuccess
failureLeaf
successLeaf
waitLeaf
- Type aliases to avoid name clashes with common libraries:
KTX 1.11.0-rc5
A maintenance release with a bug fix in ktx-assets-async
for older Android devices.
- [UPDATE] Updated to Kotlin 1.8.10.
- [FIX] (
ktx-assets-async
)AssetStorage
no longer usesConcurrentHashMap.getOrDefault
method unsupported on older Android devices.
KTX 1.11.0-rc4
A maintenance release with support for Kotlin 1.8.0 and notable documentation improvements.
- [UPDATE] Updated to Kotlin 1.8.0.
- [UPDATE] Updated to VisUI 1.5.1.
- [MISC] Project README now includes installation instructions for new projects using
gdx-liftoff
. - [MISC] Sample KTX projects are now generated by
gdx-liftoff
on every release. - [MISC] Removed migration guides from
ktx-scene2d
andktx-vis
README files. If you are migrating from an old KTX version, please refer to the 1.11.0-rc3 tag. - [FEATURE] (
ktx-assets-async
)AssetStorage.silenceAssetManagerWarnings
property was added, allowing to silence logging on non-fatalAssetLoader
issues. - [FEATURE] (
ktx-assets-async
)AssetManagerWrapper
warnings caused byAssetLoader
issues were extended and improved.
Known issues:
- [BUG] (
ktx-assets-async
)AssetStorage
might work incorrectly on older Android devices due to access to unsupported Java APIs (ConcurrentHashMap.getOrDefault
).
KTX 1.11.0-rc3
The first stable release to support a new KTX module: ktx-artemis
.
- [UPDATE] Updated to Kotlin 1.7.22.
- [UPDATE] Updated to Dokka 1.7.20.
- [FEATURE] (
ktx-ashley
) AddedtagFor<Component>
utility functions that automatically create a mapper for a flag component. These properties can be used to check forComponent
presence within theEntity
, as well as automatically add and removeComponent
instances upon property modification. - [FEATURE] (
ktx-artemis
) new KTX module with Artemis-odb entity component system utilities:ktx-artemis
.ArchetypeBuilder.add
andArchetypeBuilder.remove
extension methods for adding and removing components from anArchetypeBuilder
.oneOf
,allOf
,exclude
DSL and extension methods forAspect.Builder
.EntityEdit.plusAssign
operator function for adding components.EntityEdit.with
builder function for adding components to an entity.EntityEdit.remove
extension function for removing components from an entity.EntityTransmuterFactory.add
andEntityTransmuterFactory.remove
extension functions for adding and removing components from anEntityTransmuterFactory
.ComponentMapper.contains
operator function to check if an entity has a component.World.edit
extension builder function to edit an entity.World.entity
extension builder function to create and edit an entity.World.get
operator function for retrieving a system which returns null if it doesn't exist.World.getSystem
extension function for retrieving a system which throws an exception if it doesn't exist.World.mapperFor
extension function for retrieving aComponentMapper
instance.
- [FEATURE] (
ktx-assets-async
)AssetStorage
now stores a basic path-to-type map, which allows it to support moreAssetManager
methods called by someAssetLoader
implementations. These include:AssetManager.contains(String)
AssetManager.get(String)
AssetManager.get(String, Boolean)
AssetManager.get(String, Class, Boolean)
AssetManager.getAssetType(String)
AssetManager.isLoaded(String)
AssetManager.unload(String)
AssetManager.getDependencies(String)
AssetManager.getReferenceCount(String)
Known issues:
- [BUG] (
ktx-assets-async
)AssetStorage
might work incorrectly on older Android devices due to access to unsupported Java APIs (ConcurrentHashMap.getOrDefault
).
KTX 1.11.0-rc2
Maintenance release with support for Kotlin 1.7
and Dokka 1.7
, as well as several new utilities.
- [UPDATE] Updated to Kotlin 1.7.10.
- [UPDATE] Updated to Kotlin Coroutines 1.6.4.
- [UPDATE] Updated to Dokka 1.7.10.
- [MISC] New Dokka theme is available on the documentation website.
- [FEATURE] (
ktx-actors
) AddedActor.onEnter
,Actor.onExit
,Actor.onEnterEvent
andActor.onExitEvent
extension methods that attachClickListener
instances listening for enter and exit events. - [FEATURE] (
ktx-ashley
) AddedComponentDelegate
andOptionalComponentDelegate
that allow accessing component viaEntity
extension properties. - [FEATURE] (
ktx-ashley
) AddedpropertyFor<Component>
andoptionalPropertyFor<Component>
utility functions that automatically create a mapper for the component delegates.
KTX 1.11.0-rc1
The first stable release to support libGDX 1.11.0.
- [UPDATE] Updated to libGDX 1.11.0.
- [MISC] Gradle dependencies changed from compile-only to API scope.
- [FEATURE] (
ktx-app
) AddedgdxError
utility that throws aGdxRuntimeException
. - [FIX] (
ktx-assets-async
) Fixed a niche bug withAsyncAssetManager
which could lead to missed custom user callbacks after attempting to load the same asset concurrently withloadAsync
.
KTX 1.10.0-rc2
A maintenance release with notable changes to the ktx-ashley
and ktx-script
modules.
- [UPDATE] Updated to Kotlin 1.6.21.
- [UPDATE] Updated to Kotlin Coroutines 1.6.1.
- [FEATURE] (
ktx-ashley
) Added utilities for working with Ashley'sEntityListener
interface:EntityAdditionListener
: an interface extendingEntityListener
that only requires implementation of theentityAdded
method.EntityRemovalListener
: an interface extendingEntityListener
that only requires implementation of theentityRemoved
method.Engine.onEntityAdded
andEngine.onEntityRemoved
extension methods that create entity listeners from lambdas.- Wrappers for
Engine.onEntityAdded
andEngine.onEntityRemoved
forIteratingSystem
,IntervalIteratingSystem
andSortedIteratingSystem
that use system'sFamily
andEngine
automatically.
- [FEATURE] (
ktx-script
) AddedKotlinScriptEngine.evaluateOn
methods that can execute scripts with a custom receiver. - [CHANGE] (
ktx-script
) Generic libGDX and Java exceptions replaced with a customScriptEngineException
.