Archive for the ‘Game Design’ Category

Augmented reality, gaming, and you

Sunday, October 25th, 2009

Articles have been popping up recently about several new augmented reality (AR) apps available for the iPhone. For those unfamiliar with the term, or who haven’t read the articles, augmented reality is the idea of superimposing computer-generated information onto views of the real world. It’s kind of like having a HUD for your life. Terminator, anyone?

With the iPhone’s camera, GPS system, and compass, it’s possible to point your phone at something and have an app send back useful information about what you see. The app could even superimpose that information on your view, thus providing a connection between your own visual field and the all-knowing Internet. “Augmented reality browser” is probably the best term for this type of app, at least according to a recent New York Times article.

Augmented reality and gaming

But what about gaming? How can we use this technology to create new types of entertainment or enhance what’s already available? Some ideas:

  • Mini-AR — One type of AR game that has already emerged involves placing traditional video game fare within a real (often miniature) environment. Check out, for example, this siege game that can be played on a desktop:

    (There are more videos like this at Games Alfresco, a site dedicated to AR gaming.)
  • Another possibility is travel-based role playing. Imagine a game that imposes a fictional story on the real world. Like a murder mystery set in your home town. You assume the role of a detective following up on leads and searching for clues. You have to drive around town for real to solve the case, but the victim, characters, and evidence are all super-imposed on real locations. A multi-player version could have you team up with friends, each person playing a different role, to solve the crime.The scope of such games is potentially global. Sure, travel costs could be prohibitive, but what a fun thing to do on vacation. This is table-top role playing taken to the next level (ok, the next level after LARPing).
  • With some sort of AR headgear, games like laser tag or paintball could be dramatically enhanced. When setting up a game, you and your friends could pick a scenario (WWII, urban warfare, alien invasion, whatever) and stage your match in much more thrilling fashion.
  • Multiplayer matchmaking — If you’re involved in some sort of live-action augmented reality game, AR technologies could help you find other players. I could set my phone to broadcast my location and game preferences for other players to see in their AR view. So I could be standing in a train station, scan my phone across the crowd, and spot people interested in a game.(This same idea could apply to social networking, by the way. People at a party could broadcast their Facebook status so others could see it literally floating above their heads. Not saying it’s a good idea…)

AR and you

Certainly augmented reality technology is in its infancy, but its potential is profound. Obviously there are risks as well, to security and privacy most of all. But I suspect AR is going to be HUGE, and even the most mundane details of our lives will be affected (driving, grocery shopping, traveling, conversation). It will happen gradually (though maybe not slowly), and games will have a key role in setting the direction this technology takes.

It’s cool and scary at the same time, right?

Mixamo: quick animations for indie developers

Wednesday, July 29th, 2009

Every once in a while a site emerges from the primordial Internet ooze that changes the way I think about things. Pandora changed my notion of Internet radio. YouTube has changed video forever. Facebook made me believe I could stay connected to old friends without the stress of writing periodic in-depth e-mails (which I never did).

Thanks to a mention in the recent Unity newsletter, I think I may have discovered another game-changing site, at least as far as indie game development is concerned. The site is Mixamo, which offers nothing less than the ability to create “production-quality 3D character animations in a fraction of the time that traditional mo-cap and keyframing requires.” Oh, and you can use your own skeleton. Crazy, right?

Mixamo is a Web-based application that allows you to upload a skeleton, choose from a growing library of animations, apply them to your skeleton, customize them quickly using a series of sliders, save them to a shopping cart, and buy them on an a la carte basis. Animations cost anywhere from $25 to $119.

For an indie developer with limited resources and animation skills, this is potentially a game changer. Animation is a seriously specialized skill, and paying $50 for a ready-made animation to play with is much more appealing that hiring a freelance animator who is sure to charge hundreds of dollars at least.

Certainly Mixamo has some limitations, including the fact that it only supports biped animations. No animals, monsters, or hybrids here, as far as I can tell, though I don’t know how the system would handle a non-standard skeleton (with, say, an extra leg joint — for a minotaur or something).

Let’s face it, animating human characters is hard. Hiring people to do the work is expensive. Now, thanks to some seemingly brilliant programmers, a great idea, and the wonder of the Internet, another barrier to video game development appears to be crumbling away. Very exciting indeed.

Zen and the art of indie game design

Thursday, February 12th, 2009

Touch Arcade posted an article yesterday about the upcoming iPhone game Zen Bound. Besides looking pretty frickin’ slick, Zen Bound is notable because it’s aiming at the increasingly popular zen-influenced approach to indie gaming (There is no spoon).

I put this in the same category as other non-traditional games like Jenova Chen’s Cloud and flOw, and, to some extent, Crayon Physics (though it’s more of a traditional puzzle game). These games are all characterized by a deliberate attempt to avoid the traditional trappings of commercial video games (or even the general concept of gaming). They aren’t violent or particularly goal-driven, and they don’t present situations where winning something is the player’s primary motivation.

Games like this are appealing to me from a design perspective because of their counter-cultural tendencies. What’s the best way to create an interactive experience that explores more than the adrenaline rush of today’s big-budget games? Make something that moves slowly and doesn’t go anywhere. It’s a distinctly indie thought process, and it works perfectly for small projects. The focus is on quality on a small scale, doing one thing well and for its own sake.

