In this sprint we’ve added support for multi touch on HTML5.
We’ve also fixed some iOS 13 related issues, related to our iOS app code.
(E.g. modal popups now work properly.)
This however means we had to do some big changes, so if you are an extension developer, be sure to read the more detailed information below.
The two major breaking changes are regarding callbacks outside of the main thread, and the registration flow for app delegates.
There have also been a number of other great additions and fixes.
iOS Application Loop + OS Callbacks
This is a breaking change.
Previously, we had a custom startup procedure, allowing us to keep ownership of the event loop on the main thread.
Now however, we use a regular application loop, but that also means that callbacks from the OS is likely to not come from the main thread.
(This is how it was already working in our Android version.)
As a developer of UI applications, this is a common problem, you get a callback from a non UI thread, and need to pass info to the UI thread.
The solution in our case is to store the needed data for a period of time, and then process that data on the UI (main) thread.
As an example, you can look at extension-push,
where we protect an array with a mutex. We push to the array from the non-UI thread, and we read from the array on the UI thread.
dmExtension::RegisteriOSUIApplicationDelegate + dmExtension::UnregisteriOSUIApplicationDelegate
This is a breaking change.
Due to the new application loop, we needed a new way to register the app delegates.
This is now done via a static initializer in order to be able to hook into the engine before the
See example here
To help in the process of refactoring our extensions, we added a few extra functions to manage Lua callbacks.
LuaCallbackInfo* dmScript::CreateCallback(L, index)
void dmScript::DestroyCallback(LuaCallbackInfo* cbk)
void dmScript::SetupCallback(LuaCallbackInfo* cbk)
void dmScript::TeardownCallback(LuaCallbackInfo* cbk);
lua_State* dmScript::GetCallbackLuaContext(LuaCallbackInfo* cbk)
int PCall(lua_State* L, int nargs, int nresult);
We also added a helper function
void dmArray::Map(void (*fn)(T* value, void* ctx), void* ctx); that makes it easy to map a function over all elements in an array. We use it to handle all queued up callbacks from the non-UI threads.
You can see a practical example here
In the event of a crash in the native code, our crash handler will be invoked.
We’ve now also added a printout, for easier sharing of info in such an event.
We’ve made some improvements on how to deal with the debug symbols.
It’s important to keep debug symbols for each release of your game, for debugging any native issues that might pop up.
This is especially true if you are using native extensions, since we build a custom engine in the cloud for you.
(If you are not using native extensions, we keep the debug symbols on the download page)
When you opt to bundle with debug symbols, we will bundle these symbols next to your bundle.
The layout for each platform is different, here is the layout:
bundle_android └── myapp ├── myapp.apk └── myapp.apk.symbols/ ** < BINARIES + MAPPING.TXT bundle_html5 └── myapp ├── myapp.symbols ** < THE .JS SYMBOLS └── myapp_asmjs.js bundle_ios ├── myapp.dSYM/ ** < CORRECT FOLDER NAME + EXECUTABLE NAME └── myapp.ipa bundle_linux └── myapp └── myapp.x86_64 ** < UNTOUCHED (UNSTRIPPED) bundle_osx ├── myapp.app └── myapp.dSYM/.../myapp ** < CORRECT FOLDER NAME + EXECUTABLE NAME bundle_win32 └── myapp ├── dmengine.pdb ** < THE EXE IS RENAMED FROM dmengine.exe └── myapp.exe
Issue-3162- Added: Multitouch support for html5 (DEF-3871)
Issue-4538- Added: Added
Issue-4508- Added: Added
ios.override_entitlementsgame.project option to specify an override entitlements file.
Issue-2812- Added: Add support for http.request PATCH verb (#4560)
Issue-4427- Fixed: Output native callstack on crash
Issue-4469- Fixed: Fixed sys.reboot() crash (#4504)
Issue-4479- Fixed: Use default google dns servers if no servers were found
Issue-4485- Fixed: Optimized ResolveInstance method (checking for nil value)
Issue-4517- Fixed: Set UTF-8 file encoding in bob.jar (#4520)
Issue-4519- Fixed: NE - Set thread names in executable
Issue-4529- Fixed: NE - Removed duplicate VC/include path from includes on Win32 builds
Issue-4539- Fixed: Added the sound name to some error logging
Issue-4554- Fixed: Make sure to set the correct start frame when playing an animation
Issue-4555- Fixed: Restructured iOS App initialise flow
Issue-4556- Fixed: Set initial mouse position to a valid value (#4557)
Issue-4558- Fixed: Send correct camera id in set_view_projection id
Issue-4563- Fixed: Better error handling when engine didn’t consume all bytes received from a http request
Issue-4540- Fixed: NE - Updated to MSVC 2019 SDK
Issue-4542- Fixed: NE - Recompiled libunwind and libvpx to reduce compiler warnings for OSX
DEFEDIT-2780- Fixed: Setting file.encoding=UTF-8 for java to make it consistent on os’es (#4516)
DEFEDIT-4379- Fixed: Remove remaining dashboard interactions
DEFEDIT-4498- Fixed: Fix disappearing brush cursor in tile map editor
DEFEDIT-4510- Fixed: Fixed bitmap font corruption when building some AngelCode fnt files
DEFEDIT-4532- Fixed: Sort variables and table keys in debugger
Issue-4506- Added: Added debug symbols button to the bundle dialog (#4507)