bytecauldron / bean-farmer-extreme-2

Ludum Dare 52 Entry
1 stars 0 forks source link

HTML5 Export for Itch.io. #2

Open bytecauldron opened 1 year ago

bytecauldron commented 1 year ago

This isn't as simple as "set the target for HTML5 and build it". From what I understand, there are a lot of additional considerations when trying to get a web-equivalent version of a GM project working. See here: https://help.yoyogames.com/hc/en-us/articles/216754008-Uploading-Your-HTML5-Game-To-A-Web-Host

Because of this, it may be impossible to build an HTML5 version that is "one-to-one" with the Windows build (or at all).

bytecauldron commented 1 year ago

Here are my findings so far. The general process is to start with a fresh project and incrementally add stuff from the existing one:

bytecauldron commented 1 year ago

Aha! Input out of the box appears to be causing issues with the HTML5 export. This happens in both Chrome/Firefox: "unable to convert undefined to a number". Same issue we were having during the gamejam, so this is probably the root cause. Supposedly Input should work for HTML5 but maybe there is some extra configuring? I wasn't able to find an existing bug report or recent discussion in the Kitchen Discord, so maybe this is a new thing (or I'm doing something wrong).

Ok, so in order to properly debug what is going on here:

bytecauldron commented 1 year ago

No need to file a bug report, Juju fixed it! Something involving a __input_class_player constructor in Input. So I'm guessing this will be in the next release (5.3.2?). I'm sure there are other reasons why this game won't build to HTML5, but this was definitely one of the reasons. Very happy about this. 😊

bytecauldron commented 1 year ago

Ok! I have tested this with Input 5.4.0. Game loads great now. Couple of things, however:

Aside from that, I'm surprised it loaded at all. The goal is to get the HTML5 build a close as possible to the Windows build, so I'll see what I can do to try to mitigate these issues.