This week saw many major changes to the server. The server has a centralized parser, which handles figuring out the request from a user and calling the appropriate function to execute. The commands are stored in a sorted array and a function pointer is associated with each one. Prior to the change, the server would save the player who initiated the command, regardless of the outcome of the command. This is fine for small numbers of players but Conquest! needs to scale once we launch a mobile client. Now, the server will only save if the command has an impact on a player's stats. This is especially critical for commands such as "Person" and "Review", which are purely for informational purposes but called frequently.
The next change had to do with how commands are checked. Most commands in Conquest! require movement points to execute (this represent time) and some are class-based. Prior to the update, these items were checked in each function. I modified the command structure to include the cost and class restrictions and these are now checked in the parser. This reduced duplicated code (the server supports over 100 individual commands) and makes it easier for me to maintain these items going forward. There are some exceptions, for example some commands use a player's level to determine the exact cost, and these are still handled individually. Neither of these changes have an impact on the user experience but make the server better. The last major backend change deals with how player logs, private messages between players, and journals are stored. Before, I used the player's name and two different functions to handle logs/private messages and journal entries. Now I have one central function which handles all three and a standard naming convention using the players unique ID. There were several changes which do affect player experience, the first relates to Vassals. Conquest! supports the notion of Liege/Vassal, whereby a new player can choose to server under a Lord (or Lady). This allows players to choose their Faction, Continent, and Class at the start of the game. Prior to the change, you could have up to 16 Vassals; each new year Vassals would send a small amount of food (5%) to their Liege in exchange for a small amount of gold (2%). During battles, Lieges and Vassals would send small amount of troops to aid one another; this feature can be toggled on/off by the Liege. When I revisited the math, the numbers were ridiculously low: if your liege had 500,000 gold a vassal would receive 10,000 gold per day. Assuming 4 vassals, each with 3000 food, a Liege received 600 food. Neither of these amounts are significant at all. So I capped the number of vassals to 4 and for each Vassal a Liege receives a 5% bonus to their food production each Housekeeping (HK, currently 6x per day). For each level their Liege is above 3, Vassals receive a 5% bonus to income each HK. This equates to nice bonuses for each and does not take away assets from either player. Aid during battles remains the same. On the Unity client front, Steffon rearchitected how incoming commands from the server are processed. This is key because the the client has to respond to not only commands initiated by a player but also things like world event messages or chat send by the server. This new architecture is a good foundation for the client. Finally, on the crowd funding front we have picked a target date of September 7th to launch the campaign. This is contingent on having the artwork and a playable Unity client ready but should be achievable. Until next time, I hope to see you in the game!
0 Comments
This week saw many small improvements to the Conquest! game engine. A portion of these have no impact to how the game functions, such as standardizing constants used in the code, removing global variables, or collapsing like functions into one. The engine itself is written in C and over time had gotten "messy". The past several months have been spent not only adding new features but doing quite a bit of house cleaning.
Some of the new things this week include 8 magical items for players to quest for: Book of Prayer, Robe of Vermin, Potion of Invisibility, Bracers of Defense, Lens of Detection, Rogue's Dice, Horn of Fog, Stone of Weight. This brings the total amount available to an even 50. Magical items are loot in Conquest!; most (38) are beneficial in nature, the rest are cursed. Items can be sold for gold and are an important way for new players to build wealth or assets early on. The exact descriptions of all the items can be found here. Several artifacts also saw a boost in power. I also corrected the way troop bonuses are calculated and sent to the client. With the exception of one bonus given by the Alchemist hero, the bonuses you see when looking at your army are what you will use during combat (before these bonuses were not displayed properly until combat). Summoned armies, such as barbarian hordes, are now balanced instead of strictly being based on the player's army composition. This was done to prevent certain classes from being able to fight the horde risk free due to certain combinations of troops. The total in the summoned army is still based on the player's army. I removed support for two commands this week: "spy conquest" and "spy conquest list". The former used to show 10 random players on any continent; the latter, showed a list of the total number of players on a continent by level. "Spy Conquest" has been supplanted by the "population" command (which shows 10 players on your continent only) and "conquest list" wasn't very useful (and the client didn't support it). These were some of the earliest commands created in Conquest! but over time not needed. The total number of commands the server understands is now 129 and I may remove a few more to tidy things up. Finally, effects of weather are governed by how much of a continent you control: the higher the percentage, the more likely a weather event will affect your kingdom. On the client side, there was lots of good work done by Steffon and Krees this week. Steffon is working on a prototype of a mobile client in Unity, with art and design from Krees. Steffon has the login page working with the new design and it looks great! Once Krees finishes designing the new Kingdom, Travel, Combat, and Subterfuge screens we will have everything in place to launch a crowd funding campaign to complete development. Until next week, I hope to see you in the game! After approximately 3 weeks, a winner in the Conquest! Mobile UI Design contest was chosen: congratulations to Krees for his winning design. The design fits with the theme of the game and brings a much needed graphical interface to the game. Check out a sample: In other exciting news, a former player and C# developer ("Archelf") has started working on a Unity based platform for the client. He already has the client connecting to the game server and is able to send/receive data. The next steps are to incorporate the designs from Krees with the Unity client to build a working prototype for the crowd funding campaign to bring it all together. I've been working on a modest budget which should get us to the finish line. Very exciting!!!
On the server side, I added rotation for player logs. Before, they would just grow and grow, but I've now capped them to 128 entries. I also modified tithing for Clerics and Rangers to 20% and 15%, versus a hard cap. I added the "Summoned" and "Bandit" types to the configuration file vs. having them hard-hard coded. Quest characters will also increase their surrender percentage by 5% for every defeat. One of the more interesting changes this week was to "rock/paper/scissors" or troop counters. In summary, Infantry < Cavalry < Flight. Ranged attacks do more dammge to infantry and flying units, but less to cavalry. This has the effect of making army compositions and formations much more important and should lead to some fun outcomes. Until next time, I hope to see you in the game! The UI design contest ended yesterday. I had selected 2 designers from a field of 10 and now it is time to select a winner. You can vote and check them out here. Thank you to all the designers who participated; I expect to make a final decision within the next couple of days.
On the Conquest! front the age ended (Congratulations Perrin!) and I made modifications to the amount of land required to win (from 20 to 30%) and lowered the total amount of land available in game. Attack limits are (finally) continent specific which, when combined with the increase in movement points a while back, should give players more to do. I believe the only things now shared between a player's kingdoms are movement points and magical items. I also made some significant changes to the core data structures used in the game, namely a player's kingdoms and class. This does not affect gameplay in any way but it makes it easier for easier code maintenance. Most of these changes affected "ancient" code (circa 2000) which was bolted onto over many years of development. Eventually, this spider web becomes hard to wade through and is a constant reminder of, you need to fix that! Certain magical items also saw a boost in the number of charges they have (i.e. Thieves Tools, Golden Cow, Mask of the Undead, etc.). The charges are random but I thought it would things more interesting vs having all items either one use or unlimited. On the Windows client side, I changed the colors again. This client is just to allow people to play the game while a mobile client is under development. You can download it here. I also launched a new Facebook and Forum pages this week. One of the suggestions I received was to host these items myself to improve the Conquest! brand by making them consistent. Until next week, hope to see you in the game! |
AuthorJames has been working on Conquest! since 1993. Archives
June 2024
Categories |