kidos

Members
  • Content Count

    59
  • Joined

  • Last visited

About kidos

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Israel
  1. OK thanks. For my problem, it seems like cocoonjs doesn't accept mp3 files, so I should provide him also ogg as fallback (as you said) This one fixed my problem game.load.audio('music', ['file.mp3','file.ogg']);
  2. Thanks. What do you mean not entirely free? Also, any idea why I'm getting url problem?
  3. Hi, I'm using cocoon 2.1.1 and phaser 2.2.1 I tried to add music to my game // Loading musicgame.load.audio('loopGameStart', 'assets/music/GameStart.mp3');// Playing musicmusic = game.add.sound('loopGameStart',1,true); // key, volume, loop music.play('',0,1,true); //marker, position, volume, loop, forceRestartEverything works great in chrome but in Canvas+ on cocoonjs I'm getting a warning "Phaser.Loader error loading file: loopGameStart from URL null". It seems like it can't load the mp3 file without a reason... Also I have a few questions not related to the problem: 1. Which format works best? wav? ogg? mp3? what's the different beside the file size? Is there a suitable format for cocoonjs? 2. I saw in the forum some are using 2 files likes: game.load.audio('music', ['file.mp3', 'file.ogg']);What's the reason to do that? Thanks!
  4. What is the Phaser version with the flickering and the one without? Can you show your code here that cause the flickering?
  5. Sure, you can detect swipe by the distance of the active pointer. Take a look at this example which works perfectly: http://www.html5gamedevs.com/topic/3862-swipe-to-jump/?p=24478
  6. can you post a little bit from your code (Including the destroy code) ?
  7. Up to the last version, Phaser doesn't provide touch gestures by default. You may create your own gesture mechanics though with Phaser pointers or you could just use hammerJS (http://hammerjs.github.io/).
  8. thanks!! i'd use it some day for sure
  9. Sorry I didn't understand what you're saying... Anyway, I'd recommend you to try CocoonJS, I have a better experience with this tool on iPhone (and android).
  10. How about using angle? http://docs.phaser.io/Phaser.Sprite.html#angle
  11. I did a little hack to make it bounce, I added this to the collide callback function to get a bouncy effect if (player.body.facing == 3){ player.body.velocity.y = player.body.velocity.y * -1;}player.body.velocity.x = player.body.velocity.x * -1;
  12. Thanks, I have to use collide and not overlap. The code was only to show the case, but in my real code the player can kill the enemy only if he above the anemy and if it doesn't it need to get bounce, which can achieved only collide. Any idea hot to make it work with bounce?
  13. Hi, I don't know what I'm doing wrong, I think it's a bug maybe. I have an enemy which goes back and forth horizontally with a basic tween game.add.tween(sprite).to({x: sprite.x-longWidth}, 1000, Phaser.Easing.Linear.None, true, 0, 9999, true) And I'de like to kill the enemy once it collides the player game.physics.arcade.collide(player, enemy, this.killEnemy, null, this);From some strange reason, it doesn't work if the enemy hit the player, but only if I move the player (with cursors) into the enemy (you can check the example below) You can see the full code and example here (base code taken from lewster32 example): http://jsfiddle.net/81duav6j/ Any Ideas?
  14. You're right, this is really strange. The only way I could make it work is by removing this line from the create sprite.animations.add("sea_creature", ALL_FRAMES_JELLYFISH, FRAME_RATE, LOOP, USE_STRINGS);and paste it in the changeTexture function changeTexture () { sprite.loadTexture("sea_creature"); sprite.animations.add("sea_creature", ALL_FRAMES_JELLYFISH, FRAME_RATE, LOOP, USE_STRINGS); sprite.animations.play("sea_creature");}and it's working.. but it's really weird, hopefully someone can explain this (it looks like a bug to me).