Archive

Archive for the ‘game-dev’ Category

In defence of current-gen game design

September 5th, 2009

I feel frustrated at the moment by the endless cyclical debate on the internet (in this case, a comment on Kotaku) claiming games are creatively plateauxing due to their middle age.  People seem incredibly pent up on the games-as-art debate to the extent that they seem to deride anything that the "it’s just a game" argument could possibly be justified by. 

I want to open this up with a really simple sentiment: I love progressive, narrative driven games, but I sure as hell enjoy playing games that are just a game.  Sometimes I just want to be entertained.

The precise comment on Kotaku (by HarlequinRiot) "The industry needs to rethink what a game can be and use all this amazing technology to make new experiences that may not be so stratified as "this is you, go here, do x, listen to y". Gaming needs it’s Moby Dick or its Brothers Karamazov, as its Citizen Kane’s come every few years." actually struck me as opposing the notion of a "game as a game".  Games have rules and boundaries, a game without a good rule set is just "fucking about", and that’s why these kinds of games are either experimental or don’t exist - they most certainly don’t make money. 

I don’t always need a new experience.  I actually believe that amidst all these calls for innovation and change, that gaming is in the midst of a renaissance of innovation.  The industry is old enough now to learn from the successes of the past, while incrementing in small steps every year.  It’s really a shame to suggest that just because the core gameplay mechanic of two games are the same that they haven’t innovated in subtle ways that will be gathered into the collective unconsciousness of game development.  The simplest examples of this in action are the incremental games - look at any yearly sports title or Halo title or Unreal title, and you’ll notice little innovation year on year, but over 3 or 5 years there’s no way you can argue that you’re playing the same game.  I think people drastically undersell the innovation in game design that happens every day.

On Michael Abbots Brainy Gamer confab (part 2) posted yesterday (which I’d strongly recommend), one of the participants was strongly arguing the point of authorial intent and influence over a game property, implying that regardless of agenda, that a controlling authorial voice on a game imparts part of their world view on a product.  While I agree this is unavoidable in narrative works (especially in the likes of books and cinema), I honestly believe it’s a stretch to state that the guys that made Trials HD or Rocket Riot somehow accidently imprinted their world view on their products.  Even if the product is an inadvertent result of personal ideals, the strict confines of a game system oppose accidental messages in game design.

When the games that gain critical acclaim are generally none of the things that the critics seem to desire, it certainly shines a light on the critics themselves.  You can’t celebrate Super Smash Brothers Brawl or Trials HD, while complaining that a games like GTA4 or Gears of War is thematically simple, and then in the same breath complain that games aren’t progressive or sophisticated enough.  Doing so is pretty much the height of hypocrisy.  If you send these kinds of mixed messages to the people who write games without realising that there’s a natural path of development that must be travelled to get the medium to where you’d love it to be.  Games like GTA4 and Gears, even Bioshock, might not be "all you want them to be" but they are progressive thinking games that try to push both technology and storytelling forwards, even if their respective stories suck.

Likewise, it’s unfair to say that games aren’t sophisticated because they ape cinema, when actually, the most successful and celebrated "intelligent games" do so by emulating cinema and books.  Nobody seems to have a clear vision of what they think "sophistication" in games should really be.  Sophistication is often seen as production values by the mainstream gaming-media when really, the sophistication of the games rules and systems are a "purer" sign of an progressive game. 

I love narrative in games, but you can’t criticise a game for aping the conventions of cinema to achieve a strong narrative without stopping to realise that they only reason they ape that ape these conventions is because they’re effective, you can’t have your narrative without it.  This is especially noticeable when games attempt to forgo book / cinema narrative conventions in exchange for something more game oriented, when this happens you end up with Braid.  I loved Braid and I thought that it was fairly unique from a story perspective but flawed in the telling. The way it told its story played right into game mechanics, and as a result, the story came across as fragmented and confusing to the majority of players because the game mechanics used to present the story don’t naturally lend themselves to story telling.  When backed up by the authors refusal give anyone the answer, much of the message was lost. Regardless of authorial intention, if lots of your audience don’t understand the story or narrative you’re trying to convey, you’ve failed as a storyteller and end up being accused of pretention for doing something "different".

