CaueCR

Members
  • Content Count

    36
  • Joined

  • Last visited

About CaueCR

  • Rank
    Advanced Member
  • Birthday 06/13/1994

Profile Information

  • Gender
    Male
  • Location
    Brazil
  • Interests
    Game programming! I've been diving head on in HTML5, and any knowledge shared or received is appreciated!
  1. The video on CocoonJS problem was really a nuisance, but as you said yourself, it's not worth the trouble xD I started adapting my games to get those videos off them. The funny part of the browser support, is that I was able to make it work on all browsers I've tested, even in android 4.0.1's native browser. The catch seems to be the autoplay, video on mobile browser need a user input that works as some kind of "authorization" for the video to play. So, when I disable the autoplay attribute and enable the controls attribute, the play button appears and the video plays when I click it. All that works with the code I posted above. And thanks for the .drawImage tip! I'll try that here! Thanks for your time!
  2. From what I've learned, quirks mode is a compatibility mode for old browsers. When the browser is old and finds something in your code that he does not support, your HTML page should enters Quirks Mode (That is, if you said that she must). What the console is telling you, is that Phaser is using an method that is too old (and that is risky, because if the new browsers decide to stop giving support to old methods, that part of Phaser will stop working). That's why it says you should use that old method only in quirks mode.
  3. I've found my answer already. The problem was in the declaration of the tween: //I was doing this:game.add.tween(blabla).to(bblablablabla).start().onComplete.add(function(){blablabla;});//When I should do this:tween1 = game.add.tween(blabla);tween1.to(bblablablabla).onComplete.add(function(){blablabla;});tween1.start();//then there's a way to do this:tween1.stop();I hope this will be useful to someone later. See ya!
  4. Hello again! I was trying to use a lot of tweens in some scenes of my game, and I wasn't able to find a way to stop the tweens. I've tried to set a flag to false to stop it from ending, But I found out the hard way that they wasn't actually stopping. When I started another tween, my object's coordinates were messed up because of the previous interruption of tweens. Is there a way to stop a tween in a way that it REALLY stops? I'd be very grateful if someone could answer this to me. (PS.: I've already found three other posts about it, but their solution (myTween.stop() doesn't work anymore, it seems) Thanks!
  5. OBS.: browserCheck = navigator.userAgent; I forgot to add this line xD
  6. Alright then! What I did was take advantage of HTML's video tag trough DOM manipulation. When I need to use a video, I simply append it in front of the canvas. When the video ends, I remove it and start the game. After the game finishes I append the video again. That is necessary because the video tag seems to always stay on top of the canvas, so even if I append them in the correct order, the video stays up. //The video tags creationv2 = document.createElement("video");if(browserCheck.indexOf('OPR') != -1){ v2.src = "media/videos/teste2.webm";}else{ v2.src = "media/videos/teste2.mp4";}v2.width = 1024;v2.height = 768;v2.id = 'video';v2.loop = false;v2.autoplay = false;v2.controls =true;v = document.createElement("video");if(browserCheck.indexOf('OPR') != -1){ v.src = "media/videos/teste.webm";}else{ v.src = "media/videos/teste.mp4";}v.width = 1024;v.height = 768;v.id = 'video';v.loop = false;v.autoplay = false;v.controls = true;//Later when I need to use the video I set one flag to false, append the video, and set the flag back to true. That way the video is appended only once (after all, you'll have to append the video in the update section of Phaser)if(!v_apply){ document.body.appendChild(v); v.play(); v_apply = true;}//When the video ends, I read the .ended property and remove the video from the bodyif(v.ended){ if(!v_remove) { document.body.removeChild(v); v_remove = true; }}There's one little trick though, the script must be under the body tag. At least that way I've made the video run on intel XDK, BUT the controls property must be set to true. If it is set to true, the video won't load at first, but when you tap the play button it will load. I hope this helps!
  7. Wow, sorry looks like I'm late xD In the end I wasn't of much help, but I'm glad it worked! Good luck with your next games!
  8. Thanks a lot guys! I was starting to get desperate here. I believe you're right spartanatreyu, and the people at CocoonJS couldn't give me answers at the time I talked with them, it is a strange issue indeed. I'll try asking them again about this problem, thanks for your time! And about the video issue, if you're interested Videlais I've made video work with Phaser, but it involved some DOM weight-lifting (and the script tag must be made after the body tag for the video to work). And thank you very much for the list! That's something that will help me a lot, thanks! And sorry for the angry writing, I was getting a wrong impression because of the time this post was up, and no one (from the 385 viewers) came here at least to say "Sorry, but we don't know that too". At least now I know the problems aren't happening only with me. Thanks again!
  9. I'm sorry but I could not understand the problem, could you please paste your code? Maybe it will be easier to help you that way. Maybe it's the level counter logic that is overwriting its value?
  10. Nobody is going to help me? I've seen a lot of Phaser games published with CocoonJS but nobody is saying anything. Is it some market secret? I thought this forum was made to help developers. Not to mislead them. I hope anyone can help me, I'm really needing the help. Sincerely, CauĂȘ.
  11. 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!
  12. Well, I've looked at the network tab of chrome debbuger, and got this: http://www.4shared.com/download/SAWCuW4dce/debug_2.png It 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!
  13. Well, launcher freezes too. The custom launcher freezed, the Play Store launcher freezed. There's definitely something wrong. All this compatibility problems started after CocoonJS 1.4.7 version came out. Now even the ImpactJS games I made and ported with Cocoon doesn't work anymore.
  14. Nice game! Liked it a lot! You said you used CocoonJS, could you post a topic about how you did it? After the new CocoonJS release, things are not working like they used to. I tought it was just me but it seems more people are having trouble with it. Hope your game is a success!
  15. I'm having similar problems with CocoonJS, and nobody gave me a solution as well, but there IS something wrong with that update. After 1.4.6, even my old ImpactJS games, in which I used Cocoon, does not work with it anymore. Maybe they have changed the way you should create the .zip file? In my case, nothing that uses cocoonJS works. The app starts, black screen, freezes, android send me back to home. That happened even with the compiled launcher and the Play Store's launcher. I'm trying to find a solution in their support page. Let's see what they have to say.