Encounter and Aggro Systems
In this post I will examine the work that went into the first pass through the encounter and aggro systems for our RPG that is under development. Plus, we will also touch on the redesignof the playable classes and battle system mechanics.
Encounter and Aggro Systems
The encounter and aggro systems were designed with the idea of replacing the idea of "random monster encounters" with a new mechanic that was less annoying and allowing the player a bit more control over when they want to engage in combat. As a result the solution was to show the monsters on the map, but allow them to notice you if you were to get close enough to them, and that would lead to you fighting it.
In the above screenshot you can see four level 58 rats in front of the player named Tondor. The yellow highlighted tiles show the vision of the rat nearest Tondor. And the bar above that rat's head shows how close it is to engaging the player in battle. Once the bar fills all rats within the yellow highlighted region would be pulled into the same battle and would all fight the player. The fourth rat to the right would not be pulled in since it is not close enough to the rat that is engaging the battle.
This screenshot also showcases the new pixel font I drew to show text over entity's heads. In this case the player name and the levels of the monsters. The orange icons over the monster heads have been replaced with chevrons, but the concept still remains: they show if the monster will engage you in battle if you got close to it, or if they will ignore you. Basically allowing you to know the encounter type before you got close enough for it to matter.
The new chevron icons are shown above. Yellow meaning a monster that will only engage you in combat if you directly walk into it, otherwise it will ignore you. Orange meaning a monster that will notice you if you are close enough to it, perhaps even considering its vision and direction it is facing. And Red is for monsters that won't let you pass them without forcing you to fight them, perfect for monsters that we want to guard doorways or chests.
Let's return to the yellow highlighted tiles. Its important to note that these tiles will NOT show up in the game, they are just in the screenshot for debugging purposes. I also would like to briefly discuss how they work, even if they are an invisible feature. They represent the monster's vision radius. And as such it uses a ray casting algorithm to determine if the monster can see you, especially if there is a solid object between you and its vision. Ray casting basically draws lines straight out from the monster to a certain radius in all directions and as soon as it hits an obstacle it stops. If you scroll up and look at the screenshot you will notice how the yellow tiles do not collide with the torches which serve as solid objects.
In summary, the encounter and aggro system has been completed, including the ability to write text over entities, show different icons over entities, and determine when a player is close to an encounter or not. Great progress was made on these systems and they will be revisited in the near future when we get actual combat in the game.
A special thanks to all the Patreon donors and subscribers on Twitch. Your viewership and helping me fund this game is greatly appreciated and none of this would be possible without your support.
And as always feel free to leave me any comments or questions below!
Fixed! Thanks Jenny!
appreciated* Sorry, that just bugged me a bit haha.