![Back From my Break, Time to Work till I Ache!](https://egoproblemsgames.co.uk/wp-content/uploads/2021/06/thumb_202106125.png)
What is up peoples! It has been two weeks and you know what that means; blog time! Despite one of those weeks being spent afk (“Away From Keyboard” for the non-gamers), we still have managed to drudge up some things to talk about. Take it away, me!
So, you might have thought that Horde is unlikely to leap forwards given how little time I’ve had to work on it in the last two weeks… And you would be right. But that’s not to say nothing has changed. Quite the contrary, in fact. The clinically insane of you might be able to remember, back in the annals of this blog, me stating that I set up the AI using a switch case (a big list of “if this, do that.”) as they were so simple, they didn’t need anything more complicated. Well this week I decided to eat my words as I wrote a Finite State Machine (FSM).
Background for non-techies: A FSM is basically a system of adding different behaviours (states; for example, walking, or shooting) to an agent (thing; for example, human, or toaster) in such a way that they can be kept separate, and are not reliant on checking conditions every frame. It also makes for a much easier way of changing or integrating new behaviour. This one is a little tricky to explain in words, so here is a similarly confusing diagram:
![](https://egoproblemsgames.co.uk/wp-content/uploads/2021/06/FSMvsSwitch.png)
Clear as mud? Good. It’s also worth noting that the states in a switch are likely functions in the same file, making the file big and bloated, while states in a FSM are usually in their own file so easier to locate and modify. It’s also much easier to add behaviour to a FSM for when we first enter a state, or when we leave a state. For now, all you really need to know though is that it’s cleaner, and more efficient!
This means another week of making things behave basically the same externally (hopefully with some improvements), but making everything more pleasant under the hood. I wrote the system, and have added three of the six required states so far, should be adding the rest later today. My intention is that I will be able to plug and play behaviours to make adding new content, or tweaking balance, significantly easier.
Next up, the office upgrade! I spent way too much of the Friday of the last blog making the new desk. Turns out it takes a lot of time to make things neat and tidy! The desk itself took little time to make, it was a simple process, but then I went further, installing monitor stands and cable managing everything so it looks clean. Here is the finished result:
Pretty swanky right? I’ve been taking full advantage of the sit/stand functionality; I’ve particularly found that if I’m getting tired and slouching in my chair, standing actually really helps bring me back into the action. Plus it looks gorgeous! I’m very happy with it.
And finally, as promised, the holiday. We had a really lovely time in New Quay, Wales. Yes, there is a New Quay in Wales, and yes, I will always specify from now on! We managed to explore some local towns, did much relaxing, and some walking to boot! We even indulged in a bit of geo-caching, which is always a fun, if sometimes frustrating, experience. For the unindoctrinated, I suggest looking up geo-caching, it’s basically finding video game collectables in real life! And now, to round this blog off, I’ll leave you with a picture of a gloriously photogenic seagull…
![](https://egoproblemsgames.co.uk/wp-content/uploads/2021/06/IMG_20210615_211945-2048x1536.jpg)
Matt out.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.