informa
2 MIN READ
Blogs

Weather, new Pop-up Design, and Network Traffic

This week I share the challenges with creating a new pop-up manager class and my efforts to reduce network traffic between client and server.

Since my last post, Krees and I finally completed the weather graphics.  In Conquest!, each continent has weather effects which change hourly and affect food production, the risk of a ship being damaged while sailing, and how troops fight in combat.  In the old client, a text description of the weather was sent.  For the new client, we wanted to use images to represent the 11 different types of weather.  For example, here is what freezing looks like:

This show also shows the new pop-up design, which use color images vs. wood carvings and reduces the size of the scroll area.  We are currently in the process of retrofitting some of the existing ones to use the new design, which provides additional variety and color to the 100+ pop-ups currently in Conquest!.
As part of this new design I created a Popup Manager class in Unity to handle existing and future variations.  This was a rather large undertaking, as I had spread the code for the pop-ups across all the scenes and it took a couple of days to consolidate it all to one master class.  I'm not sure if this helps any with efficiency but it reduced the overall size of the code and makes future changes much more manageable.
This project is my first real foray into true Object Oriented Programming and I'm getting a big dose of on the job training.  The code base has gotten better over time and I'm sure I'll continue to make further enhancements prior to launch.
On the server side I made some pretty drastic changes to the communication protocol used by Conquest!.  Using Message Analyzer, a free tool from Microsoft which allows you to capture all network traffic, I began looking at how much data is being sent back and forth between the client and server.  Conquest! uses an XML based protocol and so has tags such as "Message", "Body", etc.  While XML is a great protocol for humans to read and process its wordiness was unnecessary.  But rather than switch to a different protocol, such as JSON, I simply shorted all of the tags to 2 characters each and changed "YES/NO" responses to "T/F".  These two changes reduced the overall message size by approximately 20%.  I also continued my crusade to remove unnecessary messages and reduce existing ones.  Unfortunately, these changes complete break the Windows reference client but I stopped making changes to that a while ago.
In the Core Labs program we heard a lecture discussing timelines and have our first deliverable due: a production timeline for each of our games.  Fortunately I have worked on many IT projects so I have some experience to draw on.
Follow the journey on Facebook or Twitter.  Until next time, I hope to see you in the game.

Latest Jobs

Xbox Game Studios

Redmond, Washington
10.5.22
Technical Lighting Artist

Innogames

Hamburg, Germany
10.5.22
Game Designer - Elvenar

Six Foot

Houston, TX
10.3.22
Six Foot Director, Player Relations

Hometopia Inc.

Remote
10.7.22
Lead Engineer
More Jobs   

CONNECT WITH US

Explore the
Subscribe to
Follow us

Game Developer Job Board

Game Developer Newsletter

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more