OpenFL 9.4.0 and Lime 8.2.0 Release

Hey, everyone!

Grab the latest feature releases for both OpenFL and Lime from Haxelib.

haxelib install lime 8.2.0
haxelib install openfl 9.4.0

In this release, we have several especially nice improvements in Lime, so let’s take a moment to dive into those!

  • We updated most of our C++ submodules, such as SDL, to newer versions. This means we get a bunch of bug fixes and stability improvements from upstream, and it opens up the possibility of exposing new features in future updates.

  • On macOS, we now natively support Apple Silicon (ARM64). Earlier this year, Haxe 4.3.5 started providing universal binaries for both Intel and ARM64, but we’ve been Intel-only until now. Starting today, we now provide lime.ndll files for both architectures. Be sure to grab a nightly build of hxcpp for the best experience because it includes some ARM64-specific improvements that haven’t yet been released to Haxelib.

  • Additionally, another reason to grab a nightly build of hxcpp is to be able to compile Android apps with newer NDKs. If you’ve been stuck on NDK version between 15 and 21, you should be able to try a newer version with the latest hxcpp from GitHub (here’s hoping they release an hxcpp update to Haxelib soon!)

  • You can now compile for HashLink/C on Windows, macOS, and Linux using lime build hlc. For some background, HashLink supports two different modes: JIT and C. Previously, we supported only JIT mode, where the Haxe compiler generates bytecode. We now support C mode, where the Haxe compiler generates native .c source code. Then, Lime passes those to your system’s C compiler and everything is compiled into a fully native executable without bytecode. In theory, HashLink/C mode will be a little faster, but it also takes a bit longer to compile than JIT (but it should hopefully compile faster than hxcpp). On macOS and Linux, Lime uses gcc for HL/C by default. On Windows, Lime uses Visual Studio for HL/C by default, but you can pass the -gcc option to switch to gcc, if you prefer.

The OpenFL release has one big experimental update, but it also implements a lot of smaller APIs that improve compatibility with Flash and AIR.

  • The new openfl_enable_experimental_update_queue define may be optionally enabled to make the OpenFL display list switch to a new update queue that should be significantly faster than the previous method for rendering display objects that have changed since the previous frame. Please give it a try, and let us know if you run into any issues — or let us know how well it is speeding things up!

  • The app: and app-storage: schemes are now supported by flash.filesystem.File.

  • On the HTML5 target, we added support for the upload() method on flash.net.FileReference class, allowing you to upload files to a server.

  • We now dispatch Event.CUT, Event.COPY, Event.PASTE, and Event.SELECT_ALL when the keyboard shortcuts are triggered.

  • Uncaught errors are handled in more places when you add a listener for uncaught error events.

  • We added many new methods to the openfl.geom.* classes that allow you to pass in a pre-created result object instead of allocating a new one, for better performance.

Additionally, we recently added many more chapters to the OpenFL Developer’s Guide, an online book that teaches you about how to use many of the great features that OpenFL provides. I’m not going to link to every new chapter, but here are a select few that are worth checking out:

Plus, when you are looking at the documentation in the OpenFL API Reference, you’re going to see a lot more links to these chapters in the dev guide. This should allow you to go more in-depth, if needed. Here’s a screenshot of the openfl.text.TextField API reference and links to several relevant documents from the dev guide:

Changelog

