eddieone

Members
  • Content Count

    107
  • Joined

  • Last visited

About eddieone

  • Rank
    Advanced Member

Recent Profile Visitors

1787 profile views
  1. Yo guys, I put together some interesting code to get people started super fast at making multiplayer io games. All with open source, so posted it on the Y8 github. https://github.com/Y8Games/Y8-Instant-io-Game Check out Y8 Games also.
  2. We need to make the examples google-able 🤖
  3. sendToBack instead of SendToBack ✌️
  4. Yeah, here the trick. Update to Phaser 3.16.2+ probably in package.json or the index.html Update the Phaser config. config = { parent: 'phaser', type: Phaser.AUTO, autoCenter: 1, scaleMode: 3 }; game = new Phaser.Game(config); Restart server if you need to (remove any scaling plugins). and then magic scaling thanks to Rich.
  5. I think the scaleManager is not ready yet 😅
  6. Hi, What's the best way to handle different button states in Phaser 3? I have an image and want to show a different image on mouse hover.
  7. Here's the scenario, 1 to 5 animals attack the boss, then the boss attacks each animal. This is the code using async/wait await this.attackBoss(this.seat1); if (this.seats.length >= 2) { await this.attackBoss(this.seat2); } if (this.seats.length >= 3) { await this.attackBoss(this.seat3); } if (this.seats.length >= 4) { await this.attackBoss(this.seat4); } if (this.seats.length >= 5) { await this.attackBoss(this.seat5); } await this.bossAttack(this.seat1); if (this.seats.length >= 2) { await this.bossAttack(this.seat2); } if (this.seats.length >= 3) { await this.bossAttack(this.seat3); } if (this.seats.length >= 4) { await this.bossAttack(this.seat4); } if (this.seats.length >= 5) { await this.bossAttack(this.seat5); } The above code takes a few seconds for all the animations to complete. Using promises to end the await part once the animations finish. attackBoss(seat) { return new Promise(resolve => { this.tweens.add({ targets: seat, x: this.bossSeat.x, ease: 'Sine', duration: 500, yoyo: true, onYoyo: () => { this.bouncBoss(); }, onComplete: () => { resolve('resolved'); } }); }); } I might make a goldilocks es6 boilerplate for phaser 3. Mostly just adding async to generator babel plugin to already existing boilerplates. babel-plugin-transform-async-to-generator
  8. What does performance look like with screenshots off??
  9. If you use es6, you can use for of. Or for loop with es5 searchContainer(container, name) { for (var child of container.list) { if (child.name == name) { return child; } } }
  10. Ah, I'm too early. have to wait for phaser 3.16 probably 😛
  11. Hi, I'm looking around for how to handle full page scaling in phaser 3, anyone know of a tutorial or code example? I know with css, the canvas can go 100% However, I haven't found a way to scale in-game objects and have them centered. Thanks
  12. Thanks. 😯, looking forward to using the engine