Trivia War
Trivia War is a chat-based competitive multiplayer networked trivia game written using the Microsoft XNA framework. The game is based around the trivia games that are popular on many IRC servers. The idea here is to make an IRC Trivia type game that doesn't require the player to figure out how to navigate the many IRC servers and channels out there. IRC is great fun, but a lot of people find it intimidating. Anyway, the game doesn't use IRC, but the gameplay is similar.
This is the first game I've written using Microsoft XNA, and it was an interesting experience. XNA is basically an add-on to DirectX that streamlines a lot of the work of writing a game, and it allows you to develop games for Windows, XBox, and Zune. It's a new library, so Microsoft is releasing new versions fairly rapidly, but I found the development process to be remarkably stable...especially after spending the past few months working on a Google Android application. In Google's defense, of course, Android isn't a final product yet. XNA stands for XNA's Not Acronymed, by the way. Apparently they're attempting to appeal to anyone who still hasn't gotten their fill of ironic recursive acronyms, but I digress. This game is Windows-only, largely because of problems (both obvious and non-obvious) with text-chat on the XBox.
XNA is designed to take advantage of Xbox Live (and/or Windows Live), which opens up some interesting distribution options, but somewhat interestingly, if you use Windows/XBox Live to handle your game's networking, you aren't allowed to include text-based chat, because Windows Live encrypts all network communications, and international encrypted text-based chat is actually illegal under the US Patriot Act. Consequently, the XNA license agreement expressly forbids Windows Live or XBox Live text chat. Seriously. I'm not making that up. Some people might suggest that Microsoft should just include a mechanism for sending non-encrypted text messages across the network, but I guess they haven't gotten to that yet.
Thankfully, it's still possible to use XNA as a game framework, but do the networking code yourself, so that's what I've done here. Players can either join an existing trivia server or host their own, much like what is done in many First Person Shooter games. This obviously has the handy benefit of distributing the server workload away from my own systems. The networking communication between client and server is accomplished through the .Net System.Net library, and the public servers list is maintained on the hotlidsallsizes.com web server. Trivia servers ping PHP scripts on the web server every so often to tell it that they're still alive. This method seems to work pretty well. Trivia War is written in C#.
One unfortunate thing that I've found regarding XNA is that it requires the player to install three separate runtime frameworks. .Net 2.0 SP1, DirectX 9, and XNA 2.0. Somewhat annoyingly, they actually have to be installed in that order, as well. Most people have .Net by now, so that's not too big a deal. Any gamer will have DirectX, and XNA is only a 2MB download, so on paper, it looks like not too big a deal, but if, for instance, you installed DirectX before you installed .Net, the managed code portions of DirectX won't be installed, so Managed DirectX games won't work, and neither will XNA. Supposedly Microsoft will eventually be bundling XNA into DirectX, but for the moment, three runtime requirements is a bit annoying.
Comments - Add a Comment
no comments










