Welcome to the first of what will be a three part series looking at the Clans feature in Warhammer Combat Cards. This feature has been a long time coming with many of you asking when or even if Clans would ever appear in the game. After all, we’ve had a ‘Coming Soon’ tab in the game for a long time now and that tab has recently disappeared so we totally understand why you might think Clans would never see the light of day. However I’m here to tell you that is absolutely not the case.

Coming Soon…

The initial work required for the Clans feature was actually started before the game went live around the world, though this was just initial server work to create some of the microservices we were hoping to use to build the Clans feature in the future. We knew early on that Clans would be a feature that would be finished after the game went live due to the small size of the team, and so this work was left unused for a long while.

Once the game launched worldwide we had a number of areas that we wanted to address while also being realistic about what could be achieved with the small team that we had. As such we put a focus on gameplay features and introduced a number of different improvements to the game such as the Missions system which allowed players to work towards free copies of new cards long before they were released to the general card pool, Ranked mode which gave players a sense of competition outside of the normal Casual mode the game launched with originally, and a complete rework of our ‘card battler’ system which has allowed us to release interesting new special rules and traits. It’s easy to forget the game only had 6 traits when it launched!

Talking about those features doesn’t even begin to touch the myriad other quality of life and stability improvements that have happened over this period. The more veteran players among you will surely remember with horror the old days of Campaign starting times. The game was finally starting to take the shape that we wanted it to, and so the time was right to begin exploring Clans and the shape it would take. This meant looking back over the old work and quickly realising it wasn’t quite up to the standard we wanted in order to build a system that we could expand on in the future.

It takes a surprising amount of work to get what may appear at first to be quite basic functions you’re used to seeing in games. To give you an idea here’s what Ash, the primary coder working on the Clans feature here at Well Played Games, had to say:

So right from the start, we knew we wanted to approach clans in a different way to other server code. Traditionally, whenever we do a new feature it gets written in a central service alongside everything else. But this isn’t great for maintainability or reusability. We decided pretty early on that we wanted to move things to a more Microservice architecture which a lot of us had never used before. This is where little services do the thing and only the thing they care about and helps keep code isolated and easier to work on. And then the central service just ties them all together. Eventually, the aim is to migrate the entire server codebase to use Microservices in this way. This will allow us to create, extend and fix features easier and quicker. But clans is a good starting point.

We knew the architecture we wanted, but then there was the sheer number of things we needed in order to properly support clans. It’s more than just a group of people. We needed permissions. We needed inboxes. We needed chat. We needed bans. We needed search. We needed recommendations. We had none of these. And for better or worse we decided to roll our own version for most of these things. A small team trying to implement a set of features which other companies with larger teams spend months implementing any single one of them. We were being kinda ambitious.

However, after some time of doing small bits and pieces into exploring this new architecture, it sorta became apparent that just doing this on its own wasn’t going to be enough. Our game currently is very client-orientated. The client tells the server it wants to do an action, the server tries to perform that action, it replies with a success or failure and the client knows from this response exactly what the next step should be. Whether it’s updating their profile, processing some event, showing an error, etc. But with clans we now had the problem that other people’s actions should cause the client to update too. We had no support for this in the current architecture either.

To solve this we needed to implement something which would essentially allow us to push data to the client from the server. A kinda naïve approach was to just make the client poll and ask the server every few seconds to refresh all the data but that just doesn’t cut it. It’s not very maintainable, extensible, or cheap and there can be quite a bit of lag between someone doing an action and getting the update, especially for fast-moving things like chat. We wanted everything to be responsive and as up to date as possible but not break the servers with all the extra load. We eventually went for an event system that allowed us to only send data to the client when it had something to send. This involved us researching and implementing a brand new solution called Kafka we had never used before.

We have also made a big effort to test all these new systems and features. Including creating some AI bots which emulate playing the game and perform clan actions as if they were a player. These bots, along with analytics and metrics, are also allowing us to load test clans to make sure all the behind-the-scenes variables are set up correctly to take the strain once clans go live. Hopefully, this all leads to a smooth and bug-free launch and player experience…

Personally, not being a server programmer, this was all pretty daunting to me! We have a pretty small team here and we wanted to continue work on other features and content while working on clans. This meant limited support, especially at the start. From the list of features above, the only feature we ended up not fully rolling ourselves was search. We used a solution called Elasticsearch for this which we had also never used before. So all in all I’m pretty proud of what we’ve managed to accomplish. We got there in the end.

As you can hopefully see, a lot of work has gone in to make Clans not only what it is currently, but what it can be in the future. Over the next two blog posts we’ll be diving in to what is coming to the Clans feature at launch, as well as what additional features we’re planning in the short and long term.

All of us at Well Played Games know how much players have been wanting this feature to arrive, and we can’t thank you enough for your patience. There’s not too long to go now, and we’ll be announcing the launch date of Clans in a future blog post in this series.