Jump to content


  • Content Count

  • Joined

  • Last visited

  1. I have a tilemap with two layers. How can I make sure only the tiles that are visible are being rendered? If a tile on the first layer is covered completely by a tile of the second layer, I don't want to render it. But some tiles on the second layer do not completely cover the tile below them. Anyone have some code samples?
  2. Is it possible to adjust the arcade physics collision boxes of tiles in a tilemap? You can change the offset and size of the body for a sprite, but can you do the same with a tile?
  3. Does anyone have any working examples of using the createFromTiles() function of tilemaps that they would be willing to share?
  4. Okay, I tried it and it lets me tween the scale, but that's the only property that seems tweenable. Position doesn't work.\ EDIT: Using a group didn't work, but iterating through each child did. Thanks for the help!
  5. No they do not do this by default. If you want your sprite to disappear when it is outside the camera, set sprite.autoCull = true
  6. Is it possible to tween a bitmap text object? I took some code from the Examples website and tried it on a bitmap text, but nothing happened. I tried the same code on a sprite, and it worked.
  7. Okay I discovered myself that I can do this with game.input.activePointer.positionDown.x + game.camera.x.
  8. How can I find the pointer's x/y coordinates in the world? Can I convert between camera and world coordinates?
  9. In my game, I set the mass of the player to 5 and the mass of all other sprites to zero. However, the player still slows down when he hits those sprites. Is this intended? Also, if the player has a mass greater than 20 and collides with a sprite whose mass is 1 weird things happen.
  10. You've probably already discovered this, but these posts may interest you. https://github.com/photonstorm/phaser/commit/a2eaccabedbb2d99b2f744a5717fb9ba31f47762 http://www.html5gamedevs.com/topic/13961-videotexture-load-video/
  11. Thank you so much Rich, this solved my problem. The funny thing was that I was able to create the sprite with a frame number and it worked fine.
  12. No, it does not. I uploaded a few screen shots of it in console.log.
  13. I am trying to run an animation in phaser. I created the sprite and added the animation with the following code: player = game.add.sprite(game.world.centerX,game.world.centerY,null); // parent spriteplayer.legs = game.add.sprite(50,50,'soldier',16); // child spriteplayer.legs.anchor.set(1,1); //anchoring child spriteplayer.legs.animations.add('walk',[16,15,14,13],10,null,false); // The animation I want to playplayer.addChild(player.legs); // adding sprite as childI run the animation with the following code: player.legs.animations.play('walk');The version of phaser I am using is 2.3, the build
  • Create New...