When Conquest! was solely a text based game, it made sense to send players all the proper names for all the objects in the game (e.g., troop names, ship configurations, magical items, etc.). For example, when sending kingdom details, the server would send something like this:
{ "Id": "4174", "Body": [ "168 Move", "34 Grove", "4357845 Gold", "180" ] } The "Move", "Gold", and "Grove" text descriptions are fine for a text client but they were being discarded by the GUI! This meant lots of unnecessary data being sent to the client. I decided to finally address this situation, similar to the effort last year for troops and reports (you can read the blurb here). Some of the information, for example the names of magical items, still needs to be visible in the client. If it isn't sent every update, how should the client get this information? I thought of three options:
I ended up going with option three and adding three additional JSON files to the client: magical components, magical items, and ships. These files are retrieved when they don't exist or when the server instructs the client to update them. In this way I get the best outcome: data is sent once and only updated when required. This conversion ended up breaking all previous clients, since I didn't build in a way for the server to send the data the old clients needed. The game was still playable, but items and ships couldn't be viewed or utilized (not a great experience). Live and learn I suppose. Until next time!
0 Comments
Leave a Reply. |
AuthorJames has been working on Conquest! since 1993. Archives
April 2025
Categories |