[Phaser 3] Drag Select Plugin

I have an idea towards a larger project, but before I get that far, plan to modularise the work as much as possible to make it easier to iterate (and not lose enthusiasm). So, I hope to build out a suite of plugins, plugins that others might find useful in their projects - as such, I’d like to share them as I go: this is the first, and hopefully there’ll be others! The intention is that each function independently of each other, and Game use them as “plug and play” dependencies.

This plugin lets the user “drag select” GameObjects within a scene - similar to strategy games that let you select a bunch of Sprites on the screen - based on 100% configurable parameters. You can customised the appearance of the selection rectangle, as well as the business logic that defines what are “valid” GameObject instances the plugin can attempt to select (by default, it just selects any Objects with input.enabled)

It works as a standard NPM package, which you can find here: https://www.npmjs.com/package/@pixelburp/phaser3-drag-select

Any questions or issues trying to get this working, let me know. Plus, I’d appreciate any feedback or features you guys might find useful, or be useful generally.

3 Likes

I will test it for a project, great job !!