Playable Ads made with Defold? For Facebook Ads?

Great! Very nice work on this! What if you apply texture compression on the assets as well?

2 Likes

I’ve removed all sounds and music, throw away some sprites to reduce the size of atlas and came up with 2.4mb build size. Then played around with compression settings in texture_profile but this did not show a significant changes, but limiting the “Max Texture Size” did the trick (and as for 2mb ad the resulting quality is ok imo) - 1.99mb :grinning:

Here is the link: http://anvil-games.com/defold/ad/BouncyCatapult.html - it’s a full game currently, just without sounds. So as for ad there is still some assets to be stripped.

And Facebook Ads manager “eats” the resulting HTML:

10 Likes

I’ve updated the project:

  • Added info on how to use it in your game
  • Added comments in the html5 template
  • Added compression for archive data
  • Now 7-zip is used for deflate compression
  • And so on…
10 Likes

Hey-hey, first playable ad is approved and live!

You can check it in the Facebook Feed by this link: https://fb.me/1F1L1cv4wlv0TPM (seems to be working only in FB mobile app; and I don’t know for how long the link will be working)

But I’ve noticed some major FPS drops in it and probably right now the ad does not provide a good user experience because of lags. So I need to check this.

UPD: fixed lags by setting “Contact Impulse Limit” in physics settings

9 Likes

The first test with Playable Ad finished, so, just want to confirm, that it was not banned or reported by users or something else, and for sure it was successful for the game:

“Results” here are “App Installs”, on iOS, in USA. You can see, that Cost Per Install was TWICE lower in comparison with a simple video on the same audience and placements! Well, my best CPI with video ad was around $0.7, so if be more precise, the win from playable ad was “only” 50% and not 100%. But still - very promising and inspiring!

11 Likes

You should make a post for this as its own thread as I was trying to find it and could not on my own! (Thank you to @d954mas for linking)

Using something like this also has other benefits…

3 Likes

Just in case - this still works with Editor 1.2.167.
But few minor changes to the engine_template.html required, as it changed during past year.

2 Likes

HI! Still works? Can you share the engine_template.html?

Has anyone managed to make this work: GitHub - aglitchman/defold-playable-ads: A project with Gulp tasks to bundle the Defold game into one HTML file. ?

I’m running the following commands:

git clone https://github.com/aglitchman/defold-playable-ads.git
cd defold-playable-ads
npm install
gulp

Everything works, then I start a local http
python -s SimpleHTTPServer 8080

I get a blank page and an error console:

Uncaught TypeError: Cannot read property 'parentElement' of undefined
    at Object.removeProgress (dmloader.js:450)
    at Object._preloadAndCallMain (dmloader.js:824)
    at Array.onArchiveLoaded (dmloader.js:720)
    at Object.notifyListeners (dmloader.js:213)
    at Object.notifyArchiveLoaded (dmloader.js:235)
    at Object.onArchiveLoaded (dmloader.js:406)
    at Object.onFileLoaded (dmloader.js:398)
    at Object.onPieceLoaded (dmloader.js:346)
    at dmloader.js:318
    at request.onload (dmloader.js:91)

Anyone experience the same issue?

1 Like

What a shame, playable ads can be very efficient (judging by your own benchmark :slight_smile: ).

I’ll try to fix it then. Any pointer about where the error could come from?

I added info to the README to point that I didn’t update the project for the newest Defold versions.

To fix it you should update html5/engine_template.html + the code in the gulpfile.js.

Updated 2021/07/01:
For the newcomers: look at the new topic about this asset.

2 Likes

What’s the difference between building using the IDE and your GULP script?
Building and bundling with Defold IDE, I obtain a folder, which is ~3.5MB compressed, which seems like it could work for a Facebook Playable Ads (requirements are <5MB zip containing all files).

Am I missing something?

2 Likes

This gulp script was able to package a game into a single HTML file. It’s the requirement for “Playable HTML5 Asset”, and, also, the size shouldn’t be more than 2MB. It was the only option two years ago.

I would love to know your results for a playable ad in a zip file format!

P.S. IronSource still requires a single HTML file, but the file limit is 5MB.

2 Likes

For Facebook, I see they’re accepting 5MB zip file.

So I guess we shouldn’t need to compress everything into one file anymore.

For Facebook, yes. For other networks take a look at the table: https://docs.lunalabs.io/docs/playable/ad-networks/overview

1 Like

Very useful link, thanks.

Any intuition about what could have broken your project starting with Defold 1.2.169? The changelog doesn’t seem to have anything related to htlm5 (except the IE compatbility…).

There were lots of changes: an upgrade to Emscripten 2.0.11, a new file loader etc.

Okay, I’ll upgrade the project to the latest Defold today/tomorrow and make new topic on the forum for this asset. In fact, it’ll require 1.2.184 beta because of the new .defignore feature.

5 Likes

Done!

8 Likes

Amazing! Thanks a lot, it now works great!
Will start working on playable ads thanks to your work.

3 Likes