Strategic Primer: Computer version progress

On Wednesdays I write about my strategy game, Strategic Primer.

Since my last progress update there has been little visible progress. The new client still isn’t usable yet. But I have made several improvements.

First, I changed the protocol to support different types of clients and handle them using different API servers. This should make supporting new kinds of clients significantly easier and will simplify the architecture of the server tremendously.

Second, I created a wrapper around a client’s connection to significantly simplify using the protocol in the program. Instead of having to explicitly put every message on the wire, wait for a reply, and ensure that the reply actually fits the protocol, the program can simply call a method that calls the server.

Third, I created a class to serve as a cache for the client’s view of the map, so the client doesn’t have to fetch every visible tile over again every time the player changes the view, let alone every time the screen refreshes.

One of the primary challenges right now is how to let the server interact with the client on its own initiative. One primary use of this functionality would be to tell the client when its cached version of the map is out of date, but it could also be used to update the user interface to reflect whose turn it is when that changes, for instance.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.