Jump to content

Shootemup Bullet/Weapon types: Best Practices


magnadrake
 Share

Recommended Posts

Hello,

I'm new to Phaser 3 and I'm trying to make a vertical scrolling shooter as I learn. So far I've been able to make the player shoots bullets by translating this tutorial from Phaser 2 into Phaser 3:

https://phaser.io/tutorials/coding-tips-007

But I'm stumped when I try to implement the weapon changing system into Phaser 3. I'm not very experienced in javascript and how it handles classes/objects and I'm mainly a Unity developer. And as far as I know, Phaser 3 docs are still incomplete so I can't actually look through it to find equivalent or similar methods from Phaser 2.

For now, I'd like to create a weapon type that slows enemy movement speed. Pointers on how to approach this in Phaser 3 would be very helpful.

Thanks.

Link to comment
Share on other sites

Use an Arcade.Group for each projectile type. Look at the Pools examples. You probably won't have to create any classes.

You can add an overlap collider with a callback for each Group. You can slow enemies by reducing their maxVelocity.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...