A more recent example of "emergent storytelling" would be the well reviewed "The Path".  I enjoyed playing the path, but honestly, it utterly fails as a game.  It’s a terrible game.  Interesting and thought provoking as an experience, but an horrible game.  The controls are awful (practically digital, PS1 era 3d game controls), the interface is counter intuitive and the tasks are deliberately obtuse.  I still enjoyed it and rate it highly, but it failed at being a quality game while succeeding as being a quality experience. 

I think that really sums up a lot of the progressive discussion on videogames - people want something more from their entertainment, but it isn’t games.  Maybe the engineer in me is being pedantic about naming, but I’d much rather "interactive entertainment" for software like "The Path" than "videogame".  Game is a loaded term, and along with it come certain expectations; a set of rules, some gameplay mechanics and a way to progress.  I believe games can be more, I believe games can tell stories, make you feel and make you think, but I don’t think those are required aspects of a good game, games can be "good" outside of those constraints, as an exercise of entertainment through gameplay mechanics.  You can’t criticise a game for being too much like a game, it’s like criticising a book for not being a film.  I really believe that a game can involve art, but if the game "becomes" art?  Well, then you’ve got art that’s art first, game second.  That’s valid expression, but it’s intention is to be art.

On the same podcast there was more talk of the recent debate around Shadow Complex, and the reaction of people towards Orson Scott Cards involvement in regard to his personal politics.  Just a quick note really; the mainstream doesn’t care about your protests.  I really mean that.  You’re telling me that you REALLY think people will boycott Activision because of their (sexist) Sin To Win advertising campaign?  Really?  It’s "just" marketing.  That doesn’t mean I don’t think it was excluding, but what it does mean is that I see sex and inequality used to sell products every single day of the week.  If you stopped buying everything that a person you disagreed with had worked on or had sex used in it’s sales material you would run out of things to buy and games to play pretty quickly.  And that’d be just you, because of the people that know about some perceived protest-able injustice so insignificant, not only will half of them not care, but most of the people that do care will do whatever is most convenient to them when a product comes along that they’re interested in.  This goes doubly for marketing, an industry that frequently abuses both it’s position and people to sell product.

While this may seem like a negative response to the confab podcast, it really isn’t.  I enjoyed listening to it, as I have in the past, and have plenty of respect for all of the people involved, some really interesting thought provoking stuff on the direction of gaming comes out of it and I’m really looking forward to the following 3 episodes.  The Brainy Gamer is still one of my favourite gaming resources on the web and certainly occupies the most prominent position in an interesting discussion.

There are plenty of quality, innovation filled games on the market, many of them produced recently.  As for most of the critics?  Part of the problem and not part of the solution.  It’s all well and good to criticise game design inadequacies, but until you’ve really considered the design of compelling, fun, game systems as part of your argument, I’ll write off your "innovation is dead!" arguments as hot air.

How far has A.I. in games really come?

June 1st, 2009

There was a piece on Kotaku this weekend looking at the development at AI in games, It specifically set out to ask leading figures what they thought of the development of virtual “beings” in games,

“Kotaku set out to ask experts in the fields of Hollywood movie magic, theme park creators, robotics experts and AI specialists to answer the question: Do the AI-controlled characters in games qualify as robots or some other form of artificial life. Are those creatures who are at the player’s mercy in Lionhead Studio’s Black & White games truly virtual beings?”

Inside the article was a rather worrying quote from self declared futurist Thomas Frey, executive director of the DaVinci Institute,

