Modify the generated index.html?

  • When you export the project for a webserver, it wraps the game in html/css/js etc.

    I need to modify the index.html that it procudes, as it doesnt work correctly for android (doesnt get rid of address bar for full screen apps).

    Is there any way to do this, other than to re-edit the files after every export?

  • As I mentioned in my tutorial how to customize the exported HTML5 index.html you can edit directly the file export-fs.html from the "C2 install base/exporters/html5" folder.

    You will have to do this edit on every upgrade of C2 though, since those files will be overwritten/destroyed (as it is strongly advised to uninstall the previous version of C2 when updating to a newer one).

    On the other hand, you're talking about accessing the game from android directly through the browser aren't you ? because I believe wrappers like cocoon.js deal with those kind of details "naturally".

  • Wow, nice tutorial, thanks!

    With luck, the next version of C2 will have full screen suport on Android without adress bar ;) There is lots of js floating about to achieve this.

    I will look into the cocoon.js exporter.

    I just found the tutorial search page, this will save me a lot of posts!

    There is no tutorial yet for how to write apps for android (only ios) :(

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've never been able to get any of those 'hide address bar' snippets working with C2's engine, can you link me to one that you know works?

  • I've never been able to get any of those 'hide address bar' snippets working with C2's engine, can you link me to one that you know works?

    Ok, I'll try some out and let you know what I find.

    I saw that google.co.uk and will-hill.mobi managed to do it. I was thinking of using charles proxy to peek at their code.

  • I've never been able to get any of those 'hide address bar' snippets working with C2's engine, can you link me to one that you know works?

    Ashley, I know why the bar is not being removed in C2 exported index.html, and how hack the files to get it to work. I cant pm you, can you pm me and we can find a way to get it put into constrcut 2?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)