Defold 1.2.160 has been released


Defold 1.2.160

Summer is almost over here, and the team is starting to get back into the office. We hope you’ve had a good summer too!

Push extension

We have now removed the push functionality into a separate extension. To migrate, add a dependency link to the extension in your game.project . It uses the new base extension Firebase Core.


  • DEF-3016 / #3586 - Added : Added label.get_text() to synchronously get the current text
  • -------- / #3520 - Added : Added sys.get_application_path() to get a path to the application executable
  • -------- / #4286 - Fixed : Fixed intermittent crash when calling go.get() without using a path fragment
  • -------- / #4308 - Fixed : Better handling of IPV6 networks when using http.request()
  • -------- / #4295 - Fixed : Add new tags into AndroidManifest.xml for supporting a notch
  • DEF-2713 / #4299 - Fixed : with nil as receiver will now generate a Lua error
  • DEF-3878 / #3182 - Fixed : Better logs in editor/bob when getting jar conflicts
  • DEF-2532 / #4272 - Fixed : Fix Extrude Borders for images with more than 8 bits per channel and additional indexed color formats
  • DEF-3031 / #3709 - Fixed : Better default HTML template for Web bundles
  • DEF-2396 / #3140 - Fixed : High-DPI does not work correctly for HTML5 bundles
  • -------- / #4338 - Fixed: Crash when delay deleting particle effects from a deleted gui node
  • -------- / #4304 - Removed : We removed the support for Facebook Gameroom


  • DEFEDIT-4218 - Fixed : Atlases with same images are no longer merged unless all properties match
  • DEFEDIT-4221 - Added : You can now Alt-click tree view disclosure arrows to expand all children
  • DEFEDIT-4261 - Added : Perspective camera toggle in scene view
  • DEFEDIT-4274 - Fixed : Clear icon was misaligned in form views
  • DEFEDIT-4281 - Fixed : Underscores in file names did not show up in tab overflow menu
  • DEFEDIT-4300 - Fixed : Large Collada mesh files load much quicker in the editor