"In short, our games have indeed evolved into crude life forms," said Frey. "Innovations in the digital world are happening exponentially faster than in the material world, so the digital beings in games will soon become far more lifelike, and will eventually step out of the screens and exist as 3D avatars, interacting with us, much like other people."

I always get a little upset and slightly concerned when people from places like the DaVinci Institute (from their "about us" page: "Launched in 1997 as a non-profit futurist think tank, the Institute has emerged as a centre of visionary thought, attracting both a national and international following of idea junkies and business leaders alike.") start to talk about things like programming and AI.  I always feel like these kind of think tanks highlight a bit of a problem with the development of new technology.

All you learn is that "futurist thinkers" actually have no grasp on the practical implementation of the technology.  I’m all for creative thinking and speculation, but somehow implying that very simple game mechanics are going to develop rapidly and with little to no point into some Skynet like Ai is simply absurd. 

Thankfully the Kotaku article actually asked someone with half a clue (Chris Darken, conference chair for Artificial Intelligence and Interactive Digital Entertainment and an associate professor of computer science at the Naval Postgraduate School) who equated videogame AI to an expert system.

In all honesty it’s a stretch to even call them that.  The problem domain that your average game AI lives in is so rudimentary small that I’d rather use a phrase closer to "novice system".

Game AI is nowhere near close to simulating human behaviour, near all "humans" are scripted, and the most simulated behaviour comes from games like Spore or The Sims where the actual behaviour is so generalised (eat/sleep/mate/die) that any nuance of actual behaviour is lost and what results is little more than a general abstraction to suite the purpose of game mechanics; which is utterly perfect for the task at hand, because honestly, developing something more sophisticated would be a huge undertaking with no practical benefit to the game project.

I’m honestly perplexed as to why some gamers seem to think building “AI” is appropriate for a game.  The term AI is exceptionally misleading and would likely never be appropriate unless you were working on something that wasn’t as strictly defined as your average “regular” game environment.

Imagine playing a game where a key NPC suddenly decides that they just weren’t into the plot anymore and just stopped playing, a “real AI” of this nature just isn’t for purpose.  I’m not suggesting that what we perceive as “AI” in games doesn’t have room for improvement, far from it, I am however suggesting that games will never lead to developing a “true” AI, simply because it’s not an appropriate avenue to approach game design from.

People need to realise that good path finding is not the same thing as intelligence, and that they probably wouldn’t actually enjoy a game where the AI attempted to simulate sentience.  It’s work enough dealing with other players in a multiplayer game, let alone having to contend with a simulated intelligence in a single player oriented experience.

Why We Need Male Dominated Space Marine Action Games

April 7th, 2009

This is a round about response to both Leigh Alexander’s response to Heather Chaplin’s GDC rant session.  It’s worth noting that I wasn’t at GDC and that all my information is second hand, and as such, susceptible to Chinese whispers-style misinformation.  To quote Leigh’s post (as a good source of a direct quote)

‘She argued that medium’s age is not the correct source of blame for the often insultingly juvenile nature of games, the tiresome prevalence of space marines, bikini girls and typified young male power fantasies. Her point: Games aren’t adolescent. Game developers are a bunch of, in her words, "fucking adolescents."’

This is really not a response to Leigh’s post at all, but more to the original subject that it made me aware of. 

I always feel a bit defensive when people imply that the only video games that ever get produced are space marine staring male power-fantasies. 

Just as a case point, lets take a look at the top selling games of last year (via a quick Google search)

Wii Play
Mario Kart Wii
Wii Fit
Super Smash Bros Brawl
Grand Theft Auto IV
Call of Duty: World at War
Gears Of War 2
New Super Mario Bros
Madden NFL 09

It’s difficult to claim that all of those titles fit into that narrow criteria.

There’s often talk of cinema reaching a comparative maturity with the release of Citizen Kane, and The Beatles representing the maturity of pop music by a similar timeframe in their respective mediums development.

