# any disadvantages to HTML5?

**URL:** <https://forums.solar2d.com/t/any-disadvantages-to-html5/355268>\
**Category:** HTML5\
**Created:** [December 17, 2022, 6:56pm UTC](https://forums.solar2d.com/t/any-disadvantages-to-html5/355268 "2022-12-17T18:56:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![troylyndon](https://forums.solar2d.com/user_avatar/forums.solar2d.com/troylyndon/32/313_2.png) [@troylyndon](https://forums.solar2d.com/u/troylyndon)\
**Post date:** [December 17, 2022, 6:56pm UTC](https://forums.solar2d.com/t/any-disadvantages-to-html5/355268/1 "2022-12-17T18:56:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![XeduR](https://forums.solar2d.com/user_avatar/forums.solar2d.com/xedur/32/256_2.png) [@XeduR](https://forums.solar2d.com/u/XeduR)\
**Post date:** [December 18, 2022, 12:43pm UTC](https://forums.solar2d.com/t/any-disadvantages-to-html5/355268/2 "2022-12-18T12:43:45Z")

</div>

Solar2D’s HTML5 builds are just Solar2D builds that run on a web browser. Technically, they are running on [emscripten](https://emscripten.org/), 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:

> **[GitHub - XeduR/www.solar2dplayground.com: Solar2D Playground is an...](https://github.com/XeduR/www.solar2dplayground.com)**
>
> Solar2D Playground is an interactive website that allows you to create and run Solar2D projects instantly online. - GitHub - XeduR/www.solar2dplayground.com: Solar2D Playground is an interactive we...

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.
