Echronia: Devlog #3

Conor Kirkby

17/01/26

" title="Devlog2" allowfullscreen>
" title="Devlog2" allowfullscreen>
" title="Devlog2" allowfullscreen>
" title="Devlog2" allowfullscreen>
" title="Devlog2" allowfullscreen>
" title="Devlog2" allowfullscreen>
enemyconfigs

Click to Enlarge

TLDR

What Happened

Hey everyone it has been a little while. I wanted to wait until I had some concrete stuff to show before I did this Devlog. Most of the things I have been working on have been very much backend and do not barely have anything visually to show. This was definitly one of the more challenging aspects to work on so far as it required a lot of maths and intricate systems to work correctly.

To start off last time I had made a raycasting system for the grid functionality and this was definitly the wrong way to go about it. To change this, I created a system that stores all of the active grid pieces and their coordinates then using simple grid maths, the movement, targeting or any other calculations can be simply made. To help this process of communication between so many actors and components, I have created a few interfaces to handle this, a combat interface to handle all combat related function calls and communication. A encounter interface to pass all of the current active grid information to be stored and a health interface to handle all health and damage related code.

Following this I begun work on the Enemy AI, trying to make it as reusable as possible so that it can be used across all AI no matter the configurations or faction. The first step was to create a decision making system when it becomes the enemies turn. The enemy will first choose a target based on some information that they have available e.g. does the enemy prefer to target whoever attacked them, does the enemy prefer ranged or close combat etc... This can be expanded upon in the future but I wish to make it as dynamic as possible. The enemy will then choose an attack based on the target. Should they use a ranged attack or a close attack if they have it available. Then finally the enemy will calculate a pathway to the movement target then move there and then attack!

I really want to include faction combat within my game and so I have divised a faction system that keeps combat interesting and fun. Each enemy belongs to a faction and those enemies may have preferred factions to target. this is taken into account when the decision of who to target comes into play. A combat manager controls the turn order. Each faction has a 'speed' factor which I have given to them based on lore. So if there is multiple factions in play then they will move according to that speed variable, inside the faction turns, the leader will go first and it will move down the ranks. Leader, Lieutenant, Elite, Grunt and they will take their turn orders like this.

The hardest part of this development run was most definitly the pathfinding system. I was not aware of how this worked within grid style games and trying to figure this out took a lot of effort and learning new complicated code. I first started to use a BFS system but I was told an A* system is more performant so I tried to create that one. It took many days and many iterations but I finally got it to work correctly. Which felt amazing when I eventually nailed it down. There are definitly many improvements to be made, espeically with refactoring and tidying up but I am so proud I got this to work.

During this I also learned how to make an Unreal edtior tool which was a lot of fun. The one I made brings up a small UI window that allows the user to create very simple grids based on a width or height. Multiple levels can have many different combat areas and this should allow me to create those areas much faster!

Code *Not working correctly for this devlog*

Code blocks / snippets available on desktop.
Go Back