June 2021
Beginner
344 pages
8h 9m
English
Combat plays a large part in most games—so it’s worth the effort to develop a flexible system. You now have all of the elements required to implement combat. Monsters and the player have health, you know where they are, and you display the results. Let’s implement “bump to attack” melee combat.
You need to start by removing the existing collision system. It served its purpose, but you need something more advanced to handle combat. Remove the file systems/collision.rs and all references to it and remove calls to the collision system in systems/mod.rs.
The WantsToMove component indicates that an entity intends to move into a tile. You can indicate that an entity wishes ...
Read now
Unlock full access