Jorge Posted November 6, 2013 Share Posted November 6, 2013 Hi all,my sponsor has mailed me because they are having problems with my game. They say it's freezing before the game over screen. They are using Ipad. I'm testing the game in Chromium for linux, Chrome and native browser in Android, and Safari in Ipad 4 with IOS 7 and having no problems at all.Please, could you try if it freezes for you? https://dl.dropboxusercontent.com/u/2914532/HTML5/Sky_translated2/index.htmlThanks for your help!! Quote Link to comment Share on other sites More sharing options...
mentuat Posted November 6, 2013 Share Posted November 6, 2013 Played first 3 levels before losing to trigger game over. The end screen showed fine and then went to the start screen as expected.No freezing or crashingiPad 1 iOS 5 safari Jorge 1 Quote Link to comment Share on other sites More sharing options...
-AAG- Posted November 6, 2013 Share Posted November 6, 2013 I dont have an ipad but on my lg optimus f3 on chrome it worked perfectly well. Jorge 1 Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 6, 2013 Author Share Posted November 6, 2013 Thanks guys, I really appreciate your help Quote Link to comment Share on other sites More sharing options...
oysterCrusher Posted November 6, 2013 Share Posted November 6, 2013 Works fine with Chrome on Samsung Galaxy S3. Doesn't work for me in desktop Firefox 25 with the followingReferenceError: gang_out is not defined main.js (line 905)ReferenceError: girl_out is not defined main.js (line 958) Jorge 1 Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 6, 2013 Author Share Posted November 6, 2013 Works fine with Chrome on Samsung Galaxy S3. Doesn't work for me in desktop Firefox 25 with the followingReferenceError: gang_out is not defined main.js (line 905)ReferenceError: girl_out is not defined main.js (line 958)Thanks!! Time to use Firefox for testing!! Quote Link to comment Share on other sites More sharing options...
onefrankguy Posted November 7, 2013 Share Posted November 7, 2013 Tested on Mobile Safari on an iPhone 5 with iOS 6.1.4. Froze after I made it to the fourth level and missed one of the bad guys. Screen got a pink tint and locked up. Jorge 1 Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 7, 2013 Author Share Posted November 7, 2013 Tested on Mobile Safari on an iPhone 5 with iOS 6.1.4. Froze after I made it to the fourth level and missed one of the bad guys. Screen got a pink tint and locked up.I use browserstack.com to test the games in different mobile browsers, and it's working fine in every emulated iPhone and iPad, I suppose it's not enough. It seems like on real hardware, there are some problems with nested functions. I changed my code a little to avoid the problem, could you try it again, please? Thanks! Quote Link to comment Share on other sites More sharing options...
onefrankguy Posted November 7, 2013 Share Posted November 7, 2013 (edited) It seems like on real hardware, there are some problems with nested functions. I changed my code a little to avoid the problem, could you try it again, please? Thanks!Ran through it again on iOS 6.1.4 on an iPhone 5. Startup time felt snappier (though that could just be image caching). Sadly, saw the same pink overlay and freeze when I got to level four and missed one of the bad guys. Took a look at the source. The only thing that seems off is around line 1039.if(typeof(Storage)!=="undefined"){ localStorage.setItem("chocolatepixel.skyscraper", hiscore);}Shouldn't that check beif(typeof localStorage !== undefined){ localStorage.setItem("chocolatepixel.skyscraper", hiscore);} Edited November 7, 2013 by onefrankguy Jorge 1 Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 7, 2013 Author Share Posted November 7, 2013 Ran through it again on iOS 6.1.4 on an iPhone 5. Startup time felt snappier (though that could just be image caching). Sadly, saw the same pink overlay and freeze when I got to level four and missed one of the bad guys. Took a look at the source. The only thing that seems off is around line 1039.if(typeof(Storage)!=="undefined"){ localStorage.setItem("chocolatepixel.skyscraper", hiscore);}Shouldn't that check beif(typeof localStorage !== undefined){ localStorage.setItem("chocolatepixel.skyscraper", hiscore);}You are right, I copied it from this tutorial: http://www.w3schools.com/html/html5_webstorage.asp Edit: I have changed it. I don't want to steal your time, I'm sorry. It'd be great if you could try for the last time. I'm using Createjs because it's pretty similar to the native tools I've been using for years, but I think if the problem persists, I'll try phaser for my next games. Quote Link to comment Share on other sites More sharing options...
onefrankguy Posted November 8, 2013 Share Posted November 8, 2013 (edited) It'd be great if you could try for the last time.More debugging. I'm thinking the localStorage thing might be a red herring. Sometimes it works, like if I get two gang members back to back and just let them shot me. Poking through the code to see if I can figure out why. Okay, here's something else that looks suspicious around line 1023.function window_active(){ is_enemy[this_index]=0; allow_change[this_index]=true;}The window_active() function references the this_index variable, but I'm not seeing that variable defined globally. The closest we get is an argument to the close_window() function at line 1018.function close_window(this_index){ createjs.Tween.get(win_index[this_index]).to({image:sp_window2},10).wait(animation_speed).to({image:sp_window1},10) .wait(animation_speed).to({image:sp_window4},10).call(window_active);}I think window_active needs a this_index argument, and close_window needs to pass this_index into it as .call(window_active, [this_index]). Edited November 8, 2013 by onefrankguy Jorge 1 Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 8, 2013 Author Share Posted November 8, 2013 More debugging. I'm thinking the localStorage thing might be a red herring. Sometimes it works, like if I get two gang members back to back and just let them shot me. Poking through the code to see if I can figure out why.Maybe it freezes when you actually beat your high score and tries to save? Just guessing.Edit: I feel a little embarrased as I never thought someone would watch the code. I suppose it`s not very clear Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 8, 2013 Author Share Posted November 8, 2013 I have just read in a forum that sometimes when you call a function from a createjs.Tween, if the function is not declared before the tween, it breaks. Maybe it's related to this problem. Quote Link to comment Share on other sites More sharing options...
Jorge Posted November 8, 2013 Author Share Posted November 8, 2013 function close_window(this_index){ createjs.Tween.get(win_index[this_index]).to({image:sp_window2},10).wait(animation_speed).to({image:sp_window1},10) .wait(animation_speed).to({image:sp_window4},10).call(window_active);}I think window_active needs a this_index argument, and close_window needs to pass this_index into it as .call(window_active, [this_index]). Done. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.