Blurred textures in HTML5 (DEF-2396)(SOLVED)
Function to get path to the game's directory (Issue-3520)(SOLVED)
Warning when use nil as url for (DEF-2713) (Issue-#3651)(SOLVED)
Collapse/Expand all button in hierarchy file/gameobject structure (DEFEDIT-4221) (SOLVED)
[Editor] Expand/contract all (DEFEDIT-4221)(SOLVED)
Perspective camera in editor (2?) (DEFEDIT-4261) (SOLVED)
Notch display support (SOLVED)
Trouble with screen scaling on Android(#4295)(SOLVED)
HTML5 build full screen pixelated on HiDPI displays (DEF-2396)(SOLVED)
Jagged fonts in HTML5 (DEF-2396)(SOLVED)
Big thread of gamepad testing
Go.get causing silent crash(#4286)(SOLVED)
AdMob Extension
pinned globally #2


I don’t know if anyone else feels this… Even when none of the fixes directly affect me, I feel like each little bullet point is XP for the engine and the release announcement itself is a level up.




Yeah, killing bugs gives us XP and feature requests are quests I guess :slight_smile:



:fireworks: :sparkling_heart:



Do you ever have any boss fights at the office? =P



Since this version, current screen DPI calculations for HTML5 are inside the engine (if you turn on High Dpi option in game.project, Display section)
Be sure you don’t apply dpi to the canvas size yourself to avoid SIZE*DPI*DPI canvas size increasing.

HTML5 manual was updated, please check it, maybe new template already contains everything that you need:

If you still need your custom changes the simplest way to apply them copy/paste the new template and then apply your changes on it.

Shortly about new features in the new default template:

  • new modern and minimalistic design;
  • dark and light theme (light by default);
  • 4 new canvas scale modes (Downslace Fit, Fit, Stretch, No scale. By default Downscale fit);
  • checkboxes in the game.project file for turn on/off a fullscreen button and Defold site link;
  • all known tricks for good working on mobile devices was added into the template;
  • removed old broken option “Include dev tools”;
  • simplified Heap Size option, now it’s easier to configure and it’s in megabytes;
  • some other small changes and improvements.


Hi! I’ve been testing out sys.get_application_path() and I noticed it crashes on HTML5 (tested on up to date versions of Safari and Chrome):

dmloader.js:344 exception thrown: ReferenceError: lengthBytes is not defined,ReferenceError: lengthBytes is not defined
    at _dmSysGetApplicationPath (http://localhost:50796/html5/MyProject_wasm.js:1:141869)
    at wasm-function[2629]:29
    at wasm-function[2983]:871
    at wasm-function[3086]:7765
    at wasm-function[2985]:118
    at wasm-function[2954]:13
    at wasm-function[4841]:15
    at Object.dynCall_vii (http://localhost:50796/html5/MyProject_wasm.js:1:346411)
    at invoke_vii (http://localhost:50796/html5/MyProject_wasm.js:1:299199)
    at wasm-function[2978]:179
printErr @ dmloader.js:344
callMain @ MyProject_wasm.js:1
_preloadAndCallMain @ dmloader.js:663
onArchiveLoaded @ dmloader.js:551
onPieceLoaded @ dmloader.js:219
xhr.onload @ dmloader.js:155
load (async)
requestPiece @ dmloader.js:149
requestContent @ dmloader.js:119
onPieceLoaded @ dmloader.js:215
xhr.onload @ dmloader.js:155
load (async)
requestPiece @ dmloader.js:149
requestContent @ dmloader.js:119
onPieceLoaded @ dmloader.js:215
xhr.onload @ dmloader.js:155
load (async)
requestPiece @ dmloader.js:149
requestContent @ dmloader.js:119
onPieceLoaded @ dmloader.js:215
xhr.onload @ dmloader.js:155
load (async)
requestPiece @ dmloader.js:149
requestContent @ dmloader.js:119
onPieceLoaded @ dmloader.js:215
xhr.onload @ dmloader.js:155
load (async)
requestPiece @ dmloader.js:149
requestContent @ dmloader.js:119
onReceiveDescription @ dmloader.js:106
xhr.onload @ dmloader.js:70
load (async)
process @ dmloader.js:69
runApp @ dmloader.js:523
Module.onRuntimeInitialized @ index.html:165
doRun @ MyProject_wasm.js:1
(anonymous) @ MyProject_wasm.js:1
setTimeout (async)
run @ MyProject_wasm.js:1
runCaller @ MyProject_wasm.js:1
removeRunDependency @ MyProject_wasm.js:1
receiveInstance @ MyProject_wasm.js:1
receiveInstantiatedSource @ MyProject_wasm.js:1
Promise.then (async)
doNativeWasm @ MyProject_wasm.js:1
(anonymous) @ MyProject_wasm.js:1
(anonymous) @ MyProject_wasm.js:1



Erm, that’s embarrassing. This is my fault if it’s correct. Let me check.

1 Like


My game crashs on start with 1.2.160, logcat:

2019-08-20 16:28:49.645 25104-25104/? I/ragosha.hamste: Late-enabling -Xcheck:jni
2019-08-20 16:28:50.067 25104-25104/com.dragosha.hamster W/ragosha.hamste: resources.arsc in APK '/data/app/com.dragosha.hamster-pakVkb-DQ3DkNztA0_EiCw==/base.apk' is compressed.
2019-08-20 16:28:50.080 25104-25104/com.dragosha.hamster I/MultiDex: VM with version 2.1.0 has multidex support
2019-08-20 16:28:50.080 25104-25104/com.dragosha.hamster I/MultiDex: install
2019-08-20 16:28:50.080 25104-25104/com.dragosha.hamster I/MultiDex: VM has multidex support, MultiDex support library is disabled.
2019-08-20 16:28:50.088 25104-25126/com.dragosha.hamster D/libEGL: loaded /vendor/lib64/egl/
2019-08-20 16:28:50.094 25104-25126/com.dragosha.hamster D/libEGL: loaded /vendor/lib64/egl/
2019-08-20 16:28:50.107 25104-25126/com.dragosha.hamster D/libEGL: loaded /vendor/lib64/egl/
2019-08-20 16:28:50.114 25104-25104/com.dragosha.hamster D/OpenGLRenderer: Skia GL Pipeline
2019-08-20 16:28:50.131 25104-25104/com.dragosha.hamster E/iap: Unable to send message
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(
        at android.os.IMessenger$Stub$Proxy.send(
        at android.os.Messenger.send(
        at com.defold.iap.IapGooglePlayActivity.processPurchase(
        at com.defold.iap.IapGooglePlayActivity.processPendingConsumables(
        at com.defold.iap.IapGooglePlayActivity.access$200(
        at com.defold.iap.IapGooglePlayActivity$1.onServiceConnected(
        at android.os.Handler.handleCallback(
        at android.os.Handler.dispatchMessage(
        at android.os.Looper.loop(
        at java.lang.reflect.Method.invoke(Native Method)
2019-08-20 16:28:50.147 25104-25127/com.dragosha.hamster I/Adreno: QUALCOMM build                   : 7bf2852, Ie32bfa6f6f
    Build Date                       : 06/03/18
    OpenGL ES Shader Compiler Version: EV031.24.00.00
    Local Branch                     : googdrp
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 

full log:
logcat.txt (158.8 KB)

Device: Google Pixel 2XL, Android 9.0

UPD: works ok without AdMob extension



same crash with adMob @sergey.lerg extension

custom print from extension :

ERROR:ADMOB: java_extension_class is NULL

and log :

art/runtime/] JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception java.lang.ClassNotFoundException: Didn’t find class “extension/admob/Extension” on path: DexPathList[[zip file "/data/app/…

1 Like


@AGulev recomended add as dependency for resolve this crash. But it this case we have a build error:



It’s a conflict between jar files in Admob and Firebase-core, I think this conflict between
com-google-android-gms-play-services-measurement-api-16.0.3.jar (in firebase-core) and play-services-measurement-sdk-api-16.3.0.jar (in AdMob). Everything should be fine if you remove play-services-measurement-sdk-api-16.3.0.jar from AdMob. I’ll check it myself a bit later.

1 Like


Clone admob extension project from add @AGulev firebase dependency and " remove play-services-measurement-sdk-api-16.3.0.jar from AdMob" libs - build ok, but “initialize” button click with same crash



Fixed, PR is waiting when @sergey.lerg merge it

UPD: Merged



All works correct now. Thanks!



May I ask where can I find them in the template?



Yes, it’s not a special block in the template. There are many small improvements to make the game more comfortable on mobile devices. Few examples:

  • 4 meta tags in the top of the template that helps a browser to recognize what type of content we use and what type of adaptation we need if it supports (you can google about each of them yourself);
  • position: fixed; for body to avoid scrolling when user swipe;
  • window.scrollTo(0, 0); in the case when we resize window on ios, to solve an issue with automatic show/hide address bar on ios (iOS may hide address bar in landscape and show it when user tap somewhere in the top of the screen, it may be a reason of page scrolling or canvas overlay by address bar);
  • user-select blocking for avoiding copy/paste/share menu appearance;


@AGulev It sounds like it’s a good idea to switch to the new template, and it looks really nice, but I’m having a small issue with fullscreen on Firefox (latest, 68.0.2), on Windows 7.

Normal view, new HTML5 template:

Press the fullscreen button, and I get this:

What it should be (what I get with the old template):

While it’s fullscreen, appearing stretched like that, if I hit F12 to open the developer panel, then it resizes correctly:

And if I hide the developer panel again it appears correctly, over the whole screen.

The numbers I get in my render script are exactly the same either way, so I don’t think it’s a problem on that end. Also it works fine in Chrome, so I think it’s something weird with the new template and Firefox. Any ideas?

[Edit] Ugh, hmm. Testing it more now, it’s not even consistent. If I sit here clicking the fullscreen button and pressing escape, it works correctly about 50% of the time. The first time I click the fullscreen button after building HTML5 always seems to fail though.

[Edit2] I’m an idiot for not seeing this earlier. I get this error in the console:

Error: WebGL warning: drawArrays: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once) RabidRobots_wasm.js:1:284225

[Edit3] Hmm, maybe that’s not it. I also get that when exiting fullscreen with the old template.



I created a ticket Issue-#4366 . Thanks for the report.