OpenFL 9.4.0

  • Added openfl_enable_experimental_update_queue define, which enables an optimized update queue to improve rendering performance

  • Added url property to openfl.filesystem.File class

  • Added workingDirectory static property to openfl.filesystem.File class

  • Added dispatch of Event.CUT, Event.COPY, Event.PASTE, and Event.SELECT_ALL events to focused display object when keyboard shortcuts are used

  • Added upload() implementation to FileReference for HTML5 (it already existed for native)

  • Added app: URI scheme for files that translates to File.applicationDirectory

  • Added app-storage: URI scheme for files that translates to File.applicationStorageDirectory

  • Added support for dataFormat = VARIABLES, which sets data property to a new URLVariables object

  • Added encodeURIComponent() and decodeURIComponent() to openfl.Lib

  • Added describeType() to openfl.Lib

  • Added word selection to TextField by double-clicking and dragging

  • Added dispatch of Event.OPEN and ProgressEvent.PROGRESS events to openfl.media.Sound

  • Added support for SpreadMethod.REPEAT and SpreadMethod.REFLECT for gradients in openfl.display.Graphics when targeting HTML5

  • Added uncaught error events for exceptions thrown in functions called by dispatchEvent(), Lib.setInterval() and Lib.setTimeout()

  • Added openfl.display.ScreenMode implementation

  • Added mode, modes, and visibleBounds properties to openfl.display.Screen

  • Added withCredentials property to URLRequest to be used on HTML5 target for cross-origin requests

  • Added dispatch of Event.CLOSE to openfl.net.DatagramSocket class if bind fails

  • Added readInt64() and writeInt64() to ByteArray

  • Added addToOutput(), interpolateToOutput(), polarToOutput() and subtractToOutput() to openfl.geom.Point

  • Added intersectionToOutput() and unionToOutput() to openfl.geom.Rectangle

  • Added deltaTransformPointToOutput() and transformPointToOutput() to openfl.geom.Matrix

  • Added getRelativeMatrix3DToOutput() to openfl.geom.Transform

  • Added decomposeToOutput(), deltaTransformVectorToOutput(), interpolateToOutput(), and transformVectorToOutput() to openfl.geom.Matrix3D

  • Added addToOutput(), crossProductToOutput(), and subtractToOutput() to openfl.geom.Vector3D

  • Added toMatrix3DToOutput() to openfl.geom.PerspectiveProjection

  • Added projectVectorToOutput() to openfl.geom.Utils3D

  • Added totalMemoryNumber to openfl.system.System

  • Fixed support for reading and writing classes that implement IExternalizable interface to ByteArray

  • Fixed support for reading and writing openfl.Vector to ByteArray

  • Fixed rotation property on display objects not being clamped to the range between -180.0 and 180.0

  • Fixed Capabilities.playerType value on sys targets, which should return “Desktop” instead of “StandAlone”

  • Fixed utest library breaking the default HTML5 template, and added openfl_enable_utest_legacy_mode define to restore old behavior, if desired

  • Fixed AsyncErrorEvent not being able to accept other types besides haxe.io.Error

  • Fixed bad calculation of TextField bounds that sometimes accounted for the “gutter” twice

  • Fixed incorrect letter spacing after changing the font size on TextField on native targets

  • Fixed missing TypeError when setting text or htmlText to null

  • Fixed using hardware-only BitmapData with beginBitmapFill() and drawTriangles() on Graphics

  • Fixed types of many local variables that defaulted to Dynamic because they didn’t define a type and weren’t initialized for type inference

  • Fixed Lib.getDefinitionByName() support for :: between package and base name

  • Fixed missing error handling in FileReference.load() for HTML5 target

  • Fixed passing another ByteArray to ByteArray.writeObject()

  • Fixed behavior of openfl_enable_handle_error and openfl_disable_handle_error defines

  • Fixed openfl.net.Socket incorrectly attempting to connect if host is null

  • Fixed null exception in openfl.net.Socket when trying to get addresses or ports and the socket is not connected

  • Fixed value of localPort on openfl.net.Socket class when the system selects the next available port

  • Fixed null exception sometimes thrown from calling close() on openfl.media.Sound class

  • Fixed certain ByteArray values that weren’t defaulting to BIG_ENDIAN when reading or writing AMF data

  • Fixed deleteDirectory() on openfl.filesystem.File class failing to delete sub-directories when deleteDirectoryContents parameter is true

  • Fixed crash on calling listen() on openfl.net.Socket when backlog parameter is 0 and targeting Neko

  • Fixed NativeWindow dispatch of Event.ACTIVATE and Event.DEACTIVATE on mobile

  • Fixed connected property on Socket returning null instead of false by default

