any disadvantages to HTML5?

I have this idea to use Adobe XD to design a basic framework, then export to HTML w CSS and possibly use the HTML5 that’s built into Solar2D. But I haven’t done this before.

Two questions:

  1. What are the disadvantages to making a game this way?

  2. The advantages are clear; I could start to use so many tools created for HTML5. I’ve seen from the Solar2D Help how to access properties from the HTML5 javascript within LUA; are those properties only for reading or for writing, too?

Solar2D’s HTML5 builds are just Solar2D builds that run on a web browser. Technically, they are running on emscripten, like many other game engines’ HTML5 exports.

The one cool added benefit to the HTML5 builds, like you said, is that Solar2D’s HTML5 builds can run JavaScript via plugins. These plugins can both send and receive data from the website that is hosting them. You can see some of my implementations over at:

While you can read and write to the website or the browser’s local storage, depending on how your site/server are set up, I don’t think what you’re talking about is possible (if I’m understanding you correctly, that is).

Solar2D itself doesn’t understand HTML or CSS on any level and while it can use JavaScript in plugins, you’d need to bridge the gap between JS and Lua yourself, like I’ve done with the playground. In that sense, unless you’re planning on creating an interactive web GUI, then the HTML5 builds won’t provide any benefits over the other platforms on that front. If you are just creating static HTML5, CSS, etc. files, then you’d need to read the files and process their information the same way on all platforms.

As for the disadvantages, three that come to mind are:

  1. The HTML5/emscripten builds seem to have a lower FPS cap than other builds. They seem to peak at around 50 and I’m not sure if this is an emscripten or a general browser/JS API, like WebCanvas, limitation.
  2. The physics don’t run quite the same as they do on other platforms. You need to use different values for gravity, for instance, to obtain the same fall velocity on HTML5 and simulator.
  3. Not all libraries or plugins are available on HTML5.
2 Likes