Posted April 02, 2024 by GamePasta
It's been a while since the last update for Legends of Rahnok, during which I've primarily been tinkering with a few minor enhancements. However, the time has come for a more substantial update so I entered Legends of Rahnok into the Improve My Game Jam. Something which I will do more of in the future!
I have been working on this model for some time and now I can finally say the Ratman is in-game! The Sewer Rat scavenger comes equipped with a rusty knife and can be found lurking beneath the cities of Rahnok. In a future update, you can look forward to some more of his brethren joining the ranks including the Sewer Rat Skirmisher and Sewer Rat Thug.
With the introduction of a new enemy, I refactored how enemies are defined within the game. Each enemy is now created through a custom resource to store data such as attributes, weapons and abilities. The final enemy is then built into a scene at runtime. This leads to easier customisation and the introduction of new enemies with no additional coding required.
Enemies now have an animation for taking damage as well as for dying. Other animations are now blended more seamlessly meaning a less choppy combat experience.
The decision system will make up the heart of NPC AI in Legends of Rahnok. Every time a significant event happens near an NPC the decision system will run. The NPCs stats and attributes will determine how they react to a situation. This system will drive what animations play as well as the behaviour of the NPC.
Many more possibilities will be added to this system in future but for this update, it is limited to combat with the Ratmen.
As a bonus feature when implementing the decision system, I introduced an element of stealth. Enemies will not react to you if approached from behind and will take additional damage when attacked. This creates a more strategic playing field when exploring dungeons.