Lime 8.2.0

  • Added Apple Silicon (ARM64) support for macOS target.

  • Added new hlc target to support compiling for HashLink/C. Both generates C code and compiles to an executable (requires Haxe 4.3.4 or newer).

  • Added support for inserting attributes into the <application/> or <activity/> elements of AndroidManifest.xml

  • Added createPerspective() to Matrix4.

  • Added removeLibrary() to lime.utils.Assets, which removes a library, but makes unloading optional.

  • Added SINGLE_THREADED mode to ThreadPool, which is used by default when threading is not available.

  • Added workLoad property to ThreadPool to limit total time spent per frame on green threads.

  • Added optional -noalias flag to lime setup to skip creating the lime executable alias.

  • Added optional -nosign flag to lime build ios to skip code signing when targeting iOS.

  • Added support for -64 flag to force compiling for 64-bit Raspberry Pi.without requiring a custom template.

  • Added option to configure preserveDrawingBuffer on HTML5 target.

  • Added LZMA compression to HTML5 target.

  • Added automatic deletion of “stale” assets and dependency files.

  • Added VIEW intents on Android target.

  • Added support for -mingw flag when cross-compiling to Windows from another operating system.

  • Added support for -cpp flag when cross-compiling to Linux from another operating system (requires homebrew-macos-cross-toolchains on macOS).

  • Added support for tsa option in <config:air> to pass timestamp URL to Adobe AIR’s adt tool.

  • Fixed lime display command incorrectly printing old .hxml content after project.xml file has been modified, skipping requirement to build project or restart editor to get valid code intelligence.

  • Fixed HashLink .app bundles on macOS to include all Homebrew library dependencies, so that they run on computers without Homebrew.

  • Fixed @android:style/Theme.NoTitleBarnull in generated AndroidManifest.xml.

  • Fixed Image in a web worker by storing it as DATA type.

  • Fixed cURL C++ to Haxe callbacks when targeting HashLink.

  • Fixed icon generation for Android target with accept-file-intent config.

  • Fixed exception in Lime tools when resolving full path of Neko .n file.

  • Fixed keyboard input incorrectly getting enabled by default when creating a new window, which could show an IME when unexpected.

  • Fixed ALC.getContextsDevice() when targeting HashLink.

  • Fixed potentially uninitialized values in Matrix3.

  • Fixed wrong type for Socket.objectEncoding in Flash/AIR externs.

  • Fixed BackgroundWorker not using threads on HashLink.

  • Improved support for Raspberry Pi 64-bit builds.

  • Changed custom haxe.Timer to fall back to the original in a macro context.

  • Changed Promise to remove @:generic when in a macro context.

  • Changed Matrix3 to be an abstract over Float32Array, similar to Matrix4.

  • Changed Raspberry Pi keyboard shortcut to exit to Ctrl + Esc.

  • Changed -64 and -32 flags for Intel architectures to -x86_64 and -x86_32 to make their purpose more clear (the old flags still work, for now).

  • Removed Joystick trackball APIs because they is supported only on Linux, with a single piece of hardware, and will be removed from SDL 3.

  • Removed ARMV5 architecture from Android rebuilds by default because hxcpp doesn’t support it with NDK versions >= 20.

  • Removed 32-bit liblime.iphonesim.a as a default binary because 32-bit iOS is no longer supported by Apple.

  • Updated Cairo submodule to version 1.17.6 and point to upstream repository instead of fork.

  • Updated cURL submodule to version 7.83.1 and point to upstream repository instead of fork.

  • Updated efsw submodule to version 1.2.0 and point to upstream repository instead of fork.

  • Updated FreeType submodule to version 2.12.1 and point to upstream repository instead of fork.

  • Updated HarfBuzz submodule to version 6.0.0 and point to upstream repository instead of fork.

  • Updated libpng submodule to version 1.6.37 and point to upstream repository instead of fork.

  • Updated libjpg-turbo submodule to version 2.1.3 and point to upstream repository instead of fork.

  • Updated libvpx submodule to version 1.11.0 and point to upstream repository instead of fork.

  • Updated libwebm submodule to version 1.0.0.28 and point to upstream repository instead of fork.

  • Updated Mbed TLS submodule to version 2.28.7 and point to upstream repository instead of fork.

  • Updated MojoAL submodule to commit e08dbf3 and point to upstream repository instead of fork.

  • Updated Ogg submodule to version 1.3.5 and point to upstream repository instead of fork.

  • Updated OpenAL-Soft submodule to version 1.20.1 and point to upstream repository instead of fork.

  • Updated Pixman submodule to version 0.42.2 and point to upstream repository instead of fork.

  • Updated SDL submodule to version 2.24.0 and point to upstream repository instead of fork.

  • Updated Tinyfiledialogs submodule to version 3.8.8 (still uses fork due to SourceForge limitations).

  • Updated Vorbis submodule to version 1.3.7 and point to upstream repository instead of fork.

  • Updated zlib submodule to version 1.2.12 and point to upstream repository instead of fork.

