Times, trials, and turbulence.
Bridging the gap between client and server.
The “Fun Stuff” Begins!
It seems like the quantity of updates to the dev-journal are fairly proportional to how exciting the development I’m currently doing is. And, I suppose, it should be. But it does make for large lapses of quiet when I’m working on less “visually notable” aspects of Skirmish. 😉
Nearly all of my work lately has been focused on getting the communications between the game and Master Server operational. This meant lots of low-level socket and TCP/IP code using the (moderately convoluted) Java NIO API, and getting the connections working the way I like both client-side and server-side. In short: a lot of nitty-gritty code that needs to be written for correctness and speed efficiency, and doesn’t lend itself well to screenshots. 🙂
After spending a good chunk of the day finishing this work up, it felt very nice to realize that I had some more interesting features and goals to work on, now that the under-the-hood labour is (hopefully) out of the way. Small but more enjoyable things, like cleaning up the mini-map and making some improvements to the game timing logic.
With the underlying network code written, it was time to finally bridge the gap between the client and master server. I’ve had the MySQL back-end code and account handling logic sitting around on the master server for a while now, so it was nice to get the chance to see if it all actually worked properly.
The first order of business was to create a window for players to log-in with. Just a small minimalistic dialog to facilitate account creation and logging in, to lead into the main “lobby nexus” window soon-to-come, where the player will be able to manage their account, join and host games, and modify local configurations.
(Logging into Project Skirmish!)
While creating the dialog, I gained some more appreciation for the work I had to put into the GUI system while I was developing Battleforge. It was a challenge to put it together at the time, but it’s certainly paid itself off in spades at this point. It was a snap to toss together this dialog, with automatic component centring/arrangement and the like. I had to rearrange some logic with the actual dialog system to function properly with stacked dialogs (which Battleforge never needed), but all is well now. Secondary dialogs pop up when the user logs in (or fails to) or creates an account, properly phasing out control from the underlying log-in dialog.
Like I said, the Master Server is totally functional in terms of allowing clients to connect and create accounts, but a lack of a full-time server to host it with dissuaded me from bothering to put anything online for public to play with just yet. Not that reserving your account name in advance is really a big deal for anyone but the most hardcore of readers. 😉
As always, thanks for reading. I’m looking very forward to writing about the account system in more detail, and showing the development of the main lobby windows.