Hi there.
I've worked heavily with Html5 games recently and I found some bugs and simple tweaks that would improve the speed of test and release.
EDIT - Other little bug: Game setting > Loader > Apperance > Clear background doesn't work. I need to manually remove the image from the game folder in order to remove the loader background image.
I hope this helps,
Alessandro
I've worked heavily with Html5 games recently and I found some bugs and simple tweaks that would improve the speed of test and release.
- Bug: if you put an image on the loader screen tab, it will go in front of the loading bar, hiding it.
- Bug: Stencyl says in the loader tab about the Sitelock:Quote
Prevent piracy of your game.
But the game won't start if you use spaces in the list. You need to write the domains like this: "website.com,website2.com,website3.com" without spaces or the game won't load.
Format (comma separated):
website.com, website2.com
So please, update the text so people won't have this problem anymore. - In order to load an html5, Sponsors tend to use an iframe that links to the index.html of the game.
The problem is that if the main page with the iframe has the scrolling enabled and the game use the arrow keys or the spacebar this will cause the main page to scroll when the user press one of these buttons, making the game unplayable.
I found this code that need to be added in the index.html of the game:
Code: [Select]
<script type="text/javascript">
parent.disableScrollButtons = function(){
window.addEventListener("keydown", function(e) {
// space and arrow keys
if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
e.preventDefault();
}
}, false);
};
parent.disableScrollButtons(); // calling the function in parent window
</script>
- Basically it inject in the parent page a function that disable these buttons, fixing that problem.
- Speaking about the third point: Could you create a text area inside Stencyl where we can add javascript that will be placed inside the index.html of the final game?
In this way we can insert code like the one above without editing all the time the exported game.
Would be amazing if you could insert this code int he index.html of the game, so we don't need to edit it every time we export the game.[/li]
EDIT - Other little bug: Game setting > Loader > Apperance > Clear background doesn't work. I need to manually remove the image from the game folder in order to remove the loader background image.
I hope this helps,
Alessandro