Sponsored By

Vassals and Vaults

This week saw work in Unity on two new screens, Vassal maintenance and the vault. Additionally there were several server side changes as well.

James Bennett, Blogger

October 5, 2015

4 Min Read

This week saw the addition of two screens under Kingdom maintenance: Vassals and the Vault.  Each of these posed some unique challenges in Unity.  Once a player reaches level 4, other players may select them as a liege when creating a new player.  One liege may have at most 4 vassals.  Vassals provide a bonus to food production for their lord and in return receive an income bonus.  Additionally, small bands of Militia will aid either the lord or the vassal while defending.  A new feature added for the Unity client was the ability for a player to email an invite to their friends to become a vassal.

The server already contained a few email capabilities so this was expanded to support the new email for vassals.  RIght now, the email just directs players to a web site which will (eventually) provide instructions on how to download, install, and become a vassal.  Eventually it would be nice to have everything done in one click.  I'll have to save that for a future version.  Since a player can have 1-4 vassals, I created a Vassal class in Unity to store the results from the server.  Once received the client will determine which prefabs to show and hide the rest.  Unity makes all of these pretty easy so once the basic structure and code was in place the rest was simple.
Also new was the addition of using Canvas Groups in Unity to disable the background buttons.  Before I was setting the active property to true/false, depending on whether a pop-up was displayed.  This worked OK but is not a typical user experience.  By setting the interactable flag to false, Unity shades the buttons and prevents users from clicking on them.  Nice!
There are 3 different kinds of loot in Conquest!: magical items, artifacts, and heroes.  Magical items are common and can either be used or sold at the magic shop for gold.  Artifacts and heroes are much more rare and there is a fixed amount of them in the game.  A player may only have one artifact and one hero.  All of your loot, plus the badges you have earned, are available for maintenance in the Royal Vault screen.

This is a new screen, even though it uses the same background as Kingdom maintenance.  There are 50 magical items and badges so a grid layout was used; the max page is determined dynamically, based on the number of items you have.  Any artifact you own always appears in the first slot.  Eventually, there will be a unique icon for each artifact and item.

Any hero you have is displayed on the second tab, along with a description and an opinion the hero has of you.

And finally, the list of all badges and which you have earned; this screen is still a work in progress but eventually there will be a unique icon for each.

On the server side, a few changes were made to support these screens (such as the aforementioned email invites).  I removed the "release" command and collapsed all Vassal related commands under one umbrella command ("Vassal").  I can't decide if I should do that for all actions or not i.e. have just a few commands with many variations.  I also added the descriptions of items, artifacts, and heroes to the output from the server.  This is expensive in terms of data so I may move instead to having them stored on the client.  There are advantages/disadvantages to each approach.  Finally, I added support to see another player's badges and the type of troop to the army listing.  In most cases a player's troop type will be the same as their class, but there is a hero you can hire which changes that.  Additionally, this might be a feature I want to expand in the future.

The Kickstarter campaign is in its final week.  Please consider supporting us with a pledge of any amount: http://kck.st/1LTthng

Follow the journey on Facebook or Twitter.  Until next time, I hope to see you in the game.

Read more about:

2015Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like