KorGE 3.0 Released! 🎉🎉🎊 Hot Reloading, Gpu Vector Rendering, Emoji support, Masks, Backdrop Filters, New Bezier functionalities, tons of fixes and much more!
Woah!, it has been quite a long road since 2.0, that was released almost two years ago.
Quantum computers support have been delayed a bit more, but we are including a lot of new exciting stuff and fixed some quite old-standing issues.
Special thanks to Xenotactic for creating all the YouTube content and contributions to the project , Tobse for doing a talk about KorGE in Germany and Jobe-m for all the work on Fleks and his other contributions.
I’m still missing a lot of people here, so please check the contributions to not miss anyone.
And before of all I wanted to thank you all folks, you rock! 💜
Now let’s see the new features:
JVM Hot reloading
For sponsors there is an article explaining how it works.
There is a new gradle task called
runJvmAutoreload that supports this.
For it to work there must be a scene in the project that will be reloaded
on source code changes.
Kotlin 1.7, the new Memory Manager and binary size improvements
Now KorGE uses Kotlin 1.7 and in the case of K/N also uses the new memory manager that will allow to use multiple threads. While not enabled yet, KorGE 3.0 has already code that will enable multithreaded rendering that will fix a lot of issues, and improve performance in several ways. This functionality will be made available sometime in the 3.x cycle.
Along bumping versions and optimizing a few things, we have managed to reduce the output size of the hello world application.
In the case of a MacosX64 application it used to size
14.5 MB (
3.1 MB gzipped),
7 MB (
2 MB gzipped), and with the executable stripped
5.6 MB (
1.7 MB gzipped).
In KorGE 2.0, the hello world in JS took
1.9 MB uncompressed (
383 KB gzipped).
In KorGE 3.0, it is
1.1 MB uncompressed (
286 KB gzipped).
Much better for the web! 🗜
Support for Apple Silicon
Since Kotlin/Native supports Apple Silicon, you can now also create executables directly in ARM64 for the new Apple Macs.
In future versions we will include support to build and run executables cross-platform via WSL, Wine, Lima, Box64. This is already being used internally.
Up to 4x faster mp3 decoding, support for XM, MOD and S3M, and multithreaded
In the case of JS, JVM and Android, the mp3 decoder have been rewritten being up to 4x times faster as the previous one. The minimp3 automatically-converted C to Kotlin source code have been optimized to be more kotlin-friendly, and be faster. By using minimp3, it fixes some issues related to mp3 decoding from the JavaMp3 implementation.
Now audio streaming is multithreaded in the JVM and Android, with K/N being enabled later in 3.x versions.
In addition to WAV and MP3, now you can load XM, MOD and S3M music track files
thanks to the
webaudio-mod-player port to Kotlin.
That allows to include long songs in much more limited space as mp3.
You can find songs in this format here: https://modarchive.org/
ColrV1 Fonts, Emoji Variants (ligatures) and improved text rendering
Latest versions include support for TTFs vector fonts with ColrV1 and ColrV0 fonts, that allow to have emoji fonts in a very constrained size.
Also the new text rendering engine shares common code with the vector rendering views code that will allow to fix issues once.
Text editing support on any kind of text on all the platforms
Now it is possible to mark any text as editable. And not only that: you can now place texts around vector paths, so you can make text follow curves.
On Mobile the soft keyboard will appear when editing texts.
Backdrop filters and antialiased masks
After an internal refactorization on how rendering happens, now KorGE supports backdrop filters (filters applied over a masked region), and antialiased masks on any kind of view. And now KorGE is more extensible in terms of rendering phases.
Premultiplied alpha fixes
A long-standing issue were that in JS, the rendering was different that in the JVM. Also in some cases, blending was causing some artifacts in some cases:
Now KorGE loads bitmaps as premultiplied alpha, and textures uploaded to the GPU and internal render buffers are always premultiplied. This also fixes issues when doing linear sampling on textures.
Vector rendering improvements
Context2D have been hugely improved on all the platforms, and now
most of the issues are gone. This also implements new features like dash patterns.
Now there is a completely new antialiased GPU-based vector rendering, that doesn’t use intermediate textures and do the filling on the GPU. Though it is still experimental and slower in some cases, it is much faster in some others.
RoundRect now use this renderer internally, so scaling them is much
ASE tilemap/tileset support
ASE 1.3 supports tilemaps and tilesets. KorGE have been updated to support them.
In addition to a lot of SVG fixes. Now it is possible to load some SVG animations:
And render them using any kind of the supported renderers: SYSTEM, CPU and GPU.
SWF without atlases
Now it is possible to load SWF Adobe Flash / Animations directly without intermediate atlases and render them using the SYSTEM and antialiased GPU vector renderers.
Bezier curves have been hugely revamped, now we have ported the BezierJS library, and ported most of its functionality, along adding new functions to it. Now you can split not just beziers, but also arbitrary vector paths, you can also get the positions based on distance/length or t, and get dashed patterns.
Also we have fixed easings and added support for arbitrary easings based on bezier curves:
You can also perform tweens following vector paths!
KorGE IntelliJ Plugin
The KorGE IntelliJ plugin have been updated.
This version integrates better with the native image loading, and now you can use it to preview .ase, .kra and .qoi image files.
In addition to that now the KorGE store is finally integrated, and now you can install bundles in one click directly from the https://awesome.korge.org/ catalog. This catalog will eventually evolve to a marketplace were people will be able to share free and paid assets to be used.
In addition to that, now the documentation link in the user panel opens directly in the IntelliJ editor, so now you can explore the documentation directly from there.
Note: Unfortunately due to lack of time we had to drop the editors from this version since IDEA 2022.2 bumped the JDK to 17 and now the JVM rendering happens on metal, we need more time to adapt to this. Since JCEF is already there, we will probably expose the editors as WebGL instead in a way that is transparent to the final user.
If you are using the integrated editors, please, skip this version for now.
Now it is easier to apply the korge plugin since it is published in the standard gradle coordinates. Since we are using Gradle 7.5, the default template also uses it:
Eventually catalogs will play better with tooling like dependabot-like tools, version bumpers, etc.
Deprecations and moved things
Korge-next repository has been archived, as well as all the korlibs individual repositories.
Now there is a single repository for all the korlibs: https://github.com/korlibs/korge
Forums have been moved to github discussions: https://github.com/korlibs/korge/discussions
Old slack has been removed as it was not used for a really long time.
And much more…
Note that due to limited time, there are some known regression issues in this version related to tilemaps. Those will be fixed in the next 3.0.1 version in a few weeks. If you are using them, and you are affected, you can stick to an old 2.x version in the meantime.
Website, documentation, and other places.