• Content Count

  • Joined

  • Last visited

About RestingCoder

  • Rank
    Advanced Member

Recent Profile Visitors

880 profile views
  1. Don't get me wrong, I look forward to 1.2. I'm just disappointed with a release being completely useless. It should have stayed in the dev branch. I mean, at this point, any new user of Phaser will be using a broken framework without even knowing it. I'm excited for 1.2, and will be glad to be rid of these physics bugs when it is released and working.
  2. I agree, this is disappointing. I've been working a dev version of 1.1.4 from before it was considered done due to the physics issues because I need the Tilemap features.
  3. Yeah. If I ever need to have a way of keeping data if a player clears their browser cache, I'd probably use mongodb or another database option and a unique key for each player so they can load data that is saved on the server.
  4. I tend to just use localStorage, myself.
  5. You may also want to change which post is marked as the answer for this thread.
  6. Thanks, Rich. jcs, I'll try that next time I am at the computer. Thanks.
  7. minVelocity was already set as a test, and I have tried adding various values for linearDamping. Interestingly enough, if I set the bounce at all (no matter the value), the player sprite will stop moving entirely if it touches any walls. I am also seeing an issue where the sprite is not dropping like it should. To reproduce this, use the up arrow in the example I linked previously, and land on any of the platforms that aren't what you would consider the floor. Now, move left or right, off the platform. You will basically be stuck in the air until you move along the y axis again. I really have no idea what is going on here, but all of this works perfectly with what was in the dev branch up until a day or two ago.
  8. I have been using the dev branch for a couple weeks, and everything was going well. Now, I have switched to the release version of 1.1.4, and made what I believe are all the changes needed to make things work. However, for something as simple as causing my player sprite to jump, it does not work. This code snippet is for my player class, extended from sprite: console.log(this.body.onFloor()); if (this.jumpButton.isDown && this.body.onFloor() && > this.jumpTimer) { console.log('beep'); this.body.velocity.y = -720; this.jumpTimer = + 250; }'beep' is triggered, but the sprite does not move. At all. I have also found that this code only works if I am already moving horizontally if (this.arrowKeys.up.isDown) { this.body.velocity.y = -400;}You can see an example of this here:
  9. I would personally do this using the createFromObjects Tilemap function that is in 1.1.4. You could simply add your objects in your map inside Tiled, export the JSON, and load it like you normally would. The way you would use this function is below: map.createFromObjects('Object Layer 1’, 5, ‘coin', 0, true, true, coins); Here you can see the doc comments and the signature of this function from within the Phaser source as well: /** * Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is * given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to * configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the * Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically. * * @method Phaser.Tileset#createFromObjects * @param {string} name - The name of the Object Group to create Sprites from. * @param {number} gid - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {string} key - The Game.cache key of the image that this Sprite will use. * @param {number|string} [frame] - If the Sprite image contains multiple frames you can specify which one to use here. * @param {boolean} [exists=true] - The default exists state of the Sprite. * @param {boolean} [autoCull=true] - The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range. * @param {Phaser.Group} [group] - Optional Group to add the Sprite to. If not specified it will be added to the World group. */ createFromObjects: function (name, gid, key, frame, exists, autoCull, group) This can be very useful, as it allows you to create a group of sprites, which you can interface with in the same ways you can with any other group inside Phaser. This means you can check the collision and perform a function on the specific object that was collided with. This works just like any other group:, coins, this.addMoney, null, this); … addMoney: function (p, i) { +=, 5); i.destroy(); }
  10. This could also be useful:
  11. I was extending Tilemap in a similar fashion as you'd do with Sprite, and the map wasn't actually accessible from the game, where I was trying to destroy it. I fixed it by moving some code around. Sorry for the waste of time. Thanks, as always, for what you do.
  12. To fix a bitmapText to the camera, you can create an empty sprite, fix it to the camera using containerSprite.fixedToCamera = true, then add the bitmapText as a child with containerSprite.addChild(bitmapText) I believe follow is currently being worked on.
  13. Hey Rich, I'm not seeing a way to delete this thread, so can you delete it? This was caused by a stupid mistake on my part that most people will never run into, and I don't want to cause any confusion. Thanks!
  14. They are definitely still there. After the 7th map load (on my laptop) the frame rate drops by around 5, and does so for each subsequent map load until it is in single digits, and memory usage just keeps going up. I've checked memory usage on every other object I am creating, and it only seems to happen with phaser.tile. I am probably just doing something wrong when destroying the map and creating the new one, but I just can't figure out what in the world is causing it after playing with it for a few days.