When bundling HTML5 builds makes the runtime its version number and not the name of the project. Maybe Defold can then host runtime JS for each version on a public CDN, and have an option when bundling to load the runtime from that public CDN.
So instead of “My project.js” for example name it defold.min.js and put it into a folder with the version number as it name.
You could probably get it hosted on Google CDN https://developers.google.com/speed/libraries/ or CloudFlare CDN (might be easier to get on) https://cdnjs.com/about it would be extra work with each release to get these up (essentially committing the JS to an official public git that these sites pull from), but it would also mean choosing Defold for webgames is an even more appealing option not just for devs but also portal owners. Have which CDN to use if enabled in game.project too. Maybe only having one official CDN would be better so the caching is not fragmented.
Then we could use those CDNs for example like: https://ajax.googleapis.com/ajax/libs/defold/1.2.86/defold.min.js
I dislike how the HTML5 project is set up to modify the canvas style on load, I also dislike how it changes the browser window title by default. I’d like these as options to turn off in the game.project file.
Please add a button to go along with the normal fullscreen to only go fullscreen inside of the current browser window… so take up 100% width and 100% height but not go fullscreen on the monitor. Have this be able to be an option set in game.project as default as well. Users will appreciate it when they discover it as it will be one of the best ways to play games in terms of experience.
Add an option to capture the mouse cursor. This ImpactJS game does this for example and why it’s useful will be clear when you play it http://phoboslab.org/xibalba/
Please add some styling to the canvas tag so that it disables the text select when dragging a mouse cursor over it.
<style type="text/css">
canvas {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
outline: none;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); /* mobile webkit */
}
</style>
style="user-select: none; -webkit-user-select: none; -moz-user-select: none;"
When dragging on Chrome on Windows I see this for example
Right click is not working still and instead brings up this dialog.
Right click is needed in certain kinds of games that are mouse focused and need two primary inputs. Think like shooting left click, reloading with right click.
Some more requests…
Ability to call a specific JS function, and setup a JS listener to get data. The closest I’ve gotten to doing this is: sys.open_url(“javascript:window.alert(‘test’);void(0);”) but it opens on a blank page so it’s useless.
Ability to set the current webpage URL. But if the above were available it would be enough.