Lime 7.7.0 Released!

7.7.0 (01/27/2020)

  • Updated SDL with a patch for high DPI resolution on macOS
  • Updated tinyfiledialogs with a Unicode patch on Windows
  • Updated macOS to use OpenAL-Soft (rather than deprecated Apple OpenAL library)
  • Added missing properties/methods to lime.utils.ArrayBuffer
  • Added support for NVX_gpu_memory_info OpenGL extension
  • Added support for using launch storyboards instead of launch images on iOS
  • Updated Android template to use Gradle 5.6.3 and Android Gradle Plugin 3.5.1
  • Improved Assets.unloadLibrary to allow unloading the default asset library
  • Improved HTML5 WebGL to fallback to canvas if “major performance caveat”
  • Improved the Electron output template to work without -lib hxelectron
  • Improved support for x86-64 on Android target
  • Improved handling of asset library root paths
  • Improved garbage collection performance on GLRenderbuffer
  • Fixed “auto” window orientation in the AIR template
  • Fixed launch of iOS simulator on some systems
  • Fixed support for Clipboard on HTML5
  • Fixed minimize/maximize on some desktop windows that are not resizable
  • Fixed Image.fromBitmapData to set buffer.transparent
  • Fixed some issues when toggling fullscreen on Android
  • Fixed a potential crash when getting the system locale on iOS or macOS
  • Fixed cleanup of Howler.js sounds after they are stopped
  • Fixed FileDialog to not return as completed if the path is an empty string
  • Fixed the default launch screen sizes on the iOS target
  • Fixed Gradle paths to jcenter/Google for HTTPS support
12 Likes

What was improved exactly? :slight_smile:


This should help Lime work with x86-64 on Android (to my knowledge) assuming the HXCPP NDK toolchain is all set up properly. I forget if HXCPP fully supports the architecture for Android yet?

Looks like yes, I should try. :slight_smile:

I currently use gradle 2.1.0. How can i download and update the new version of gradle build (5.6.3)?. Thks!

Be careful using Starling on HTML5 with this release - failIfMajorPerformanceCaveat can automatically cause openfl to use its CanvasRenderer, which as far as I can tell doesn’t work with starling at all since Stage3D doesn’t support that renderer type (we ended up changing the setting to false in HTML5Window.createContext() to get around it for now).

2 Likes

What should I do for iOS storyboard to work?
I’m still getting regular LaunchImages…

UPDATE: Ok, I’ve found this, will try:
<launchstoryboard path="image.png" />

The default template

The launch storyboard feature uses Haxe templates and your project.xml configuration to generate an Xcode storyboard file. Lime includes one default storyboard template, which can be configured with the following options.

<launchStoryboard template="splash.storyboard" assetsPath="Images/splash"
	bg:RGB="0xFFFFFF"
	contentMode="center"
	ipad="ipad-splash-sb.png"
	portrait="iphone-splash-sb.png">
	
	<imageset name="ipad-splash-sb.png" />
	<imageset name="iphone-splash-sb.png" />
	
</launchStoryboard>

template is the specific storyboard template you’re using, chosen from the templates available at templates/ios/storyboards.

assetsPath is the path from your openfl/lime project root to where your launch storyboard images are saved.

bg is a hexadecimal formatted color to use as the background, in case you’re not using a full-screen content mode.

contentMode determines how the image scales to fit the screen.

  • center is unscaled
  • scaleAspectFill scales to fill the entire screen, with original aspect ratio
  • scaleAspectFit scales to fit inside the screen (letterbox), with original aspect ratio
  • scaleToFill stretches the image to fill the screen

There are three optional attributes, which you can choose from based on the target devices and orientation of your game. (The above example includes just ipad and portrait.)

  • ipad determines the image to use for iPads.
  • portrait determines the image to use for iPods and iPhones in portrait orientation.
  • landscape determines the image to use for iPods and iPhones in landscape orientation.

