Getting started with HTML5

To test your HTML5 app, you will need to upload the entire folder to your web server and access that folder through your HTML5 compatible browser. Due to JavaScript security restrictions, HTML5 builds only work if they are served from a web server.

If you have Python installed you can test locally by starting a web browser on your computer and accessing your HTML5 build folder in your browser. The easiest way to get it served on macOS is to drag your build folder on to Terminal.app then paste

python -m SimpleHTTPServer

into the terminal window. Then open http://localhost:8000/index.html in you web browser. For Windows, with Python installed, run cmd.exe and then use the cd command to change directories to your build folder and run the same Python command and then open your browser to the above URL. If you need to see the console log, please open http://localhost:8000/index-debug.html instead.

Please post questions about HTML5 here.

Rob

Just what I expected, fantastic! :smiley: ,I’m from Perú.

First of all : this is amazing news ! :slight_smile:

I’ve just tried converting my game into html5 but I’ve got two errors as soon as I start building my app :

17:51:50.793 ERROR: unable to download plugin.openssl (com.coronalabs). Error message: 17:51:50.793 \<?xml version="1.0" encoding="UTF-8"?\> 17:51:50.793 \<Error\>\<Code\>NoSuchKey\</Code\>\<Message\>The specified key does not exist.\</Message\>\<Key\>com.coronalabs/plugin.openssl/2016.2883/web/data.tgz\</Key\>\<RequestId\>XXXXXXX\</RequestId\>\<HostId\>XXXXX=\</HostId\>\</Error\> 17:52:22.336 ERROR: Out of Memory error 17:52:22.336 not enough memory

I’ve been able to get rid of the UTF-8 error / Facebook api / etc / (by removing all the plugin in my build.setting file), so I’m fine with this one. But i’m not sure what to do with the “Out of Memory error”…

Oh and are there any Corona SDK / HTML5 documentation available somewhere ?

As noted in the announcement, https://coronalabs.com/blog/2018/03/20/html5-builds-are-now-in-open-beta/

Many plugins cannot be converted to HTML5.  The ones that can may not have been converted yet. 

There is no specific HTML5 documentation.  You just need to do File->Build->HTML5 and to control your screen size, it uses the same build.settings as desktop builds: https://docs.coronalabs.com/guide/distribution/win32Build/index.html#windowsettings

Rob

This is stunning. Well done guys.

I ported my Tides app and it works. Uses xml as data, converts times and tide heights (sorry landlubbers) into screen coordinates and draws the beautiful sine curves. Horizontal scrolling works, text labels well placed on my tide curve.

Available to view at apptoonz.com/corona/irishtides/

I’ll leave it there for a while. No intention of using this app in HTML5, but it’s one hell of a test.

Obviously I stripped out plugins - appodeal, IAP etc. Won;t work anyway.

Brilliant, Brilliant, Brilliant.

I must admit I didn’t read to the end of the post as I was way too excited to try it first :smiley: … but I did understood that some plugin wouldn’t work :slight_smile:

My main issue is the “Out of memory error” that shows up, even after getting rid of all the plugins. I’ll do more test to try to see where it’s coming from.

Update: irishtides works great on android/chrome and iphone5s/chrome.

Javascript fail on iphone5s/safari. 

No doubt lots to learn and bugs to squash. Looking forward to using this.

Thanks guys.

I’ve asked Engineering to look into this.

Rob

Awesome work guys :slight_smile:

Stunning, awesome, brilliant. I just looked at conor1’s Irish Tides app on my iPad. I’m super impressed by the Corona team’s accomplishment. My thanks to all that worked so hard on this! Steve

Rob,

Is it reasonable to assume this development should be usable for Facebook Messenger games? Maybe Facebook games in general (I’m not yet familiar with FB Games).

Conor

Quick question: is this done through emscripten or is a custom html5 engine on export? How’s performance on mobile?

Hi,

Amazing stuff!  :smiley:

-dev

That’s a timely question Conor. I’m at the Game Developer Conference in S.F. and two of the very biggest pushes from the giants involve the word “instant”. Multiple presentations have been made over 2 days by both Google and Facebook pushing their new game tech. In a nutshell: Google’s “Instant Apps” are sub-10 Mb versions of full apps that can be played entirely in a device’s memory without an install. So players can tap a TRY IT button and be playing a game in seconds. Big game companies have been testing Instant Apps since last Fall. Now it is open to everyone. This isn’t pertinent to HTML 5; but it is worth everyone’s attention. Link: https://www.theverge.com/2018/3/19/17137088/instant-apps-game-developers-google-play-mobile-ads-agones-kubernetes Facebook’s “Instant Games” is their big focus and push. These are small footprint HTML 5 games played in Messenger. Facebook has had some large companies (i.e. Zynga, King, etc.) making the initial games for this space and the play numbers are enormous — even for Facebook. Here’s their main intro doc on this: https://developers.facebook.com/docs/games/instant-games . As an aside, both Cocos and Unity have made a big deal about their support for both Instant Apps (Google) and Instant Games (Facebook). This is certainly too early to try to connect this HTML 5 Beta to “Instant Games” — but it is cool to think that the potential might be here.

For anyone who wants to see some Corona Content as HTML5 in action go here to see most of my game templates and some other stuff, running as HTML5
 

https://roaminggamer.github.io/RGDocs/pages/html5_tests/

**WARNING** If there is a pause after the download, give it a second.  I’m not sure why but some of these take a moment to start.  

It could be me, or it could just be a beta thing.  :slight_smile:

Hi,

@roaminggamer works great for me. Awesome stuff!

-dev

@roaminggamer very impressive!

http://kwiksher.com/demo/kwik-the-cat/

I published my demo book made with Kwik. 12pages 25mb of .data file.  Perfect on chrome and Safari on Mac

@roaminggamer - your stuff rocks!

Steve

Numeric Input Only textField has problem.