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-gccoption 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_queuedefine 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:andapp-storage:schemes are now supported byflash.filesystem.File. -
On the HTML5 target, we added support for the
upload()method onflash.net.FileReferenceclass, allowing you to upload files to a server. -
We now dispatch
Event.CUT,Event.COPY,Event.PASTE, andEvent.SELECT_ALLwhen 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_queuedefine, which enables an optimized update queue to improve rendering performance -
Added
urlproperty toopenfl.filesystem.Fileclass -
Added
workingDirectorystatic property toopenfl.filesystem.Fileclass -
Added dispatch of
Event.CUT,Event.COPY,Event.PASTE, andEvent.SELECT_ALLevents to focused display object when keyboard shortcuts are used -
Added
upload()implementation toFileReferencefor HTML5 (it already existed for native) -
Added
app:URI scheme for files that translates toFile.applicationDirectory -
Added
app-storage:URI scheme for files that translates toFile.applicationStorageDirectory -
Added support for
dataFormat = VARIABLES, which setsdataproperty to a newURLVariablesobject -
Added
encodeURIComponent()anddecodeURIComponent()toopenfl.Lib -
Added
describeType()toopenfl.Lib -
Added word selection to
TextFieldby double-clicking and dragging -
Added dispatch of
Event.OPENandProgressEvent.PROGRESSevents toopenfl.media.Sound -
Added support for
SpreadMethod.REPEATandSpreadMethod.REFLECTfor gradients inopenfl.display.Graphicswhen targeting HTML5 -
Added uncaught error events for exceptions thrown in functions called by
dispatchEvent(),Lib.setInterval()andLib.setTimeout() -
Added
openfl.display.ScreenModeimplementation -
Added
mode,modes, andvisibleBoundsproperties toopenfl.display.Screen -
Added
withCredentialsproperty toURLRequestto be used on HTML5 target for cross-origin requests -
Added dispatch of
Event.CLOSEtoopenfl.net.DatagramSocketclass if bind fails -
Added
readInt64()andwriteInt64()toByteArray -
Added
addToOutput(),interpolateToOutput(),polarToOutput()andsubtractToOutput()toopenfl.geom.Point -
Added
intersectionToOutput()andunionToOutput()toopenfl.geom.Rectangle -
Added
deltaTransformPointToOutput()andtransformPointToOutput()toopenfl.geom.Matrix -
Added
getRelativeMatrix3DToOutput()toopenfl.geom.Transform -
Added
decomposeToOutput(),deltaTransformVectorToOutput(),interpolateToOutput(), andtransformVectorToOutput()toopenfl.geom.Matrix3D -
Added
addToOutput(),crossProductToOutput(), andsubtractToOutput()toopenfl.geom.Vector3D -
Added
toMatrix3DToOutput()toopenfl.geom.PerspectiveProjection -
Added
projectVectorToOutput()toopenfl.geom.Utils3D -
Added
totalMemoryNumbertoopenfl.system.System -
Fixed support for reading and writing classes that implement
IExternalizableinterface toByteArray -
Fixed support for reading and writing
openfl.VectortoByteArray -
Fixed
rotationproperty on display objects not being clamped to the range between-180.0and180.0 -
Fixed
Capabilities.playerTypevalue onsystargets, which should return “Desktop” instead of “StandAlone” -
Fixed utest library breaking the default HTML5 template, and added
openfl_enable_utest_legacy_modedefine to restore old behavior, if desired -
Fixed
AsyncErrorEventnot being able to accept other types besideshaxe.io.Error -
Fixed bad calculation of
TextFieldbounds that sometimes accounted for the “gutter” twice -
Fixed incorrect letter spacing after changing the font size on
TextFieldon native targets -
Fixed missing
TypeErrorwhen settingtextorhtmlTexttonull -
Fixed using hardware-only
BitmapDatawithbeginBitmapFill()anddrawTriangles()onGraphics -
Fixed types of many local variables that defaulted to
Dynamicbecause 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
ByteArraytoByteArray.writeObject() -
Fixed behavior of
openfl_enable_handle_errorandopenfl_disable_handle_errordefines -
Fixed
openfl.net.Socketincorrectly attempting to connect ifhostisnull -
Fixed null exception in
openfl.net.Socketwhen trying to get addresses or ports and the socket is not connected -
Fixed value of
localPortonopenfl.net.Socketclass when the system selects the next available port -
Fixed null exception sometimes thrown from calling
close()onopenfl.media.Soundclass -
Fixed certain
ByteArrayvalues that weren’t defaulting toBIG_ENDIANwhen reading or writing AMF data -
Fixed
deleteDirectory()onopenfl.filesystem.Fileclass failing to delete sub-directories whendeleteDirectoryContentsparameter istrue -
Fixed crash on calling
listen()onopenfl.net.Socketwhenbacklogparameter is0and targeting Neko -
Fixed
NativeWindowdispatch ofEvent.ACTIVATEandEvent.DEACTIVATEon mobile -
Fixed
connectedproperty onSocketreturningnullinstead offalseby default
Lime 8.2.0
-
Added Apple Silicon (ARM64) support for macOS target.
-
Added new
hlctarget 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()toMatrix4. -
Added
removeLibrary()tolime.utils.Assets, which removes a library, but makes unloading optional. -
Added
SINGLE_THREADEDmode toThreadPool, which is used by default when threading is not available. -
Added
workLoadproperty toThreadPoolto limit total time spent per frame on green threads. -
Added optional
-noaliasflag tolime setupto skip creating the lime executable alias. -
Added optional
-nosignflag tolime build iosto skip code signing when targeting iOS. -
Added support for
-64flag to force compiling for 64-bit Raspberry Pi.without requiring a custom template. -
Added option to configure
preserveDrawingBufferon HTML5 target. -
Added LZMA compression to HTML5 target.
-
Added automatic deletion of “stale” assets and dependency files.
-
Added
VIEWintents on Android target. -
Added support for
-mingwflag when cross-compiling to Windows from another operating system. -
Added support for
-cppflag when cross-compiling to Linux from another operating system (requires homebrew-macos-cross-toolchains on macOS). -
Added support for
tsaoption in<config:air>to pass timestamp URL to Adobe AIR’s adt tool. -
Fixed
lime displaycommand 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.NoTitleBarnullin generated AndroidManifest.xml. -
Fixed
Imagein a web worker by storing it asDATAtype. -
Fixed cURL C++ to Haxe callbacks when targeting HashLink.
-
Fixed icon generation for Android target with
accept-file-intentconfig. -
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.objectEncodingin Flash/AIR externs. -
Fixed
BackgroundWorkernot using threads on HashLink. -
Improved support for Raspberry Pi 64-bit builds.
-
Changed custom
haxe.Timerto fall back to the original in a macro context. -
Changed
Promiseto remove@:genericwhen in a macro context. -
Changed
Matrix3to be an abstract overFloat32Array, similar toMatrix4. -
Changed Raspberry Pi keyboard shortcut to exit to Ctrl + Esc.
-
Changed
-64and-32flags for Intel architectures to-x86_64and-x86_32to 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.

