Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Facebook Instant Games... — Gideros Forum

Facebook Instant Games...

MobAmuseMobAmuse Member
edited December 2016 in General questions
Having been looking at html5 lately and also using the superb Gideros html5 export option, I have also been very recently looking at Facebook Instant Games which are small games made in html5 that run in FB Messenger. This looks like it will be big for FB in 2017 onwards.

The Gideros html5 export although great produces an average Android app as is when exported as html5 at around 15-25Mb.

Facebook instant Games written with pixi.js in html5 seem to have a much smaller end footprint and also run a bit faster that Gideros html5 apps.

Is there anyway to shrink down the Gideros lib part of the html5 export to target this emerging platform? As is the html5 apps exported by Gideros are way too big for that purpose even if you quarter the size of the source graphics and assets etc. for example.

I am hearing that FB are asking for html5 instant games to target 2-4Mb'ish in size so it's a bit like returning to j2me mobile days in many respects when it comes to game design in html5 for their emerging new platform at least.

Pixi.js is very much like Lua to read as code to me on looking at it. The smallest html5 app I have been able to make and export with Gideros is around 12Mb so far ...way too big for FB Instant Games on mobile currently and runs slower than a pixie.js app on my html5 ready test TV panel.

Gideros to (pixi.js) Facebook Instant Games converter required here :)

The other interesting offering for this end target comes from PlayCanvas SDK too which seems nice on quickly looking at it last night.

Gideros is still the best x-platform solution tho by far IMHO.

Comments

  • jdbcjdbc Member
    edited December 2016
    I guess you could remove all java classes you do not need in jar file. Same for .so files, do not include if you do not need it.
  • SinisterSoftSinisterSoft Maintainer
    edited December 2016
    Re pixi.js...

    Panda.js uses pixi.js as its gfx engine: http://www.pandajs.net/

    Re gideros...

    The main problem is that a gideros game is in Lua, so it has to be run in a player that has been 'converted' to run in asm.js (I think) on a web browser.

    The rest of gideros is also converted from C to run in a browser too. It's not written directly in javascript like pixi.js

    If more of it was coded directly in javascript then it maybe faster, but that is an unknown.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • @jdbc Yes that is a good idea actually anyway.

    @SinisterSoft OK fully understood. I think if I wanted to produce s FB Instant Game then I would need to code direct via Pixi.js or PlayCanvas SDK's then.

    Only thinking about it and not actually doing anything about it yet :)

    Thanks.
  • @mobamuse I don't think this will be so big of a problem as facebook will have to extend the size for unity html5 games - which have the same issue as they have to run an interpreter for C## in a browser (much like the gideros system having to run Lua).

    Also I don't think (yet) that the game side of the Gideros system is compressed - it's just an encrypted block. I don't know if this will make that much difference though.

    As more things get separated into 'plugins' then maybe this will also apply to html5 too - so that the size might get smaller, only @hgy29 will know this though.

    @jdbc the java classes and .so files refer to Android - with jtml5 it's different.

    Likes: MobAmuse

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    I've been trying to use this: http://crunchme.bitsnbites.eu/. Seems efficient: gideros.js (10MB) shrinks down to 2.5MB... unfortunately produced code crashes with 'syntax error', but somehow the original idea is good.

    Likes: MobAmuse, pie

    +1 -1 (+2 / -0 )Share on Facebook
  • Wow that is a massive saving on final html5 app footprint :O

    Things to come in time then perhaps :)

    Thanks for getting back to me regards this too - much appreciated.
  • jdbcjdbc Member
    edited December 2016
    May be gideros.js could be divided in js files in order to include only javascript files you need.

    I do not know if gideros.js is minimized but also try https://jscompress.com/

    Likes: MobAmuse

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    @MobAmuse,

    You may be interested to know that I finally succeeded and running a 'crunched' version of gideros HTML5 main lib, using the CrunchMe tool I mentionned earlier. Option '-nostrip' did the trick.

    Here's the results:
    ./crunchme -nostrip /data/gideros/gideros/emscripten/Build/Html5/Html5/gideros.js /var/www/giderosmobile/gideros.z.js
    Original size:       10716005 bytes
    Binary packed size:  2415461 bytes (22% of the original)
    String encoded size: 2505664 bytes (23% of the original)
    Final result:        2506410 bytes (23% of the original)
    The drawback is that decompression takes a few more seconds of the load process..
    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.