casey

Members
  • Content Count

    94
  • Joined

  • Last visited

About casey

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. I don't think you'll find a physical book, only e-books because frameworks change so quickly that once it's printed it's out of date. E-books can be updated by the authors more easily. But if you want a hard copy, buy an e-book and print it. I second Feronato's site and books. You can find tutorials on different HTML5 frameworks available there.
  2. Thanks. I don't want to actually rotate the falling object, only have it slide, but I'll see what I can do with P2.
  3. If you can't read the variable from your HTML in another javascript (I'm sure you can but I haven't tried): You could write the score as a local file in localStorage using the set method (http://www.thebotanistgame.com/blog/2015/08/12/saving-loading-game-state-phaserjs.html) Then you could read it from your html using a short script to get the localstorage info by name. https://developer.mozilla.org/en-US/docs/Web/API/Storage/getItem
  4. I have a platform where the platform will start tipping (rotating) when the player jumps on it, tipping the player off. The platform rotates now, but the player's gravity doesn't come into effect when the platform rotates--the player stays standing in the air. I can disable the platform body, and the player will fall through, but I want the player's body to move along the platform (slide off). What am I missing? var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { game.load.image('ground', 'platform.png'); game.load.spritesheet('dude', 'dude.png', 32, 48); } var player; var ledge; function create() { game.physics.startSystem(Phaser.Physics.ARCADE); ledge = game.add.sprite(0, 400, 'ground'); player = game.add.sprite(20, 20, 'dude'); game.physics.arcade.enable([ledge, player]); ledge.body.immovable = true; ledge.body.allowGravity = false; player.body.gravity.y = 200; cursors = game.input.keyboard.createCursorKeys(); } function update() { this.physics.arcade.collide(player, ledge); player.body.velocity.x = 0; if (cursors.left.isDown) { player.body.velocity.x = -150; } else cursors.right.isDown) { player.body.velocity.x = 150; } //when player goes half way start sliding if(player.body.x > 200){ ledge.angle += 0.5; //ledge.body.enable = false; } }
  5. This is the Phaser 2 forum... try the Phaser 3 forum!
  6. Did it work with a regular function (i.e. not a callback?)
  7. Check out the particles plugin, as well. It can do this for you. https://phaser.io/shop/plugins/particlestorm
  8. I dont' know Vue.JS but it looks like you're missing a comma after your render function.
  9. I don't have an answer for you, osrry. I suppose one way to narrow the problem down would be to see if it works on other versions of Chrome for Linux, and see what was changed in the updates. Pain in the arse, I know, but then this stuff sometimes is. I would also try a LInux/Chrome forum.
  10. Did you do previous testing in Firefox? Is it possible that Firefox is loading from cache and there is an issue in your code? Does it work in Chrome without the bundler?
  11. Full tutorial here: https://www.joshmorony.com/adding-custom-fonts-to-your-phaser-game/
  12. How are you doing the reset exactly?
  13. I don't have time to go through all that, but for a few bucks you can get the complete source code to one here: http://www.emanueleferonato.com/2017/08/22/learn-to-create-html5-cross-platform-games-using-phaser-ladderz-game-completely-commented-source-code-available/
  14. https://codepen.io/jdnichollsc/pen/WbZgwM https://phaser.io/examples/v2/input/drag-event-parameters