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:
andapp-storage:
schemes are now supported byflash.filesystem.File
. -
On the HTML5 target, we added support for the
upload()
method onflash.net.FileReference
class, allowing you to upload files to a server. -
We now dispatch
Event.CUT
,Event.COPY
,Event.PASTE
, andEvent.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 toopenfl.filesystem.File
class -
Added
workingDirectory
static property toopenfl.filesystem.File
class -
Added dispatch of
Event.CUT
,Event.COPY
,Event.PASTE
, andEvent.SELECT_ALL
events to focused display object when keyboard shortcuts are used -
Added
upload()
implementation toFileReference
for 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 setsdata
property to a newURLVariables
object -
Added
encodeURIComponent()
anddecodeURIComponent()
toopenfl.Lib
-
Added
describeType()
toopenfl.Lib
-
Added word selection to
TextField
by double-clicking and dragging -
Added dispatch of
Event.OPEN
andProgressEvent.PROGRESS
events toopenfl.media.Sound
-
Added support for
SpreadMethod.REPEAT
andSpreadMethod.REFLECT
for gradients inopenfl.display.Graphics
when targeting HTML5 -
Added uncaught error events for exceptions thrown in functions called by
dispatchEvent()
,Lib.setInterval()
andLib.setTimeout()
-
Added
openfl.display.ScreenMode
implementation -
Added
mode
,modes
, andvisibleBounds
properties toopenfl.display.Screen
-
Added
withCredentials
property toURLRequest
to be used on HTML5 target for cross-origin requests -
Added dispatch of
Event.CLOSE
toopenfl.net.DatagramSocket
class 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
totalMemoryNumber
toopenfl.system.System
-
Fixed support for reading and writing classes that implement
IExternalizable
interface toByteArray
-
Fixed support for reading and writing
openfl.Vector
toByteArray
-
Fixed
rotation
property on display objects not being clamped to the range between-180.0
and180.0
-
Fixed
Capabilities.playerType
value onsys
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 besideshaxe.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 settingtext
orhtmlText
tonull
-
Fixed using hardware-only
BitmapData
withbeginBitmapFill()
anddrawTriangles()
onGraphics
-
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
toByteArray.writeObject()
-
Fixed behavior of
openfl_enable_handle_error
andopenfl_disable_handle_error
defines -
Fixed
openfl.net.Socket
incorrectly attempting to connect ifhost
isnull
-
Fixed null exception in
openfl.net.Socket
when trying to get addresses or ports and the socket is not connected -
Fixed value of
localPort
onopenfl.net.Socket
class when the system selects the next available port -
Fixed null exception sometimes thrown from calling
close()
onopenfl.media.Sound
class -
Fixed certain
ByteArray
values that weren’t defaulting toBIG_ENDIAN
when reading or writing AMF data -
Fixed
deleteDirectory()
onopenfl.filesystem.File
class failing to delete sub-directories whendeleteDirectoryContents
parameter istrue
-
Fixed crash on calling
listen()
onopenfl.net.Socket
whenbacklog
parameter is0
and targeting Neko -
Fixed
NativeWindow
dispatch ofEvent.ACTIVATE
andEvent.DEACTIVATE
on mobile -
Fixed
connected
property onSocket
returningnull
instead offalse
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()
toMatrix4
. -
Added
removeLibrary()
tolime.utils.Assets
, which removes a library, but makes unloading optional. -
Added
SINGLE_THREADED
mode toThreadPool
, which is used by default when threading is not available. -
Added
workLoad
property toThreadPool
to limit total time spent per frame on green threads. -
Added optional
-noalias
flag tolime setup
to skip creating the lime executable alias. -
Added optional
-nosign
flag tolime 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 asDATA
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 overFloat32Array
, similar toMatrix4
. -
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.