• Content Count

  • Joined

  • Last visited

  • Days Won


samme last won the day on October 24

samme had the most liked content!

About samme

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. samme

    Can't restart game?

    It's from calling animations.add(…) again with the same keys. A common approach is using a dedicated scene for loading assets and animations that runs only once.
  2. samme

    Phaser Canvas Destroy config/game destroy.js
  3. samme

    How to return a Phaser.Game object?

    Could you just put it in a scene? function preload() { let mapSize = 64; let tileSize = 4; this.load.json('map', 'http://localhost:5000/map?size=' + mapSize + '&tileSize=' + tileSize + '&img=0'); } function create() { let map = this.cache.json.get('map'); let empire = makeGame(map, mapSize, tileSize); // … }
  4. samme

    Scene event callbacks
  5. samme

    A 'global' container, Ideas?

    Use this.registry from a scene.
  6. samme

    dynamic background colour?\background color interpolate.js
  7. samme

    Moving a mask with it's parent

    If you use childSprite.addChild(mask) etc. I believe it should work in the latest Phaser CE.
  8. samme

    setCircle doesn't work on a staticGroup game object

    OK, it turns out Phaser.Physics.Arcade.StaticBody#drawDebug draws a rectangle no matter what the body shape. You could try Phaser.Physics.Arcade.StaticBody.prototype.drawDebug = Phaser.Physics.Arcade.Body.prototype.drawDebug;
  9. samme

    how to decelerate sprite arcade physic

    setDrag will work, with or without damping, as long as acceleration is 0. accelerate to (setDrag w/o damping) asteroids movement (setDrag w/ damping)
  10. samme

    Create a moving platform
  11. samme

    Tutorial requests

    You can use a PathFollower (it seems to work nearly the same way) but friction doesn't work, so the rider falls off.
  12. samme

    GameObject update never called?

    I think it's fine to override the preUpdate method if you like. A lot of the examples do this. Nb. It won't work for Game Objects without a preUpdate method (e.g., Image). You have to remember to call the parent class's preUpdate method. preUpdate comes a little earlier than update. For instance, with ArcadeSprite, preUpdate runs right before the physics step whereas update runs right after. For a lot of cases I'd guess it doesn't make a big difference, though.
  13. samme

    How to skip a couple of game ticks?

    I would just add a small delay.