Sunday, September 24, 2023

Combat Rewrite

Well, it's been a very busy week on multiple fronts. I've had the week off from work, and that's meant that I've been able to get neck deep into the game, and also stuff around the house that's been on the to-do backlog for a while.

In things that I have done on the game though, I took what was working in the combat system, especially the parts around how the game runs the monsters and threw it all out the window. It was barely functioning, and was written before I really had a good idea of what needed to do, and how it needed to do it. 

I thought that re-write would take a day or two. It ended up taking basically five full "first thing in the morning, to late at night days" to get it right - right enough anyhow. So, the good news is that creatures now kind of decide if they want to try to do damage or heal, they look for opportunity targets, they look and deal with threat tables nicely, they understand who their enemies are and who their friends are in a fight - and who is at the top/bottom of that list. I've gotten them to path nicely to their targets, working around things in the way, using the map terrain properly and resolving a bunch of issues that I hadn't thought of when I started to write all that code.

I also had a great back and forth with one of my mates, Nath, around logic, algorithms and generally how stuff works. It's nice to talk through logic and what's doing what with someone else as it makes you think about things in detail, more so than getting it to "work well enough" so that things don't crash. I probably need to do more of that, especially as the development starts to shift from pure "getting it working" to "tweaking and improving" so that it's not just another app that never gets anywhere cause the gameplay is hot wet trash in the midday sun.

Back to work tomorrow, so that's always great after some time off, catching up with the team and working through the backlog of requests that's no doubt waiting for me - but if, just if, I manage to get through all that in humane time, I plan to tweak the rendering engine (and monster/character code to allow for creatures that render larger properly. They kind of work, but render incorrectly at the moment. I'll try to tie that in with tweaks in the combat and pathing code to allow for the same, so that big monsters are really indeed big and need more space etc to move about.

No comments:

Post a Comment

Character and Item Stats

It feels like I've renamed a thousand thousand properties in classes, updated a myriad of methods across the database, the editor and th...