When we talk about middleware normally, it’s usually a case of saving you precious coding time.
For networking, though, the code is only part of the problem – there’s a massive amount of back-end work that needs to be done even for the most straightforward of online games.
“If you’re planning for anything beyond the basics, you’re going to need both in-game code plus back-end infrastructure,” says Todd Northcutt, director of GameSpy Technologies.
“That complicates the picture, both financially and operationally, for most developers and publishers – and it’s also an area where an established middleware service can provide assurance and cost savings.”
LIVE AND ONLINE
It’s an important point, because one of gaming’s latest trends is to have a social experience alongside the game, so that users can not only play against each other but also form teams or clans and share photos, videos or other user-generated content.
To put such an infrastructure together on your own, however, means you’d require only need a large amount of servers but also a team of maintenance engineers keeping an eye over the service 24/7 – not an insignificant undertaking.
“As online expectations continue to increase, producers will have to internally develop increasingly complex server code and build new capabilities more akin to enterprise IT departments,” says Quazal’s Henry Ryan.
“Or, they can choose to work with a trusted partner that can supply proven code and closely support the development team, and who can also deliver the long-term hosting infrastructure and services for live operations of the online game.”
It’s these strange melds of middleware company and service provider like Quazal and GameSpy that is become the defining characteristic of this particular sector, and simultaneously proves how large (and inseparable) the problem is.
Putting aside the back-end for a moment, there still is the issue of code to deal with.
A big reason for middleware’s proliferation overall is because targeting multiple platforms becomes an easier (but still daunting) prospect, but again in the networking space it’s a slightly different matter. On the one hand, the PC is a totally open online platform and the PS3’s service is deliberately ‘minimal’, whereas Microsoft’s is more closed but provides much more of the matchmaking and connectivity functionality than its rivals. As such, it’s tempting to think that you’ve really only got to do all the hard work for one platform – but the truth, says Ryan, is that neither platform is as open or closed as it may seem.
“Even if Xbox Live looks more like a closed solution, they provide a means for the developers to extend Xbox Live using third party servers if they want to go beyond the functionalities provided,” he explains. “Features like clans and tournaments are being asked for more and more by players, and to achieve this there is a fair amount of work involved in setting up that third party hosting service to comply with Microsoft’s requirements.
Life isn’t any easier on the PlayStation 3 side, though. “On the PS3, even if the system looks more open, there are still a number of Sony services that developers need to integrate with, such as authentication, friends and marketplace, which have to be somehow integrated with their own services.”
It’s easy to think that the main battle to fight is that of lag and the general unreliability of working in a non-deterministic world, but actually there are many more issues that need just as much attention and up-front planning. Have you tested with enough routers to confidently say you’ve solved the huge problem of NAT negotiation? Have you load tested your servers, even if they’re performing little more than lobby services and matchmaking? Have you implemented a reliable backup plan so that gamers’ precious stats are protected?
THE FINAL TEST
One final warning given by Quazal is that it’s crucial back-end code is comprehensively tested, as bugs have the potential to wreak far more havoc on servers than they could on the client. ”Imagine this scenario: a single, difficult to replicate bug in a game that happens once in a while may lead to ten crashes a day across all the gamers that bought your game,” says Ryan.
“However, if a similar bug on the back-end would make it crash ten times a day – effectively disconnecting all players – the affected number of players would be considerably higher than a client-side problem. The server is a living creature that evolves over time. The databases get bigger and the usage pattern changes, which always brings new challenges. A good design based on past experience is the key to building an evolving system.”
Both Ryan and Northcutt agree that developers often underestimate the scope of the networking problem, although the situation is getting better. For this generation in particular, it’s now strange for games to not have an online component, and in many of the more popular online titles it’s clear that development of the multiplayer side has taken equal priority to that of the single-player.
“Developers often prioritise core gameplay and game design above figuring out anything related to multiplayer functionality,” warns Northcutt. “Of course, this is a trap – as several watershed titles have proven recently, multiplayer functionality is a core component of game design and requires a lot of thought from the designers, the network coders, everyone. The online component of a game needs at least as much consideration as the single-player campaign.”