It’s been two months since we last spoke. Come on in, let’s chat about what you’ve missed while you were away.
Development
As our code base has grown organically many of our solutions bled into each other, tightly coupling them. This was making it difficult to try out new solutions or even make minor changes quickly. The majority of my time these last two months was focused on decoupling many of our backend services.
The process of decoupling had us reconsidering much of our code base and applying SOLID principles to it. We favored constructor injection for dependency acquisition as it is injection framework agnostic. We selected SimpleInjector as our Inversion of Control container and now construct most of our objects through it. The end result has given us a streamlined codebase that is testable, swappable, navigable, and much more maintainable.
The triggering feature that started this refactor was resilient sessions. Previously a user’s session and session state was tied to their socket connection with the server. This turned out to be problematic as mobile connections aren’t very stable. So we needed a solution that would allow a user to reconnect to their existing session and continue where they left off. That is in place now--we just need to change the client to reconnect automatically. I hope to make the entire process seamless to the gamer.
While sessions may be what triggered the refactoring, this opens up the ability for us to try out different solutions. Such as client/server connections, serialization, or anything else for that matter. It also makes a much bigger architecture decision more approachable, actor services--which we’re currently considering for our game services.
Another perk of adopting IoC is that we’ve been able to quickly add telemetry to our server processes. This’ll let us identify and resolve inefficiencies quickly. In fact, within moments of adding our first tracking we did just that. Our stat changed events were notifying the client way too frequently and have now been throttled.
Here is an example dependency breakdown on our slowest request, Authentication. As you can see this helps us identify who is contributing to the slow down, providing us with information to dig in deeper. Over the next month we'll be exploring this more and seeing what other features we can make use of.
Abilities
While I was busy with the refactors, and Bud and I on Telemetry, Roy has been hard at work on abilities. He has wrote the server side code for the remaining swordsman abilities: Dashing Strike, Flurry, and Sword Storm. In addition he is finishing up the client side code for Dashing Strike… here's where he's at now:
Oh, and a teaser on flurry:
Additionally, he’s added support for weapon passives. We intend for each weapon school to have a handful of passives the player can pick from, one per hand, that’ll let them influence how they play the class. For now he’s added Brawler, for swordsman, which gives the swordsman additional energy regeneration and a percent chance to parry incoming attacks. However, I believe the percent chance is somewhere around 100%--unintentionally of course. He’ll need to take a look at that; meanwhile swordsmen are doing quite well for themselves. :)
He has also added a new mechanic: Immolation. Immolation will be a fire school effect. When active it’ll cause the immolated to deal constant damage to nearby enemies. This is often a byproduct of casting a fire spell.
Speaking of Fire, we’ve designed the fire, fire/fire, and fire/sword abilities. I’m looking forward to working on the particle effects on those. They should be a lot of fun!
'til next time Daemons,
Trey