• Content Count

  • Joined

  • Last visited

  1. jake.caron

    fps drop to 14 when drawing in update function

    Constantly resizing the window every frame is computationally expensive no matter the framework. As a solution, instead of doing this every frame, only do this when the window is resized. Here is a bit of code that may help: window.addEventListener('resize', <RESIZE_METHOD>);
  2. jake.caron

    Phaser bone/skeletal animations?

    Hi all, I am trying to create a game with bone-based animations using ES6 and either Phaser 2 or Phaser 3. Unfortunately I haven't found anything that suits my needs. I attempted to incorporate SBCGame's spriter library with phaser, but I hit a critical error when implementing it with ES6. Any guides, tutorials or suggestions would be greatly appreciated. Thank you, Jake
  3. Hi all, Just wondering if there is a library that is compatible with Phaser that allows you to animate a character and when transitioning between states, it interpolates all of the bones to the new state instead of snapping to the first frame. Thanks! Jake
  4. jake.caron

    Vertical scrolling

    Hi Keisha, I would probably use a geometry mask applied to a game object. I would then add a "draggable" listener to the gameobject and move it along the supplied Y value. Hope this helps. Let me know if you need a deeper explanation.
  5. jake.caron

    Best Skeletal Animation Library

    While investigating this deeper, there doesn't seem to be any support for skeletal/bone animations in Phaser 3. I suppose I'll be heading back to Phaser 2 land for a while.
  6. jake.caron

    Best Skeletal Animation Library

    Hi all, I am looking for a library that integrates with Phaser 3, so I can load an animation from Spriter, Spine or DragonBones. I did find this. However, it says to NOT use it in production. I would also prefer not to use that method as it does not incorporate much (if any) of Phaser's sprite functionality. I would be very appreciative if someone could point me in the direction of an existing Phaser 3 - Animation library. Thanks! Jake
  7. jake.caron

    this.sys.context is null?

    Ah, figured it out. You need to set the "type" in the config to Phaser.Canvas, not just the renderer.
  8. jake.caron

    this.sys.context is null?

    Hello, I am trying to follow this code snippet here: http://labs.phaser.io/edit.html?src=src\animation\spine test 1.js. When trying this on my own project, this.sys.conext is null right off the bat. Anyone know why this might be? The config can be seen below: let config = { type: Phaser.AUTO, width: 1024, height: 768, parent: 'gameWrapper', renderer: Phaser.CANVAS, physics: { default: 'arcade', arcade: { gravity: { y: 200 } } }, antialias: true, transparent: false, autoResize: true, scaleMode: phaser.ScaleModes.DEFAULT };
  9. jake.caron

    BitmapText Word Wrap

    Hi All, I am trying to add word-wrap to my bitmap text and have tried the following, but to no avail: this.questionText = this.scene.make.bitmapText({font: 'Nasalization', size: 30, align: 1, wordWrap:{ width: 450, useAdvancedWrap: true }}); This is dynamic text, so I am unable to tailor it with breaks. Thanks, Jake
  10. jake.caron

    Killing a Tween

    <tween>.stop() does stop the tween which is nice, although I do wish that killTweensOf and killAll would work as well. Thanks!
  11. jake.caron

    Scaling the game to fit inner window

    Great plugin Samme and thank you for the code James. I ended up going with James' approach and it works very well!
  12. jake.caron

    animations object

    Hi! Instead of this: op1.on('animationcomplete', ethis.openComplete, this); use this: op1.on('animationcomplete', ()=>{ethis.openComplete();}); That will ensure that you are still within your classes' scope.
  13. jake.caron

    Scaling the game to fit inner window

    Hi All, Just trying to scale the game so it works across multiple resolutions. I know that I can check the inner window's dimensions and adjust the height and width accordingly, but I would like to scale everything instead. In Phaser 2 I was able to use the following: this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.game.scale.pageAlignHorizontally = true; this.game.scale.pageAlignVertically = true; this.game.scale.updateLayout(true); this.game.scale.refresh(); Is there an equivalent in Phaser 3? Thank! Jake
  14. jake.caron

    Killing a Tween

    Hi All, I'm simply trying to kill/destroy a tween so it stops as soon as I call the method. I have tried the following code: this.tweens.add({targets: this.titleGraphic, scaleX: 1, scaleY: 1, duration: 1000, ease: Phaser.Math.Easing.Back.Out}); this.tweens.killTweensOf(this.titleGraphic); However, that does not seem to work. this.tweens.killAll(); also does not work. "this" is a reference to the current scene. Thanks, Jake.
  15. jake.caron

    What is this called?

    Hi Tonetheman, if your sprites are all organized in a grid-like fashion, it sounds like you have a spritesheet and Phaser does support that. Take a look at the spritesheet class here. Implementation looks something like this: this.load.spritesheet('diamonds', 'assets/sprites/diamonds32x24x5.png', { frameWidth: 32, frameHeight: 24 }); this = your current scene.