Releases: littlektframework/littlekt
v0.11.0
Release Info
A smaller release but we made some big upgrades in terms of WGPU and moving on from JDK 21 with a new minimum of JDK 22. This may break a few things since we no longer need --enable-preview
but hopefully this should be as simple as removing that JVM argument.
Changes
- BREAKING: Update minimum JDK from 21 to 22.
--enable-preview
is no longer needed. - Update
wgpu
from0.19.4.1
to22.1.0.5
. - BREAKING:
rect.interescts(left, top, right, bottom)
has been reorder to a more natural way:
rect.intersects(left, bottom, right, top)
- Fix
rect.intersects(rect2)
to pass in correct coordinates. - Fix indices & vertices being overwritten, when they shouldn't be, when ensuring buffer size inside
Mesh
and
IndexedMesh
. - Fix
JsByteSequenceStream
from attempting to flip the passed inBuffer
in order to read. It now assumes the buffer
is in a ready-to-ready state. - Add new stats to
EngineStats
:setPipeline
calls per framesetBindGroup
calls per frameset*Buffer
calls per frame
- Fix
IndexedMeshGeometry.clearIndices
not resetting the total tracked indices back to 0.
Commit Details
What's Changed
- update
wgpu
from0.19.4.1
to22.1.0.5
by @LeHaine in #289 - js: fix JsByteSequenceStream flipping a buffer on init by @LeHaine in #290
- fix bug with certain indices & vertices being overwritten when ensuring buffer size inside Mesh & IndexedMesh by @LeHaine in #291
- stats: update EngineStats to include setPipeline, setBindGroup, and set*Buffer calls tracking by @LeHaine in #292
- update rect.intersects() & reorder params to a more natural way (x,y,x2,y2) by @LeHaine in #293
- fix IndexedMeshGeometry clearIndices not actually clearing the total number tracked indices back to 0 by @LeHaine in #294
Full Changelog: v0.10.2...v0.11.0
v0.10.2
Release Info
Changes
- Fix
Rect.intersects
to use correct top & bottom coordinate during calculation. - Fix
InputMapController
bindings are triggered without modifiers when a modifier is pressed. - Fix jvm
AudioStream
volume not being able to be set to0
. - Update
TiledLayer.visible
to be mutable. - Add support for object within a tile in
Tiled
maps - Add fetching tile ID by coordinates in
TiledLayer
. - Fix GamePad button axis strength calculation not using the negative input resulting in buttons not affecting axis
strength - Fix
Animation.getFrame(index)
andAnimation.getFrameTime(index)
from being able to go out index bounds. - Add new
Vfs
subtypes:UrlVfs
andLocalVfs
.Context
now has threeVfs
types:resourcesVfs
for loading from theresources
directory. This handles loading from fat JARs fine now (fixes
#275)urlVfs
for loading directly from a URL or data URL.applicationVfs
for loading files at the root of the application working directory.
- Update internal JVM
readPixmap
to usestbimage
instead ofImageIO
- Fix
IndexedMeshGeometry
index buffer size calculation - Add
Compression
interface withCompressionGZIP
implementations for jvmAndroid & js. - Fix
AssetProvider.fullyLoaded
calculation to take into account the active job - Update
kotlin
from2.0.0
to2.1.0
- Update
kotlinx.serialization
from1.7.0
to1.7.3
- Update
kotlinx.atomicfu
from0.24.0
to0.26.1
- Update
kotlinx.coroutines
from1.9.0-RC
to1.9.0
- Update
LWJGL
from3.3.3
to3.3.4
- Internal code clean up
- Documentation tweaks and clean up
Commit Details
What's Changed
- math: update Rect.intersects to use the correct top & bottom rect coordinate by @LeHaine in #267
- Allow zero volume in OpenALAudioStream by @yufimtsev in #272
- Allow to toggle TiledLayer visibility by @yufimtsev in #270
- Support objects within a Tile for Tiled maps by @yufimtsev in #271
- Fix the problem of gamepad buttons not being able to affect axis strength in InputMapController by @yufimtsev in #268
- Fix out-of-bounds for Animation frames by @yufimtsev in #269
- Add new
Vfs
sub-types:UrlVfs
&LocalVfs
by @LeHaine in #276 - Fix exclusive multitouch controls to correctly track all the pointers by @yufimtsev in #277
- Unstuck all the gamepad buttons by default when their states are null by @yufimtsev in #278
- remove a bunch of internal byte array extensions by @LeHaine in #280
- jvm: update internal 'readPixmap' to use stbimage instead of ImageIO by @LeHaine in #281
- fix IndexMeshGeometry
ensureIndices
calculation by @LeHaine in #282 - file: add Compression interface and CompressionGZIP implementations for jvmAndroid & js by @LeHaine in #283
- bump versions on dependencies by @LeHaine in #284
- update kotlinx.coroutines to 1.9.0 by @LeHaine in #285
- AssetProvider is not fully loaded while the job is active by @yufimtsev in #273
- examples: tweak ldtk level rendering on a couple examples by @LeHaine in #286
New Contributors
- @yufimtsev made their first contribution in #272
Full Changelog: v0.10.1...v0.10.2
v0.10.1
Some minor fixes:
Release Info
Fixes
- Fix miscalculation for scene-graph
Cotnrol.anchor()
forTOP_*
related layouts. - Fix
AssetProvider
to asset preparation logic not preparing additional assets after the initial preparation.
Commit Details
What's Changed
- graph: fix miscalculation for Control anchor TOP_* related anchors by @LeHaine in #265
- core: update AssetProvider to allow for prepared to be invoked multiple times by @LeHaine in #266
Full Changelog: v0.10.0...v0.10.1
v0.10.0 - OpenGL is Dead! Long Live WebGPU!
This is a huge release as it is nearly an entire rewrite of the framework from OpenGL to WebGPU. The reason for the rewrite was wanting to keep the framework modern by using modern graphic APIs. WebGPU fits that bill. The OpenGL version of the framework is archived in the opengl branch. This branch will no longer receive updates.
There is bad news as we lost a couple platform targets, Android and WASM. Android is still planned to be supported but the work needed to get a JNI bridge up to work with WGPU is pretty huge and I wanted to focus on getting desktop and browser via JS working.
There is good news for those who are apprehensive to moving on from OpenGL to WebGPU. The LittleKt API is mostly the same. We can still use our sprite batching, manipulate cameras, play with textures, and all that fun stuff. There is just a bit more extra work to setup the rendering process, which isn't much at all. There is an examples modules with loads of samples to test out and to reference. Some use the LittleKt APIs and others use just the low-level WebGPU APIs.
This release brings dozens upon dozens of fixes and minor optimizations that were found during the rewrite. I am pretty happy with where this is all at now and hope you all do too.
Release Info
Breaking
- Replace all of OpenGL with WebGPU. The overall API is mostly the same, save for the specifics of having to use
WebGPU. These changes are too large to fit in a changelog but can be checked out on the documentation and migrated.- Much of the API under
graphics.*
has changed but stayed relatively the same. E.g.SpriteBatch
contains the
samebegin() -> draw() -> end()
flow but requires WebGPU specific classes. graphics.gl.*
classes replaced withgraphics.webgpu.*
- Much of the API under
- Remove the Android target until a generator can be created for the WGPU natives for JNI (Future update).
- The module group id, for defining in dependencies, has been changed from
com.lehaine.littlekt
tocom.littlekt
. - The scene-graph module has been extracted into its own package and will explicitly be defined in your
dependencies:com.littlekt:scene-graph
- Remove
FrameBufferNode
and related UI classes. UseCanvasLayerContainer
andCanvasLayer
for FBO related
purposes. - Remove
FrameBuffer
class. WebGPUsRenderPass
is essentially a Framebuffer / Render target. - Remove
GlslGenerator
and all related classes. UseWGSL
for your shader needs, either by loading them from a file
or directly in a string. - Remove
vSync
andbackgroundColor
configuration options. - Remove
Game<T>
andScene<T>
classes as they aren't in scope of the framework. - Rename
Disposable
to beReleasable
as well asdispose()
torelease()
. - Remove
FitViewport
andFillViewport
as they don't work with the current viewport limitations WebGPU imposes.
WebGPU doesn't allow out-of-bounds viewports which causes a fatal error. There is no workaround without getting clever
with shaders. - Update
TextureSlice.originalWidth/Height
&TextureSlice.packedWidth/Height
toactualWidth/Height
andtrimmedWidth/Height
, respecitively.
Changes
- Add new
wgpu-ffm
module. - Add new
wgpu-natives
module. - Add new
SpriteCache
renderer. - Update Kotlin to
2.0.0
- Update
Kotlin.coroutines
to1.9.0-RC
- Update
Kotlin.atomicfu
to0.24.0
- Update
Kotlinx.serialization
to1.7.0
- Update
Kotlinx.html
to0.11.0
- Add documentation to most of the framework.
- Dozens of other minor misc. changes all across the framework.
Commit Details
What's Changed
- graphics: update SpriteBatch and TextureArraySpriteBatch projection matrix to assume y-down by @LeHaine in #236
- Make tiles public by @ValleyDragon888 in #242
- Replace OpenGL with WebGPU by @LeHaine in #244
- jvm: remove backgroundColor from JvmConfiguration by @LeHaine in #245
- js: remove backgroundColor from JsConfiguration by @LeHaine in #246
- core: update LwjglGraphics to support Linux X11 and Wayland backends by @LeHaine in #247
- scene graph: fix setScissorRect miscalculation that resulted in an error by @LeHaine in #248
- Add Features and Limits to Adapter and Device by @LeHaine in #249
- Update gradle and build scripts to handle publishing new modules by @LeHaine in #250
- core: update AssetProvider to handle preparing files again by @LeHaine in #251
- scene-graph: update SceneGraph to only set sceneCanvas Node spriteShader to the Batch.defaultShader, if it owns the batch, otherwise it will create a new Shader by @LeHaine in #252
- scene graph: rework how the root scene CanvasLayer is rendered into its own managed FBO via the SceneGraph and own batch by @LeHaine in #253
- scene-graph: rework rendering & canvas coordinates calculations for CanvasLayer nodes by @LeHaine in #254
- core: update Texture related classes to call WebGPUTexture.release() rather than destroy() to handle when the underyling buffers are destroyed by @LeHaine in #255
- core: remove ContextExt and internal ownedContext as it's no longer needed by @LeHaine in #256
- core: add dynamic uniform camera handling to SpriteShader, SpriteBatchShader, and SpriteBatch by @LeHaine in #257
- update SpriteBatch to handle dynamic camera uniform offsets per shader and fix matrix tracking issue by @LeHaine in #258
- ldtk: update calculation & parsing of ldtk y-coordiante to be flipped and to render via translating the map height or the level height by @LeHaine in #259
- tiled: implement SpriteCaching for staggered & isometric maps by @LeHaine in #260
- core: update SpriteBatch to ignore slice.offsetY by @LeHaine in #261
- core: update TextureAtlas to flip the offsetY coord, when parsing, to be relative to the bottom of the image rather than the top by @LeHaine in #262
- graph: update SceneGraph to set Node material shader & blend state by @LeHaine in #263
New Contributors
- @ValleyDragon888 made their first contribution in #242
Full Changelog: v0.9.0...v0.10.0
v0.9.0
Release Info
Breaking
ShaderProgram.getAttrib()
can now return a-1
instead of throwing anIllegalStateException
if the attribute name doesn't exist.ShaderProgram.getUniformLocation
can now return anull
instead of theUniformLocation
if the uniform name doesn't exist.- Update JVM target to 17 from 11.
Changes
- Add WASM as an official platform target.
- Update
FrameBuffer
to allow for multiple texture attachments to be used. - Remove nest-ability from
FrameBuffer
due to poor performance with multiple calls to get currently bound frame buffer.FrameBuffer.end()
will now bind to the default frame buffer instead with optional viewport position and size parameters.
- Update
GLSlGenerator
to supportgl_FragData[]
. - Update
GL
with newdrawBuffer
andclearBuffer[fuiv]
functions. - Update
GL
with newgetActiveAttrib
andgetActiveUniform
related functions. - Optimize
WebGL
to prevent creating a new array on certainGL
calls. - Update
ShaderProgram
to handle finding and setting active uniforms and attributes instead relying on
theShaderParameter
to do so. - Update
AGP
to8.2.0
. - Update Kotlin to
1.9.23
. - Update
kotlinx-coroutines
to1.8.0
. - Update Dokka gradle plugin to
1.9.20
.
Commit Details
- Update
InputQueueProcessor
to clear events pool even if noInputProcessor
exists by @LeHaine in #225 - Update
ShaderProgram
to handle fetching all active uniforms and attribs and remove thecreate(ShaderProgram)
function fromShaderParameter
by @LeHaine in #226 - Update
FrameBuffer
to handle multiple color attachments by @LeHaine in #227 - Add ability to reuse
GlFrameBuffer
and optimizeFrameBuffer
to not create aGlFrameBuffer
object perbegin()
&end()
call by @LeHaine in #228 - Rename
FrameBuffer.ColorAttachment
toTextureAttachment
and add depth & stencil support by @LeHaine in #229 - Remove
FrameBuffer
nestability due to poor performance. by @LeHaine in #230 - Remove
ShaderProgram
getAttrib()
andgetUniform()
from throwing anIllegalStateException
by @LeHaine in #231 - sprite batch: update default size to 1000 instead of 8191 by @LeHaine in #232
- gradle: update to kotlin 1.9.23 and dokka to 1.9.20 by @LeHaine in #234
- Add WASM Platform by @LeHaine in #216
Full Changelog: v0.8.1...v0.9.0
v0.8.1 - Better Late Than Never
Changes
- Remove remaining 3D spatial graphic classes that were accidentally left over from
0.8.0
. - Update LDtk to handle changes up to LDtk
1.5.3
. - Update Kotlin to
1.9.21
. - Update
Kotlinx.coroutines
to1.8.0-RC2
. - Update
Kotlinx.atomicfu
to0.23.1
. - Update
Kotlinx.serialization
to1.6.2
. - Update Dokka gradle plugin to
1.9.10
.
Fixes
- Fix
NoSuchElementException
being thrown when testing touch input in browsers simulated device-mode.
v0.8.0
A small release.
Breaking
- Removed all experimental GLTF and 3D rendering graphics.
Changes
- Update Kotlin to
1.9.10
. - Update
Kotlinx.coroutines
to1.7.3
. - Update
Kotlinx.atomicfu
to0.22.0
. - Update
Kotlinx.serialization
to1.6.0
. - Update
LWJGL
to3.3.3
. - Update Android Gradle plugin to
7.3.1
. - Update Gradle version plugin to
0.48.0
. - Update Dokka gradle plugin to
1.9.0
.
v0.7.0
Changes
- Update Kotlin to
1.8.20
. - Update
FrameBuffer
class is nowopen
. - Add new
forEachTileInView
toLdtkLayer
to iterate over tiles current in the view bounds without rendering. - Breaking: Move
BlendMode
andDepthStencilMode
out of thegraph
package and into thegraphics.utils
. - Add new
setBlendFunction(blendMode)
toBatch
. - Breaking: update
createShader
to return the type of vertex and fragment shaders instead of the super class. - Add
FrameBuffer.use
extension similar toBatch.use
. - Breaking:
Shader.parameters
are now to be used with aLinkedHashSet
instead of aMutableList()
.mutableListOf(param1, param2) -> linkedSetOf(param1, param2)
. - Breaking: Update
Shader.parameters
to grab parameters by variable name instead of index.parameters[0] -> parameters["u_texture"]
- Breaking:
GlslGenerator.texture2D
,GlslGenerator.shadow2D
, andGlslGenerator.texture
now returns a constructor delegate instead of a literal.val color = texture2D(...) -> val color by texture2D(...)
Fixes
- Fix
TextureArraySpriteBatch.draw(spriteVertices)
to manually increaseMesh.geometry.numVertices
to prevent data
from being overwritten withgeometry.addVertex
. - Fix
TextureArraySpriteBatch
to use the correctVertexAttribute
for 2D positions. - Fix
TextureArraySpriteBatch.maxVertices
calculation. - Fix
LDtkLayer
rendering to calculate the correct maximum cells in both x & y axes. - Fix
SceneGraph
to set the correct blend equation off a materialBlendMode
. - Fix
GlslGenerator
not removing unused definitions from functions. - Fix
Tiled
row & column calculations & iso transform to use correct view bound points. - Fix
GlslGenerator.For
not usingGLInt
value directly - Fix
GlslGenerator.atan
to use correct parameters (was only allowing one parameter to be passed in) - Fix
InputMapController.addBinding
to check for key modifiers fordown()
,pressed()
, andreleased()
functions
v0.6.3
v0.6.2
This contains only a single change that was preventing a SceneGraph
from being rendered on WebGL.
- Update
GLSLGenerator
uniform delegates to only add to theShader.paremeters
only when has its value used in the
source. Due to some static conditions some uniforms may not be used while still being defined in theparamters
list.
When creating aShaderProgram
with WebGL, it would throw shader compilation error due to not finding in the glsl
source. This was preventing aSceneGraph
from being rendered on the Web due to the default 3D model shader.