A tutorial on how to select multiple units by dragging a selection box over them, like in an RTS game.
Tommy Leung from Ourcade writes: "Are you building an RTS game where you can select multiple units by dragging a selection box over them?
Have you seen an example for Arcade Physics Sprites but are using a different physics engine or no engine at all?
Did your initial attempt result in a box that only works when it is created by dragging from the top left to the bottom right but not in reverse?
In this article, we'll go over how to multi-select Arcade Physics Sprites and regular Sprites with a selection box.
And have it work no matter what direction it was created in! Something like this ..."
Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.
The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
- By Emanuele Feronato
- 155 Pages
- 28 Source Code Examples
- Build a complete game from start to finish
- Cross Platform
- Scaling for devices