I really don’t think that the respective age of the medium is a safe measure to judge it’s maturity.  By the time of Citizen Kane and the Beatles arrived in their respective mediums the supporting technology had plateaued to a degree that allowed for artists to have unencumbered technical freedom in comparison to the respective "technical freedom" that game designers have now.

There are a lot of critics that underplay the difficulty of perfectly nailing both concept and execution of a game.  It’s difficult, stuff, even more difficult to make the game work well, be playable and be great.  If you manage artistic integrity and ingenuity on top of that you’ve managed something exceptional. 

It’s no surprise that some of the most celebrated titles in video gaming are often technically flawed "classics" that get lauded for being "near misses".  Taking risks on titles is difficult and expensive on top of the desire to be artistically vibrant.

I certainly don’t think Citizen Kane would have had the budget and resource to be "great" if the camera men were still learning how to use cameras and I really think that we’ve got a way to go before we can expect every game made to be a high concept piece. 

Even after the technology reaches this point (as it has in the film industry) there’ll still be more summer action films / games made than artistic victories.

It’s also worth nothing that in this constant strive for something else, it’s easy to loose the purity and fun of more "pure" game play experiences, including male power fantasies and computerised D&D implementations.  Some people find game mechanics fun, to some people that is the point and it always feels that some critics always call so loudly for something different that they miss some of the point of what we already have.

The artistic indie film vision of influential games is a laudable one, but without the Gear of War’s there just isn’t the ecosystem to support them.  Much like when I watch films, I don’t always want to watch Capote or Chinatown.  Sometimes I want to watch Die Hard, and sometimes I want to watch Star Wars.  And sometimes I’d quite like to watch Twelve Monkeys or Being John Malkovich, but without Star Wars, the framework to support those often loss-leading productions just wouldn’t exist.

I don’t pretend to play at “legitimate game criticism” however I certainly follow the area with more than a casual interest and I’m often very surprised at how the desire for strong artistic games in the “niche of a niche” press seems to forgo the need for any other kind of game. 

The last thing I’d want is for the games press to take a Pitchfork media style pretentious view of the world, reducing anything that isn’t trendy or progressive to dirt.  There’s tonnes of very good games writing out there that I very much enjoy reading and I really hope that people allow at least some games to still be “just games” alongside the more “worthwhile” and “deep” experiences available.

XNA Game Development: Coding For Multiplatform Multiplayer 2

March 12th, 2009

It occurs to me that I wasn’t thinking straight when I wrote the previous entry regarding my reluctance to use .Net 3.5 SP1 in ‘Encounters’ for hybrid networking.

In a clearer state of mind, it occurs to me that because only the Windows version of the game is going to use the WCF networking implementation, that only the Windows version of the game will require the 3.5 SP1 version of the framework as a result.

The Xbox 360 appears to use a version of the Compact Framework 3.5, however it’s worth noting that 3.5 is a binary compatible set of additional assemblies that run in the .Net 2.0 environment.

What this effectively means is that I can use functionality in 3.5 SP1 (specifically the ability to serailize objects that aren’t marked as DataContracts or Seralizable) for the Windows version of the networking stack without contaminating the code of the game and preventing it from running on a 360.

Even better, it means I don’t need to mark-up my data model with any kind of attributes to support network play on Windows and I shouldn’t need to use a dubious set of byte array wrappers for data that can be typesafe, effectively letting me maintain a “purer” game model.

I’ll move my development environment to 3.5 SP1 and test this theory later, but I suspect I can simplify the networking stack on windows without the need for any messy hacks because of SP1.

Sometimes sleeping on a problem really is the answer; I was about to do something pretty stupid.

XNA Game Development: Coding For Multiplatform Multiplayer

March 12th, 2009

I’ve jumped right in to the deep end with my game project (which is going under the working title of “Encounters” – I needed to call the solution something!) and one of the core design goals of the project is the multiplayer focus of the game.

