Defold 1.2.147
In this sprint we’ve added support for building with the iPhone 12 SDK.
This is a required change for releasing apps on the Apple app store.
It also means the minimum os version has been increased to iOS 8.
There is a new way to change projection function in your game.
You can now send a message to change it directly, without having to copy resources around:
msg.post("@render:", "use_stretch_projection", { near = -1, far = 1 })
msg.post("@render:", "use_fixed_projection", { near = -1, far = 1, zoom = 2 })
msg.post("@render:", "use_fixed_fit_projection", { near = -1, far = 1 })
Another change which is part of our 3D track is that we’ve updated our shader compiler.
You may now get warning messages when using bob and when compiling shaders.
It may warn about incompatible naming of keywords in your shader script.
See more detail at the last section of this post.
We’ve also fixed two issues with the hot reloading, and made a few other fixes.
For native extensions, we’ve added the possibility to include C/C++ headers from another extension.
This opens up the possibility to have “base extensions” where the common libraries reside, and you can build your own
extension relying on the functionality provided in the base extension. This way extensions doesn’t have to duplicate
libraries between them.
In the editor, we’ve also updated the update process. It will no longer automatically download the editor in the background.
Instead it will present you with a dialog asking for confirmation before you manually update the editor.
EDIT 2019-02-20: Sorry, premature announcement on this, it’s part of the alpha version of the editor, and will be shipped in
1.2.148.
Engine
- DEF-3524 - Added: Added iPhoneOS 12 SDK support.
- DEF-3737 - Fixed: Added details around is_music_playing() api and Android.
- DEF-3763 - Fixed: Hot-Reloading fonts now respects the new texture dimensions.
- DEF-3712 - Fixed: Hot-Reloading atlas in GUI now works.
- DEF-3714 - Fixed: Added additional logging to dmScript::PushTable.
- DEF-3721 - Fixed: Render script messages to change projection.
- DEF-2633 - Fixed: Documented list of supported cipher suites for https requests.
- DEF-3774 - Fixed: Engine crash when using many particles in GUI.
- DEF-3758 - Fixed: Spawned tilemap and collisions not working properly.
- DEF-3507 - Added: Updated shader compiler
Editor
- Updated the Editor updater
- Fix for “duplicate app” icons
Shader compiler compatibility warnings:
When building your project with Bob or bundling a project from inside the editor you might get compatibility warnings regarding your shaders. This is because we now do shader cross-compilation and it requires the shaders to be GLSL3.1 compatible. We automate most of the migration from GLSL1.4 but we cannot automate all the required changes.
What we cannot automate is related to the reserved ‘texture’ keyword. If we were to automatically rename variables in your shader script it would only lead to confusion so that needs to be done manually by you.
We have changed all the builtin shaders in Defold to use a different name (usually ‘texture_sampler’) but if you use any custom shaders you need to update these yourself.
The warning messages start with “Warning! Compatibility issue:” and the warning text includes the word ‘error’, this is perfectly normal - this means that the cross-compilation attempt failed but the actual build of your project works just as before. Note that the actual cross-compiled shader is not yet used by Defold.
This change is needed since Apple has deprecated the use of OpenGL and we will need to support Metal on apple devices.
It will be important to update your shaders as we continue to work on our new rendering backend. Once we have the new rendering backend in place, the warning will change to a hard error, so better to update now rather than later.