Finally, you have the imageset child elements. For each imageset, lime looks for {name}.png, {name}@2x.png, and {name}@3x.png in the specified assetsPath, copying any of those that exist into an Xcode imageset. Most iPhones these days require the @2x or @3x image, while iPads require @2x.


About templates and custom storyboard

template, assetsPath, and the imageset elements are standard parts of the configuration. All the other attributes listed above are available based on the chosen default template, splash.storyboard.

If the default template doesn’t meet your needs, you have two options, but both require you to open your exported iOS project in Xcode and create your own storyboard.

  1. Take the storyboard you built in Xcode and put it into your project. In this case, you would use the name or path attribute instead of template, and you would have no template-specific attributes to set, but you would still need to provide the appropriate imagesets.
<launchStoryboard path="custom.storyboard" assetsPath="Images/splash">	
	<imageset name="ipad-splash-sb.png" />
</launchStoryboard>
  1. Using the default template as an example, take the storyboard you built in Xcode and add it to your lime templates. You would use it in the same manner as the default template, but use any attributes you specified instead.
5 Likes

Oh nice, thanks a lot Justin!

Hello!

Event.ACTIVATE / Event.DEACTIVATE doesn’t work on mobile html5.
Help please. I can not stop the sounds when minimizing the application.

Another problem is that scrollRect does not work with ColorTransform. If I change the color of an object, it stays in one place while scrolling.
photo_2020-05-13 18.12.09

openfl 8.9.6
lime 7.7.0
openfl build html5 -dcanvas

Hello!

Can’t figure out the problem…

My game crashes for some players on Android with this exception:

Null Object Reference
openfl.display.DisplayObjectContainer.__getBounds (openfl/display/DisplayObjectContainer.hx line 727)
openfl.display.DisplayObjectContainer.__getBounds (openfl/display/DisplayObjectContainer.hx line 729)
openfl.display.DisplayObjectContainer.__getBounds (openfl/display/DisplayObjectContainer.hx line 729)
openfl.display.DisplayObjectContainer.__getBounds (openfl/display/DisplayObjectContainer.hx line 729)
openfl.display.DisplayObjectContainer.__getBounds (openfl/display/DisplayObjectContainer.hx line 729)
openfl.display.DisplayObject.__getLocalBounds (openfl/display/DisplayObject.hx line 1538)
openfl.display.DisplayObject.get_width (openfl/display/DisplayObject.hx line 3036)

This issue occurs spontaneously in different places in the game when trying to get the height or width or try to call getBounds.
There are no problems on html5

openfl 8.9.6
lime 7.7.0

it may be related to a newer version of hxcpp. Try version 4.0.64

This might also be resolved in a newer version of OpenFL, or you can look at that line in DisplayObjectContainer and see if the object being referenced might be null. Performing a return if it is or wrapping in an if (nameOfTheObject != null) { ... } check might fix it

Hello!
Thanks, but it didn’t help.

Hello!
Not sure I understand you.
Are you suggesting adding a check “child == null” in the line 725 (DisplayObjectContainer)?

if ( child == null || child.__scaleX == 0 || child.__scaleY == 0) continue;

To be honest I do not understand how there can be a Null Exception on line 727, if there is a reference to “child” on line 725 and there are no exceptions.

I think it’s occurring here:

Perhaps the matrix argument is coming in null?

I escaped the code in the “for” and got an exception on line 732.
Looks like childWorldTransform is some times null. How is this possible?
Doesn’t ObjectPool work correctly?

Null Object Reference
openfl.geom.Matrix.boot (openfl/geom/Matrix.hx line 77)
lime.utils.ObjectPool.release (lime/utils/ObjectPool.hx line 114)
openfl.display.DisplayObjectContainer.__getBounds (openfl/display/DisplayObjectContainer.hx line 737)

I had the same crashes when accessing a render from a different thread. In one case, this is an AdMob extension: through _onInterstitialEvent, it accessed the display object. In the second case, the BackgroundWorker changed the size of the bitmapdata.
After the fix, there were no such failures.