Cannot run two construct game currently on Safari

Bugs will be moved here once resolved.

Post » Wed May 08, 2013 8:42 am

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/65450522/ReportBug1.capx

Steps to reproduce:
1. Export project to HTML5 website and place in server.

2. On iPad, open Safari. Add browser tab (we call it Tab A) and input the URL of the exported website.

3. after loaded, drag the color box to the empty box at the bottom. It works fine so far.

4. Then open a another new Tab in Safari, we call it Tab B. input the same URL and repeat step 3 above. It works properly that the color box can be drag and drop.

5. Now switch back to earlier tab, i.e. Tab A. The color box can't be dragged anymore. Actually, the website becomes non-responsive. If reload the page at this point, Tab A becomes normal but the game on Tab B will become non-responsive.

Observed result:
The latest loaded HTML5 game seems override the HTML5 game loaded earlier.

Expected result:
Games opened on different tab should be able to drag and drop.

Browsers affected:
iPad Safari: yes (iOS version: 6.1.3)
PC Safari: no
Chrome: no
Firefox: no

Operating system & service pack:
Construct 2 installed on Window XP Professional v2002, SP3

Construct 2 version:
Release 126 (32-bit)

    bowiepoon2013-05-09 02:11:13
B
4
S
1
Posts: 5
Reputation: 810

Post » Wed May 08, 2013 2:15 pm

Your .capx file link returns 404 not found. Please provide a working link or we can't investigate your report.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu May 09, 2013 2:11 am

Link has been modified. Please try again. Thanks.
https://dl.dropboxusercontent.com/u/65450522/ReportBug1.capxbowiepoon2013-05-09 02:12:02
B
4
S
1
Posts: 5
Reputation: 810

Post » Thu May 09, 2013 5:37 pm

I can reproduce a problem, but it looks like a Safari bug, especially since it works fine on every other platform. You might want to report this to Apple.

Do you really need to open two projects at once? This would also exacerbate the low memory usually available on mobile devices. Your project is also extremely wasteful with memory, needlessly using gigantic textures; you should read remember not to waste your memory to avoid running in to memory usage issues.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri May 10, 2013 2:39 am

Actually, these HTML websites will be used as iBook widget and import to iBook ultimately. We have tested them on iBook and found similar problem.
I take iPad Safari as example just to facilitate your investigation.

In iBook, these 2 games won't be opened currently but one after another.
But we found that only the first opened game will behave normal. Games opened afterwards will becomes non-responsive. (opposite to what we experienced in Safari) Seems that even the widget is closed, the game is still running at the background. And all the touches are still attached to the first opened game.

Since iBook has a "didEnterWidgetMode" event, it will be triggered upon opening a HTML5 widget, we can implement a callback function in the Construct2 HTML5 when it is loaded.

Just wondering if we can make use of such callback function to accommodate Apple's bug. Is there a way to tell the game to destroy or release all resources?

Thanks for your help in advance.




B
4
S
1
Posts: 5
Reputation: 810

Post » Fri May 10, 2013 12:41 pm

Not that I know of, since a browser's just a browser and unless there's some specific javascript extension that only Safari supports then it's just a standards compliant browser.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon May 13, 2013 2:40 am

The "didEnterWidgetMode" is a javascript event, specific for iPad Safari.
It's resides in the built-in javascript library and can be accessed in exported construct 2 website.

For example:

<script type="text/javascript" src="AppleClasses/AppleWidget.js"> </script>

<script type="text/javascript">
    widget.didEnterWidgetMode = function() {
       // Anything we can add here to destroy previously opened construct2 website??????
    
    };
</script>
B
4
S
1
Posts: 5
Reputation: 810


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests