• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by samme

  1. Locking the screen orientation
  2. a) You would have to add a CSS background yourself, behind the game canvas. b) this.cameras.main.centerX etc. c) Need to see code.
  3. pixel.html
  4. Phaser.Point.rotate(catHead, torso.x, torso.y, torso.angle, true, catHeadDist); Use anchor (0.5, 0.5) for both sprites. catHeadDist should be constant, I think.
  5. This is a simple 4-scene game (boot, menu, play, end) based on the Making your first game tutorial, so it may be a good next step from that.
  6. Use a Container, or update the weapon's position manually.
  7. I don't think Groups are intended to be nested (maybe you want Containers?).
  9.\physics\arcade\velocity from angle.js
  10. Or use delayedPlay to schedule them in a sequence.
  11. Can you just make one long animation from all the frames?
  12. That's fine. You can also do some_objects.length = 0; You can also use a Group, which has built-in methods for a lot of these things.
  13. var ZOOM = 2; new Phaser.Game({ callbacks: { postBoot: function (game) { var config = game.config; var style =; style.width = (ZOOM * config.width) + 'px'; style.height = (ZOOM * config.height) + 'px'; } } });
  14. Loading a tilemap file and creating/instantiating a Tilemap object are different. You can load as many tilemap files as you need, as long as you use distinct keys. It doesn't matter which scene you load them in, they're all stored in a single game cache. You can create a Tilemap object from any tilemap file already in the cache. The map belongs to the scene and lasts only as long as the scene does.
  15. That is the intended behavior in Phaser 2 (but the blank index is -1), so it may be the same.
  16. Not sure. You'd have to examine the canvas's CSS styles.
  17. Possibly the canvas is just too big (in pixels).
  18. You should use different cache keys for the two tilemaps.