I’m a huge fan of Id SoftwareJohn Carmack is probably my favourite “celebrity computer programmer”.  He’s incredible smart and consistent and has made some of both the most influential and my own favourite games.

Standing on the shoulders of giants - The “Quake” model

I’ve always thought the “Quake model” of single player and multiplayer game development to be a good one.  For those that don’t know, one of the simple design tenants of the Quake engine is that everything is a multiplayer game.  When you play the campaign in the original Quake what the game actually does is start a local game server which you then connect to.  Due to the proliferation of the Quake engine and other engines that have been inspired by it’s design this became quite a common way to build first person shooters with multiplayer support from the offset.  It reduced the implementation of multiplayer to simply having a second player connect to the active session.

Standing on the shoulders of giants, I’ve decided that this is the model I wish to follow for Encounters, especially seeing as the primary work-in-progress game design desires 4-player coop as the main campaign (with NPC assistants if you play with fewer humans).  Because of the way supporting multiplayer from the offset effectively means that all the games “thinking” is done in the server component (collision detection, cheat prevention, state management..) I decide that it’d be the best place to start the implementation.

Prototyping

So far so good, I spent an hour or two last night designing a simple state managing game server and retrofitting it to my previous prototype (an arena with a player-controlled unit moving around it) and moving all the logic and validation to the server side.

At this point the “game server” was a singleton class that the game accessed though a fake “proxy” class (left empty for eventual network implementation) and it worked pretty well.  The collision detection worked on the “server side” when the server was running in the same application domain and as a proof of concept everything was quite sound. I’m still left facing a few issues surrounding the frequency of syncing with the server and client side prediction, but they’re all relatively well solved problems in gaming (and there’s certainly some prior art to take inspiration from in XNA tutorials around the web).

Building a network stack

Once the proof of concept was working I started looking into the networking support provided by XNA and hit the mother of all roadblocks.  Because I’m targeting both the 360 and Windows, networking becomes significantly more complicated.  See, Microsoft offer no direct network access on the 360, via XNA, or even to their licensed partners (internet hearsay claims).  They provide Xbox Live APIs as part of the XNA framework however, which seemed like a decent solution until I realised that these networking APIs function only on a 360 as part of Xbox live.

Not so multiplatform really

So I’ve started thinking around the problem.  I do a lot of work with WCF in my day-job writing distributed systems so my obvious inclination was to provide a WCF client-server architecture for the Windows targeted version of the game.  This adds an additional set of issues.  For a start it looks as though the WCF assemblies (System.ServiceModel) are probably not available on the 360.  You’d think that’s not much of a problem if you’re going to use the Live APIs, but then you realise that if you’re using a version of .Net 3.5 prior to the first service pack, you need to annotate any classes you want to transfer via WCF with the DataContract attribute.  Which is in the System.ServiceModel namespace.

I’m not sure (as I currently don’t have a subscription to deploy my test code onto my 360) what version of the framework the 360 is running, but I’d hazard a guess that it’s pre SP1.  I’m going to have to further research this problem, because if you can use SP1 on the 360 (which supports serialization without any attributes on the classes) then we’re home free.

Multiplatform networking code using Inversion of Control

In the interim I’ve devised a cunning solution (or perhaps workaround, I’m not sure).  See, all of these issues lead me to need two entirely separate network stacks for my game.  One that supported the Windows, and the other that supported Xbox live, without contaminating my data model with mark-up that’s useable in only one or the other of the stacks.

Castle Windsor to the rescue.

This is purely speculative as I haven’t attempted to implement the 360 network stack yet, but I intend to use the Castle Windsor IoC (inversion of control) container to load a separate network stack at runtime, depending on the platform.

My idea is that the game knows about two interfaces IGameServer and IGameServerConnection.  I then create two entirely separate assemblies, one with the networking code for the PC, the other with the Live networking code.  The PC version contains a class called WcfGameServer which implements IGameServer (I’ve already written this code), and a class called WcfGameServerConnection which implementes IGameServerConnection (and acts as a hand crafted WCF proxy).  The 360 implementation will feature XBL counterparts to these classes.