I don’t know if any of these designers will ever strike it rich, but that’s probably not the point. The point, I suppose, is that there is no point.

Beyond the numbers: are they just for über-nerds?

Wednesday, January 28th, 2009

Hit points, experience points, reputation points, strength, critical hit percentage, intelligence, agility… There’s a long list of “stats” common to games today (RPGs in particular), and most of the time the numbers behind these stats are visible to the player. So do players really want to calculate their crit percentages and crunch the benefits of +12 stamina vs. +10 intelligence? Is it enough for NPCs to express their feelings toward you as +5 love, +7 attraction, and -30 fear?

Asked another way, is it possible to derive any real drama from all the rigid computer logic behind our favorite games? Earnest Adams gives his thoughts in a recent Gamasutra feature about “Numbers, Emotions, and Behavior.”

Adams’ argument is a familiar one: video games will never rise to their full potential as long as designers continue to focus more attention on the numerical mechanics behind a game than the human element of the game’s characters.

In principle, I agree. Games do need characters that behave in more believably human ways. We as gamers would all be better for it, and the industry would get more respect. The constant focus on math isn’t a very “humanistic” thing; it feels more mechanical.

The difficulty, though, is that video games aren’t just about characters and stories — they’re called games for a reason. We play them. They have rules and structure. We engage in goal-oriented activities and try to win more often than lose. In a fundamental sense, games are mechanical. If you take these elements away from an interactive experience, it no longer qualifies as a game.

Adams notes in his article that “all that emphasis on gear [in RPG games] seems distinctly nerdy.” He’s talking here about the desire to collect the best items that provide the best stat bonuses and give you the best chance at beating your opponent(s). Is this nerdy? Maybe, but this behavior isn’t the exclusive domain of hardcore gamers. Fantasy sports requires the same type of in-depth attention and number crunching, and no one calls it nerdy.

Perhaps the difference is that fantasy sports don’t offer the potential for narrative the way video games do. It’s pure gaming with no delusions of artistic grandeur.

So what’s a game designer to do? Hide the numbers at all costs or give your hardcore players something to sink their teeth into? The answer to this quandary, like most good quandaries, is likely somewhere in the middle, and it definitely depends on the type of game you’re trying to make. Could World of Warcraft benefit from more compelling dramatic action or characterization? Absolutely. But would it be so ridiculously popular if it wasn’t possible to agonize over item stats and DPS? No way.

Morph targets and a disembodied head

Friday, November 28th, 2008

It’s been a while since I posted something for you to play with.

Well, here you go.

A man's faceIt will take a minute to load (lots of stuff to calculate). Once it does, just play around with the sliders to customize the guy’s face. You can click and drag on his face to turn him around. Cool, huh?

Unfortunately, I can’t say that I whipped this up after Thanksgiving dinner. Actually I’ve been working on it for a week or so, trying out different methods of achieving what I wanted — and some methods of getting nowhere close. Actually, this version is the most complex one I did. The fact that it works is reason enough to post it.

How it works
Now the thrilling explanation. One of the features that Unity lacks at the moment is the ability to handle morph targets (aka blend shapes) imported from 3D tools like Maya or Cheetah. So, the only way to implement them is to code a system by hand. After scouring the Unity forums, I found a script that would handle simple mesh morphs but didn’t do anything as complex as multiple blended attributes.

Using the basics of that script, I manged to put together a system that works pretty well. Here’s the basic flow of things:

  • To set everything up, I assign the base mesh (3D shape) in Unity, then create a list of attributes that I want to adjust. Each attribute has a reference mesh created by editing the original mesh to get the most extreme version of each facial attribute.
  • When the scene loads, it first stores several pieces of information (this is why it takes a while to load):
    • For each attribute (24 of them in this scene), it builds a list of vertices in the mesh that are affected by that attribute.
    • At the same time it builds a list of offset vectors for each vertex affected by each attribute. This information stores the maximum possible offset for each vertex per attribute. Lots of data building up here…
    • Then we build a list of which attributes affect each vertex. This is the converse of the first list above, and it’s necessary to keep the code running smoothly.
  • After all that data has been stored, the default mesh loads along with a bunch of sliders to control the various attributes.
  • Each time a slider is adjusted, we calculate the proper amount to adjust each vertex affected by that attribute. This is done by using a weighted average of all the attributes affecting each vertex in question. By using a weighted average, we can combine attributes like the width and height of the eyes without getting conflicts (this part took me forever to figure out).
  • Once we have the right offset vectors, we adjust the affected vertices by those values and redraw the mesh. Voila!

Optimization
Because there’s so much manipulation of individual vertices in this code, it was really hard to optimize. I spent almost the entire day trying to get it to run at an acceptable speed, and I still don’t think it’s good enough. The main problem is that when a vertex (or group of vertices) is affected by multiple attributes at once, the weighted average becomes harder to figure out and requires more processing juice. I attempted to store offset values rather than recalculating the average every time a vertex is affected, but I couldn’t figure it out before dinner. This version runs well enough, so it will have to do.

Oh, and happy (late) Thanksgiving!

EDIT: I posted a new version of the file after getting some serious optimization help from Jamie. It still takes a while to start up (but not as long), and it runs considerably faster once it loads. My code now also morphs the normals as well as the vertex positions, which I had overlooked before.