CaueCR Posted January 23, 2014 Share Posted January 23, 2014 Hello again! Maybe this question was already answered, but I couldn't find it. So, sorry if I'm repeating it! I'm almost finishing one game I made, and I've tried to run it on a Samsung Galaxy Tab 10.1's chrome browser. When the game starts, the background is tweened normally, but the cards (which are all in the same texture atlas) are not drawed. Also my sound isn't working either. Can anybody help me? One of my intents with phaser is to deploy in Android, so I would be very grateful if someone can tell me a solution. Thanks for your time! Link to comment Share on other sites More sharing options...
rich Posted January 23, 2014 Share Posted January 23, 2014 I expect there is something else going on - if part of your atlas appears fine then the image and atlas data obviously loaded without a problem. You could boil it down to a really simple test case though, just take one of the atlas examples, swap for your own, and try to display some of the frames. The sound could be anything really, need more information to figure it out (could be a codec issue for example). Link to comment Share on other sites More sharing options...
CaueCR Posted January 23, 2014 Author Share Posted January 23, 2014 My backgrounds are not in the Atlas, the Atlas only holds the card images. It's even applying the tween on the black square it shows, just the images that are not showing up.And my sound is in both .ogg and .mp3 formats. It should be playing at least one of them.I'll try another project where it just shows one image from the atlas, and I'll post the feedback here. Link to comment Share on other sites More sharing options...
rich Posted January 23, 2014 Share Posted January 23, 2014 Ok you meant the cards are all in the same atlas - I read your message to mean they're in the same atlas as the background. What format is the atlas? json? xml? object? Link to comment Share on other sites More sharing options...
CaueCR Posted January 23, 2014 Author Share Posted January 23, 2014 It's JSON Array, I generated it with texture packer. I hope this helps! Link to comment Share on other sites More sharing options...
rich Posted January 23, 2014 Share Posted January 23, 2014 You can debug Chrome on Android from a desktop really easily, I would suggest trying this to see what errors it is throwing in the console. Link to comment Share on other sites More sharing options...
CaueCR Posted January 24, 2014 Author Share Posted January 24, 2014 I'll try that! I've never debugged that way before, so it will take some time before I answer xD And sorry for the delay between my answers, I only access the forum in this time period (between 7 o'clock and 12 o'clock)Thanks for your attention! Link to comment Share on other sites More sharing options...
CaueCR Posted January 24, 2014 Author Share Posted January 24, 2014 Here's the debug screen! I was hoping he would tell me something about the sound issue, but he didn't.Maybe I generated my Atlas the wrong way? It's dimensions are 4096 x 2048. Link to comment Share on other sites More sharing options...
CaueCR Posted January 24, 2014 Author Share Posted January 24, 2014 I've tried to switch from WebGL to Canvas, and it worked! I don't know why, but WebGL doesn't render the atlas' images! (My tablet is using android 4.0.4, and his Chrome version is 32.0.1700.99).And any ideas on the sound part? I'm really confused here xD Link to comment Share on other sites More sharing options...
CaueCR Posted January 27, 2014 Author Share Posted January 27, 2014 So, no solution yet?I really need the help with the sound, for the canvas mode already made the atlas work.Thanks for your time! Link to comment Share on other sites More sharing options...
turboboing Posted January 27, 2014 Share Posted January 27, 2014 I also had problems with the stock browser on the Galaxy Tab 3, and like you said using canvas fixed it.So I added this hacky fix for now. var ua = navigator.userAgent;var bAndroid: boolean = (/Android/.test(ua));var bChrome: boolean = (/Chrome/.test(ua));if (bAndroid && !bChrome ) super(width, height, Phaser.CANVAS, 'game', null);else super(width, height, Phaser.AUTO, 'game', null); Tom Atom 1 Link to comment Share on other sites More sharing options...
CaueCR Posted January 28, 2014 Author Share Posted January 28, 2014 I was studying about that atlas problem, and I'm sure there's something about the dimensions of the frames in the atlas. It seems WebGL has a specific requirement about that, but the console message does not say much.I'm glad my post was useful for you! Link to comment Share on other sites More sharing options...
CaueCR Posted January 30, 2014 Author Share Posted January 30, 2014 Well, I've looked at the network tab of chrome debbuger, and got this:http://www.4shared.com/download/SAWCuW4dce/debug_2.pngIt seems that the Chrome in the device is not allowing access to sounds and videos. Anyone know how to handle this?Thanks for your patience! Link to comment Share on other sites More sharing options...
CaueCR Posted February 3, 2014 Author Share Posted February 3, 2014 About the atlas problem, I've discovered the hard way why it wasn't working.The atlas' dimensions must have the maximum size of 2048 x 2048. That allows the iOS to handle the atlas and WebGL activates.About the audio issues, no one could (or maybe wanted to) help me yet.So I'll mark this as answered, but it's not fully answered yet, any help with the sound part would be appreciated! Link to comment Share on other sites More sharing options...
Recommended Posts