As far as the game is concerned, it’ll use the Windsor container to load an instance of IGameServer, call the StartListening(); method, then use Windsor to load an instance of IGameServerConnection() and call JoinGame() on that connection.  This way, the specific networking implementation is entirely removed from the game and hidden behind these two simple interfaces.

I’ve currently got a good way through implementing the WCF version of this model though I’ve hit a few snags on the way.  Because I’m deliberately developing in a pre-SP1 environment for the sake of this exercise, WCF doesn’t like serializing the game model to send over the wire.  As a result I’ve had to produce an inelegant hack to work around my desire to keep the System.ServiceModel assembly reference clear of my game model.

Trying to keep it light

I’ve marked up my model with Serializable attributes (.NET 1.1, that’ll be fine) and inside my WCF implementation of IGameServerConnection I’m marshalling all my data into byte[]’s before sending it over the wire.  This isn’t ideal as it requires the WCF implementation to manually deserialize the byte[]’s into their correct data types in the service implementation and the client library, but it does work.  Unfortunately at the moment these byte arrays are being stored as XML before being sent over the wire (as is the default WCF way) so I’m going to need to force WCF to binary serialize all it’s data rather than bloat my packets (and as a result, the game latency).  I’m using Net.Tcp so it’s pretty lightweight as far as protocols go but I suspect I’ll need to do some additional fine tuning to make the WCF implementation viable.

Either way, I’ve got a good feeling about the model, subtle hacks aside, and I think this is quite a good way to target both platforms with minimal impact to your game code.

So this is day 3 of development (I’m sure I’m going to loose count pretty quickly).

[Footnote]

It occurs to me that I got a few fundamental things wrong when this post was originally written regarding the requirements for .Net 3.5 SP1.  These mistakes almost complicated the design of the networking stack.  Read more in my follow up here.

Game Development

March 10th, 2009

It was always a matter of time before my addiction to games and my addiction to programming eventually collided in a horrible mistake.

I’ve decided to start writing a game, using a home grown game engine hopefully with “a little help from my friends”.

I won’t spoil anything too much (as I don’t really want to play my hand too early) but the gist is a 2d, top down, multiplayer action game, with heavy RPG tendencies.  Think of it as a cross between 2d Zelda games, Cannon Fodder and high end raiding in World of Warcraft.  The game design is up in the air at the moment, but hopefully it’ll be derived from a system my good friend Matt has started fleshing out (with the potential for a more RPG leaned game mode, and a more arcade oriented game mode).

The only problem is, I’ve never attempted to write a game before.

So hopefully we can learn together.  I have a rough hit-list of the ground I’m going to have to cover to pull this off, and a rough idea of the technology involved (partially from my other programming pursuits, partially from my enthusiastic following of the games industry) but actually implementing it from the ground up is going to prove an entertaining learning experience.

I’ll tag these posts so people can avoid or watch them at their leisure- there’s a good chance I’ll be dropping into lots of technical detail with complete disregard for the experience levels of my audience. That said, I’m going to be learning a lot of this stuff from scratch (collision detection, graphics rendering, effective ways to script games) while dragging in my bread and butter (distributed systems, C#, etc) to hopefully fill in around the edges.

I’m going to be working in the XNA framework, partially to lower my barrier to entry (seeing as .Net is the day-job and the hobby) and partially because I enjoy the ability to target both the PC and the Xbox360 platform using roughly the same code.

It’s going to be a rocky ride I’m sure, I’ve been working on proof-of-concept code for about a week on and off and it looks like it’s something you can stumble in to (especially with some of the fantastic guides available online).  I’m more than willing to take pointers or tips, so if anyone knows of any especially trustworthy resources on authoring 2d games I’d love to hear some suggestions.