Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by chrisdarroch

So I'm attempting to get the game I'm toying with working on a mobile device. When I load it on my iPhone 4, the progress bar for the game loading appears, gets to 80%, then just hangs forever.

Turning on Safari's developer mode, it seems that the lib/impact/image.js file is taking too long when running the resize loops @ line 107.

The image.js error might be an isolated case, but there are plenty of other public game demos that seem to have a similar problem where loading hangs: http://phoboslab.org/ztype, mantrakid.com/secret and prototype.v-design.pl all seem to have this problem.

1 decade ago by chrisdarroch

My issues with the image.js were likely caused by following the http://impactjs.com/documentation/impact-on-mobile-platforms guide, specifically the part where you upsize the game by a factor of 4 on the iPhone. Doubling the pixels for the canvas and halving the scale allows the game to load.

I'm not sure if that's a desirable workaround or not, however.

1 decade ago by dominic

Biolab Disaster was upscaled 4x because otherwise the sprites would have been really tiny on the iPhone4's screen. If your game looks fine scaled up 2x, than that's a valid solution.

How big are your images? How many images do you load? It really shouldn't take long enough to be aborted by iPhone's JavaScript engine. I'll try to reproduce this; maybe there's a workaround.


Z-Type and the other games don't finish loading, because the canplaythrough event for sound files is never fired. Your best bet right now is to completely disable sound (see here). For Z-Type I didn't care for now, because I'd have to put in some more work to get the keyboard working (if it can be done at all).

Here's an in depth article about <audio> on iOS: http://remysharp.com/2010/12/23/audio-sprites/
Page 1 of 1
« first « previous next › last »