20 Likes

Wow, big changes! Will try them out asap!

1 Like

Congrats everyone! This has been a long time coming.

2 Likes

Great, this is another big step forward!

1 Like

Nice!!! Great job! (I broke with haxe and go to typescript, but I’m happy)

1 Like

Wowowowow! Thank you! :slight_smile:

1 Like

Thanks team! I love these tools!

1 Like

Wow, grateful for MacOs ARM support, finally! Exprimental queue also sounds neat, will test :slight_smile:

Thanks for your hard work!

1 Like

Glad to see haxe+lime+openfl isn’t dead, since it’s still my favorite game deving platform despite all those years, and all those stuffs that are lacking such as video support for instance and descent 3D physic engine… But well, it’s enough to do the things, sometimes…

Now let’s talk about my life…

Now I have a collection of aliexpress handhelds, (powkiddy v90, RG353M, RG353 SP, RG353 PS, RG-ARCD, RG Nano, GKD pixel and even powkiddy a30 !), all running on some custom linux and some featuring an additional android internal system…

And I noticed, that a bunch of them, have roughly the same hardware config. In the case of the RG353 PS, RG-ARCD, RG353M it’s a RK3566 Quad-Core Cortex-A55 (up to 1.8ghz) (with 1 or 2GB LPDDR4 RAM), and I was wondering if there was a possibility to target those for compilation ?

I guess the answer is something such as “not really, at least not without a major pain in the *ss compiler config hackathon without any guarantee of success”, as usual… But still, I think it would be great if those RK3566 based gaming handhelds could be targeted for compilation, and I know that it’s likely never going to happen… Of course.

Thx to “portmaster” featured on those RK3566 machines, I can for instance play GTA Vice City ( PC version ) on the RG-ARCD (yes) using the rocknix custom firmware…

SO… I was wondering if there was a way to run “haxe/lime/openfl” apps through portmaster ? I mean it’s already running GTA Vice City for windows… It’s quite something. And it’s running great.

Here you can see it running on a R36S for instance ( equipped with a “Rockchip RK3326 64-bit quad-core Cortex-A35 CPU with a maximum frequency of up to 1.5GHz.”)

Oh btw… Thanks you very very very much for maintaining openfl !

1 Like

We don’t yet fully support ARM Linux devices. However, there is a pull request that was recently submitted that looks promising:

I don’t know anything about portmaster, so I can’t suggest if there’s a way to use that with a Lime/OpenFL Windows build or not.

2 Likes

Awesome. At least it’s a start !
Now I know know what I’m going to do over the next weekend…

In a nutshell, PortMaster is a program designed for Linux-based handheld devices that organizes and simplifies the installation process for hundreds of PC ports. In its most simple form, you open the app on your device, download the PC port (and maybe add some commercial data files if necessary) from its user menu, and then launch that new PC port on your handheld once it’s been installed. These games run natively on the device, as opposed to the typical emulation you expect on these types of handhelds.

https://portmaster.games/

Wow, that’s absolutely amazing! Big Thank You!

1 Like

Congrats and thank you for this massive update! :partying_face:

1 Like

It’s nice to see OpenFL is getting better.

1 Like

Big thanks. But, Do we need latest versions of XCode for building Apple Silicon native apps?

You don’t need the latest version of Xcode. Any version that supports Apple Silicon will probably work fine. You need an hxcpp build from GitHub, though. The latest hxcpp version 4.3.2 on Haxelib will not work for Apple Silicon.

1 Like