Game hangs when 'Play' is pressed

0 favourites
  • 14 posts
From the Asset Store
Ready-to-use buttons for your creations, two of each style, pressed and unpressed.
  • Link to .capx file (required!):

    dl.dropbox.com/u/13425402/Tough%20to%20Kill.capx

    Steps to reproduce:

    1. Fire up the game (can do so here: dl.dropbox.com/u/13425402/Tough%20to%20Kill%20v1/index.html)

    2. Click 'Play'

    Observed result:

    For most people, the game just 'hangs' and does nothing. In Firefox, a friend of mine reported that a script error popped up for him when he pressed 'Play': "c2runtime.js:51" "a script on this page may be busy or it may have stopped responding" - further, he managed to actually get the game to work in Firefox after refreshing the browser about 4 or 5 times randomly (though it still through the script error at him).

    All other people who have tried have reported that the game just hangs.

    I personally have not been able to reproduce any of these issues and the game works fine for me, making it difficult for me to figure anything out for this.

    Expected result:

    When pressing the Play button, it is expected that you transition from the Intro page to the game layout itself.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Opera: no (one user, said it worked fine)

    Safari: unkown

    Internet Explorer: unknown

    Operating system & service pack:

    Varies; many users

    Construct 2 version:

    Latest version, 123.2

    Further Note: I never had this issue before when exporting with previous versions of C2. This only happened after the latest updates, though I did skip a few in the middle (I can't recall exactly, but I want to say 116 or 119 was the last version I successfully exported with).

  • On a related note:

    Playing with the Chrome dev tools, it appears that all of the game resources are not loading appropriately during the game's 'loading' time, and instead is loading everything while in the main menu. Anyone who tries to press Play before these resources are loaded, then the game hangs and nothing happens (or shoots an error). If you wait until the resources are loaded, then it works fine. So it appears anyway.

  • As Ashley always says, if you are posting a bug report, then re-create the bug in 'as simple as .capx' as possible without any non-standard plugins.

    This is a 56MB file ! Not only that, it's using clay.io.

    This could be anything from a your events to a breaking change, but this is too much for anyone to check adequately.

    Having said that - after deleting the webstorage plugin, the game loaded and played fine, so you may want to investigate that area.

  • You're right, I've encountered the same issue in a project of mine (if you check for error in your browser you'll see an error message talking about a DOM security issue with a slightly different message in FF/Chrome).

    I came to the same conclusion that it was because the project wasn't completely loaded, and so you should make a loader screen that will only give access to your menu once ALL datas are loaded.

    Also, it's only experienced when the project is exported, not in preview.

    Chrome and FF have the same behavior, this time IE is the one not complaining about anything and executing the game. Perhaps it's webGL related ?)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • How do you make it so that the loading screen only disappears once everything is loaded, though?

  • The loading screen is the first layout of your project and you switch to the menu only once loadingprogress = 1.

  • Hmm. It doesn't seem to be working. The condition I have is "when loading is complete" and when that condition is met, the action is 'Go to main menu". However, it just goes to the main menu regardless whether everything is loaded or not.

  • Try event "system: compare two values" loadingprogress = 1

    Loadingprogress is a system expression.

  • As per how to report bugs, please re-submit your .capx with no third party plugins used (you used clay.io). This eliminates the possibility the problem is caused by the plugin. FYI your exported game seems to run OK here in Chrome.

  • I've been talking to Kyatric a bit about a similar issue over Skype. It may be Dropbox is failing to send some images (they're not a great host). Can you reproduce the problem when hosted on a different server?

  • After further testing, I'd be tempted to say that the issue comes from dropbox's speed of file serving.

    It appears that not all images are properly cached before displaying the game.

    It's not that big of a deal as long as you don't plan to only host the game in dropbox.

    It's a bit strange that it happened "all of a sudden", never had this issue before a few days ago.

    Just be aware that for your testing phases, it's better to wait (don't hesitate to wait a few minutes) before making any action in the game, even if the loading is supposed to be complete.

    (A few refreshes seems to also help, making sure all the files are loaded)

  • I will re-upload a Capx in the near future when I am home from work.

    However, to answer the question, I also tried this with Google Drive and had issues as well. I can set up new demos as well for further testing in both Dropbox and Google Drive. Are there any other cloud areas that work better for hosting?

    On a semi-related note: all of this got me thinking about how to reduce the size of my project overall. The largest images in my project are the background images (the grass, roads, floors, etc). Each image is between 600kb and 1.2MB, and there are 12 of them. The total number of MBs the game projects is around 33MB after compression.

    So I opened up the 12 images in GIMP and I saved them as relatively low-quality JPEGs. This dropped the size of each image from 600kb-1.2MB down to about 100-200ish kb each with relatively little to no visual change. Great, I thought!

    However, I then replace the first image with the new JPEG, and the projected file size went from 33.something to 34.something. Odd, I thought. So I replaced the second image with the new JPEG, and sure enough, it went up to 35MB. And so on and so forth as I added the others.

    So I am curious, how accurate is the projection? I was under the impression that JPEG would probably be the smallest file size image useable.

    At any rate, I will get a new Capx and demo up hopefully later this evening. Thanks!

  • Check this blog article about image compression in C2.

    It's likely that skydrive will be the same as dropbox, understand a free hosting service.

    I've tested a project (300 kb only) that bugged in dropbox.

    Hosted it on my own server, no bug at all. You get what you pay for.

  • Note Construct 2 ignores the import format of images and always converts them to PNG; if you want to use JPEG on export then use the image format dialog from the image editor.

    Closing as this appears to be an issue with the host rather than a Construct 2 bug. If you need more reliable hosting, file servers are probably very cheap if you look around.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)