Skip to content

Releases: littlektframework/littlekt

v0.11.0

14 Dec 14:12
eb7a129
Compare
Choose a tag to compare

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 from 0.19.4.1 to 22.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 in Buffer in order to read. It now assumes the buffer
    is in a ready-to-ready state.
  • Add new stats to EngineStats:
    • setPipeline calls per frame
    • setBindGroup calls per frame
    • set*Buffer calls per frame
  • Fix IndexedMeshGeometry.clearIndices not resetting the total tracked indices back to 0.

Commit Details

What's Changed

  • update wgpu from 0.19.4.1 to 22.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

02 Dec 23:37
8a26c3d
Compare
Choose a tag to compare

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 to 0.
  • 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) and Animation.getFrameTime(index) from being able to go out index bounds.
  • Add new Vfs subtypes: UrlVfs and LocalVfs.
    • Context now has three Vfs types:
      1. resourcesVfs for loading from the resources directory. This handles loading from fat JARs fine now (fixes
        #275)
      2. urlVfs for loading directly from a URL or data URL.
      3. applicationVfs for loading files at the root of the application working directory.
  • Update internal JVM readPixmap to use stbimage instead of ImageIO
  • Fix IndexedMeshGeometry index buffer size calculation
  • Add Compression interface with CompressionGZIP implementations for jvmAndroid & js.
  • Fix AssetProvider.fullyLoaded calculation to take into account the active job
  • Update kotlin from 2.0.0 to 2.1.0
  • Update kotlinx.serialization from 1.7.0 to 1.7.3
  • Update kotlinx.atomicfu from 0.24.0 to 0.26.1
  • Update kotlinx.coroutines from 1.9.0-RC to 1.9.0
  • Update LWJGL from 3.3.3 to 3.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

Full Changelog: v0.10.1...v0.10.2

v0.10.1

21 Jul 15:40
2f3916b
Compare
Choose a tag to compare

Some minor fixes:

Release Info

Fixes

  • Fix miscalculation for scene-graph Cotnrol.anchor() for TOP_* 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!

16 Jul 14:36
190991c
Compare
Choose a tag to compare

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
      same begin() -> draw() -> end() flow but requires WebGPU specific classes.
    • graphics.gl.* classes replaced with graphics.webgpu.*
  • 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 to com.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. Use CanvasLayerContainer and CanvasLayer for FBO related
    purposes.
  • Remove FrameBuffer class. WebGPUs RenderPass is essentially a Framebuffer / Render target.
  • Remove GlslGenerator and all related classes. Use WGSL for your shader needs, either by loading them from a file
    or directly in a string.
  • Remove vSync and backgroundColor configuration options.
  • Remove Game<T> and Scene<T> classes as they aren't in scope of the framework.
  • Rename Disposable to be Releasable as well as dispose() to release().
  • Remove FitViewport and FillViewport 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 to actualWidth/Height
    and trimmedWidth/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 to 1.9.0-RC
  • Update Kotlin.atomicfu to 0.24.0
  • Update Kotlinx.serialization to 1.7.0
  • Update Kotlinx.html to 0.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

Full Changelog: v0.9.0...v0.10.0

v0.9.0

23 Mar 23:47
b66d97b
Compare
Choose a tag to compare

Release Info

Breaking

  • ShaderProgram.getAttrib() can now return a -1 instead of throwing an IllegalStateException if the attribute name doesn't exist.
  • ShaderProgram.getUniformLocation can now return a null instead of the UniformLocation 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 support gl_FragData[].
  • Update GL with new drawBuffer and clearBuffer[fuiv] functions.
  • Update GL with new getActiveAttrib and getActiveUniform related functions.
  • Optimize WebGL to prevent creating a new array on certain GL calls.
  • Update ShaderProgram to handle finding and setting active uniforms and attributes instead relying on
    the ShaderParameter to do so.
  • Update AGP to 8.2.0.
  • Update Kotlin to 1.9.23.
  • Update kotlinx-coroutines to 1.8.0.
  • Update Dokka gradle plugin to 1.9.20.

Commit Details

  • Update InputQueueProcessor to clear events pool even if no InputProcessor exists by @LeHaine in #225
  • Update ShaderProgram to handle fetching all active uniforms and attribs and remove the create(ShaderProgram) function from ShaderParameter by @LeHaine in #226
  • Update FrameBuffer to handle multiple color attachments by @LeHaine in #227
  • Add ability to reuse GlFrameBuffer and optimize FrameBuffer to not create a GlFrameBuffer object per begin() & end() call by @LeHaine in #228
  • Rename FrameBuffer.ColorAttachment to TextureAttachment and add depth & stencil support by @LeHaine in #229
  • Remove FrameBuffer nestability due to poor performance. by @LeHaine in #230
  • Remove ShaderProgram getAttrib() and getUniform() from throwing an IllegalStateException 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

22 Jan 15:44
b419195
Compare
Choose a tag to compare

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 to 1.8.0-RC2.
  • Update Kotlinx.atomicfu to 0.23.1.
  • Update Kotlinx.serialization to 1.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

27 Oct 12:02
7ea971a
Compare
Choose a tag to compare

A small release.

Breaking

  • Removed all experimental GLTF and 3D rendering graphics.

Changes

  • Update Kotlin to 1.9.10.
  • Update Kotlinx.coroutines to 1.7.3.
  • Update Kotlinx.atomicfu to 0.22.0.
  • Update Kotlinx.serialization to 1.6.0.
  • Update LWJGL to 3.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

22 Apr 13:17
763dfe3
Compare
Choose a tag to compare

Changes

  • Update Kotlin to 1.8.20.
  • Update FrameBuffer class is now open.
  • Add new forEachTileInView to LdtkLayer to iterate over tiles current in the view bounds without rendering.
  • Breaking: Move BlendMode and DepthStencilMode out of the graph package and into the graphics.utils.
  • Add new setBlendFunction(blendMode) to Batch.
  • Breaking: update createShader to return the type of vertex and fragment shaders instead of the super class.
  • Add FrameBuffer.use extension similar to Batch.use.
  • Breaking: Shader.parameters are now to be used with a LinkedHashSet instead of a MutableList(). 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, and GlslGenerator.texture now returns a constructor delegate instead of a literal. val color = texture2D(...) -> val color by texture2D(...)

Fixes

  • Fix TextureArraySpriteBatch.draw(spriteVertices) to manually increase Mesh.geometry.numVertices to prevent data
    from being overwritten with geometry.addVertex.
  • Fix TextureArraySpriteBatch to use the correct VertexAttribute 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 material BlendMode.
  • 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 using GLInt 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 for down(), pressed(), and released() functions

v0.6.3

08 Feb 18:39
01ad6d1
Compare
Choose a tag to compare
  • Fix an issue with Button not calculating label sizing when added after scene creation.

v0.6.2

08 Feb 15:35
96106dc
Compare
Choose a tag to compare

This contains only a single change that was preventing a SceneGraph from being rendered on WebGL.

  • Update GLSLGenerator uniform delegates to only add to the Shader.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 the paramters list.
    When creating a ShaderProgram with WebGL, it would throw shader compilation error due to not finding in the glsl
    source. This was preventing a SceneGraph from being rendered on the Web due to the default 3D model shader.