Don’tcha In Simlish: The Sims Meets Internationalization

•July 1, 2008 • 1 Comment

I found this posting a few months ago and now that I have my own blog I wanted to link to it. When developing a game, internationalization (heretofore referred to as i18n) and localization (l10n) are important topics to bear in mind. Different countries have very different methods for displaying text. Right-to-left reading, commas instead of periods, different word sizings, and other gotchas can make for really difficult in-game UI. Even worse, cultural values can often make for problematic conversions in art assets (see Germany’s laws against red blood). That’s why I was so in awe of this post.

In developing the Sims, Maxis completely circumvented the problem by removing any intelligible symbols or words! What’s more, they got popular artists to record nonsense versions of their songs. If you are feeling up for a laugh, take a listen to the Pussycat Dolls’ version of Dontcha in Simlish.  In one fell swoop, all of the major content translation issues disappear.

Another good post from this site details the “Turkey Test,” wherein one locale really pushes your i18n system’s buttons.

This American Life: The Sanctity of Marriage

•June 30, 2008 • 1 Comment

Renee and I listened to another favorite episode of mine from TAL, The Sanctity of Marriage. Of course, now that we’re newlyweds, we were paying careful attention. The episode is in three acts, “What Really Happens in Marriage”, “The Defense of Marriage Act”, and “I Want to be a Statistic”.

The first act resonated with me pretty strongly. For the past couple of decades, some social scientists have been doing experiments to find out why marriages break up. They started off recording a sample of couples and traced them over a five year span. Afterwards, they watched the videos to see if they could find any trends. They were surprised at what they found, as it contradicted conventional wisdom. During the course of the interview, they grade particpants on a few key behaviors. Positive traits incur positive points, negative traits incur negative points. Getting angry isn’t necessarily negative. Contemptual conversation is a big negative. If either party doesn’t make a move that de-escalates the conversation, it goes negative and keeps going down. I have to say that my experience completely matches this. Renee and I don’t argue a lot, but one of the things that I love about her is that when we do argue, we always are conscious of the other person. We’ve had some rough conversations, but we always end up talking each other down by the end. Its also true of other relationships. Putting the other person on the defensive rarely lets the conversation make forward progress. This happens a lot with computer programmers. We love to push our designs and theories forward. When the atmosphere is right, there is a meritocracy of ideas. When it is wrong, you just end up re-stating your idea over and over again on either side until you both get sick of the conversation. Allowing the other person to get their point across and prove that you’ve given it due consideration is important for leading people. I have found that I often end up changing my mind in the course of doing this. I’m not perfect at it, as I’m sure my team members and my wife would attest to, but it is something I try and work on.

The other two acts are interesting, but not nearly as much as the first.

Portalized

•June 30, 2008 • Leave a Comment

No this isn’t another tired “The cake is a lie” blog post. Instead I’d like to take a few moments to present kudos to an indie developer that has taken the mechanics of the game to a new level. This youtube video has the goods. The portals here allow for scaling and dynamic positioning with rigid body physics. Later examples have dynamic shadowing and lighting through the portals as well. I love it when people from the community see a new technique in the game and really go wild with reproducing the tech and improving upon it. My guess on the technique is that he’s using the stencil buffer to render through the portals, the way people sometimes render mirrors. The physics and lighting are much harder. I swear that I saw a video where the object was colliding with itself through a portal.

News has been quiet about the project for awhile, but the developer started a blog at http://nullsquared.wordpress.com.

The Planetary Guides

•June 30, 2008 • Leave a Comment

We visited some friends who recently had a baby this weekend. Their oldest son is really into Iron Man and the Incredible Hulk and I was asked if I had some comics that he could read. Loving the art form like I do, I leapt at the chance to share. When Renee and I got home I went upstairs and started pulling out my shortboxes. I haven’t done this in a long time and nostalgia started to flood my mind as I flipped through issue after issue of comics I’ve been collecting since I was a kid. I found some suitable issues, but I also tripped over several issues of my favorite comic of all time… Planetary.

Planetary is about a group of people that are Archaeologists of the Unknown. The author, Warren Ellis, weaves an alternate history of the world that manages to cover almost everything science fiction. Every issue pulls on a thread from pop culture. Godzilla movies, Hong Kong crime noir, Sherlock Holmes, Dracula, the Fantastic Four, the Hulk, Batman, Superman… you name it. It is truly brilliant how it all comes together. Each issue makes me smile at his creativity and ability to take an old concept, look at it from a slightly different, more modern angle, and re-present it to the reader as something fresh and new. There are enough ideas on most panels that a lesser writer could roll out into their own series. Complementing Ellis’ prose is John Cassaday’s art. He has gone onto fame with the Ultimates and Astonishing X-Men, but he manages to faithfully represent Ellis’ imaginings with such clarity and detail that you’re convinced that the universe really is that way.

Let me give you an example from the series. The team is exploring the ruins of U.S. Science City Zero, a super-secret government research post from the 1950’s, with an informant. In Ellis’ alternate universe, a group of unethical scientists used the Red Scare to fund their research on human genetics. We find out that this informant was shot and then brought back to life, just to see if they could do it, using atomic science. Others were experimented on, including a man that was made invisible, but whose invisibility was unstable and left him blind and in great pain. Other creatures were experimented on, including the creation of giant ants, which cause our heroes slight pause when they attack. In the end, the informant’s second life expires and she fades away. Ellis manages to weave the fear of nuclear technology, monster films of the era, Soviet research cities, and the background of his alternate history together. Other than a brief battle, there is no combat, just ideas. He also manages to touch on some uncomfortable areas of our own history. The Red Scare gave us McCarthyism and we’ve definitely experimented on our own populace before. This intermingling of fictional and real events gives the universe a sense of authenticity that is rare in comic books.

One of the best things about the series is that it captures that sense of wonder that we have about the universe. It is a strange world that we live in and the world is all the more beautiful for that strangeness. That’s a thought I don’t mind being reminded of from time to time.

Real American Hero: Guitar Hero On Tour

•June 27, 2008 • Leave a Comment

We were chatting about this trailer for Guitar Hero On Tour for the DS. There are so many things that I find ridiculous about the video. The Budweiser: Real American Hero and Real Men of Genius jingle singing. The odd grafting of guitar hero to the DS. The attack moves that result in DS tech demo responses. I’ll admit that I haven’t tried the game and the team may well have done a fantastic job, but it just doesn’t capture that Harmonix pseudo-rock star feel. I can go nuts on the Rock Band setup we have in the office because I’m safe with my peer group. There’s no way in hell that I’d do that on the go on the subway or on a family trip. I guess I just can’t get over the peripheral attachment. It just seems like a cash-in.

So you think you can dance

•June 26, 2008 • 1 Comment

So those that have seen me at weddings or at a club know that I love to dance. I really don’t think that I’m any good at all, but I also don’t care. I like to let loose and let the music take over.  However, people keep trying to tell me that I am good. I suspect that people are just humoring me after they hear that I’ve taken hip-hop and salsa lessons.

In any event, I want to share my love for the reality TV show, “So You Think You Can Dance” on Fox. The show really is top notch. They take young, say early twenth-something, aspiring professional dancers, pair them together with some of the hottest choreographers in the business, add a great soundtrack and you get television gold. This isn’t Dancing with the Stars, which has the distasteful ring of celebrity addiction America seems be saddled with. These are hungry, talented dancers vying for a prestigious dance gig. They can really get into some amazing routines and if you aren’t impressed, then you’ve never tried to dance. What really impresses me is when you have a show like tonight where a popper does the samba like he’s been doing it all his life. Telling a great story without saying a word… that’s hot.

Here are some youtube videos from the show and my current favorite couple:

Broadway

Hip-hop

New Comic Book Day! My pull list

•June 26, 2008 • Leave a Comment

It’s new comic book day. A couple of people have asked me what my current pull list is.

The comics that currently make it to the top of my reading list every week:

Captain America – Pound for pound this is the best comic being published today. You may or may not have heard, but Steve Rogers (aka Captain America) is dead. He’s been dead for two story arcs thus far. The plot is a superhero espionage thriller dealing with the supporting cast (which Cap has plenty of) and the antagonists (Red Skull, Dr. Faustus, etc). This entire run of the series has been one continuous plotline, with some of the best twists and surprises that I’ve seen in years. Do yourself a favor and pick up the trade. Ed Brubaker is a tiny god.

Iron Fist – Kung-fu, supernatural, action at its best. The character was hokey as part of the Iron First/ Power Man Heroes for Hire in the 70’s. But they brought him back in style by building up a complex and compelling back story of Iron Fists that slowly unfolds and affects the modern storyline.

Green Lantern & Green Lantern Corps- Another long lead-time story development about intergalactic space cops. The new plotlines have produced new color-themed corps, each with a mission. It sounds hokey, but it really does work and is a lot of fun.

Fables – This is another epic storyline. Imagine that all the fairytales and myths humanity invents are in fact about real characters. These fables, as they call themselves, are given power by humanity’s belief in them. They originally inhabited universes based on their cultural background. However, many of them have been uprooted and have setup a kingdom-in-exile in NY.

All right, I confess… I’m a long plot-arc junkie.

Other titles on my pull list

Booster Gold – Time travelling secret history goodness.

Checkmate – Sci-fi political thriller.

Final Crisis- Not sure if I’ll be liking this by the end, but it sure beats Coutdown.

Secret Invasion – Skrulls everywhere! Don’t know who to trust!

Astonishing X-Men – Loved Whedon’s run. Am hopeful the next arc is good.

Fantastic Four- Love Millar. The first time in a long time, I actually am interested in the FF.

Guardians of the Galaxy – Big sweet spot for Jim Valentino’s version of this series. I like the new cosmic stuff from Marvel and the recent tie-ins to that original version have me sold.

Incredible Hercules – Am liking the partnering of Hercules & Cho.

Mighty Avengers / New Avengers – I’m kinda liking the tie-ins to Secret Invasion where the backstory is being revealed in these two series. Am not sure where they are going to go after this.

Nova- Another marvel cosmic title. Good stuff.

Skaar: Son of Hulk – Think Hulk meets Conan. ‘Nuff said.

Thor – Stracynski’s take on Thor is pretty interesting thus far, but something needs to happen soon here.

Uncanny X-men, X-Factor, X-Force – Who doesn’t love mutants?

Walking Dead – I love post-apocalyptic stories. The secret of the title is that it isn’t about the zombies, but the stressed out, empty people that haven’t died yet. No one is safe.

Buffy The Vampire Slayer- Season 8, by Whedon himself.

Shader Permutations

•June 25, 2008 • Leave a Comment

Over the past few years its been a lot of fun to watch programmable GPUs develop. The fixed function pipeline that was so important to DX7 and earlier hardware definitely got the job done, but it also limited what we could accomplish when rendering. Shader Model 1.0 capable cards came out and they were basically glorified fixed function parts with too little instructions to really be valuable. Shader Model 2.0 cards really changed the equation and unlocked many of the effects that people are taking for granted today. As Uncle Ben says, with great power comes great responsibility. When it comes to shaders, that responsibility comes in a couple of forms:

  • You own the vertex, pixel fragment, and primitive generation when you render the object. You’ve got to transform the vertex with the view projection matrix. You have to perform skinning. You have to apply texture transforms. You have to implement the lighting equation. You can do anything you want, but you can’t lean on any existing processing pipelines.
  • Limitations in what a given shader program can accomplish. Current shader models allow for branching in the pixel and vertex shader, but to achieve high performance, you want to be careful about when and how these branches execute.

These issues have led to a variety of schemes for building up and authoring new shaders:

  • Re-use existing code. All the shader languages support including other files at this point. Break your shader code into a series of utility functions that get the job and write a main function for each programmable stage that feeds the functions in the right order. There’s nothing wrong with this approach. Frankly, its how most of us write code anyway. You are stuck writing out the correct sequence of function calls and arguments, but if you can limit your artists to a few workable permutations, you’re probaly okay.
  • Use preprocessor defines. This is similar to the prior option, but allows for you to write one mammoth uber-shader that has all that you want, but remove functionality based on what preprocessor states are set. This has an advantage over the prior form in that you can create a pretty complex effect and the permutations fall out of disabling the snippets of code that you don’t care about. Someone once called this “subtractive” shader authoring and I like the term. There are a few things that are harder to do in this approach. For one, the code is harder to read, making maintenance a little difficult. When the shaders get complex, it is harder to know how the various preprocessor symbols will interact. Program inputs and outputs can be a little awkward as well, as some shader languages require sequential packed semantics be used (ie POSITION0, POSITIION1, POSITION2) and holes can lead to compiler crashes or incorrect shader code.
  • Shader stitchers or “additive” systems. This is my favorite option and appears to be en vogue. This is essentially what the shade-tree systems do. You have a series of “functions” or “operators” with inputs and outputs. You wire these inputs and outputs either via artists direction in a visual shader editor or programmatically. A graph traversal gets you essentially a “main” function that calls out to the functional nodes to process data. I wrote a programmatic system for Gambryo called NiStandardMaterial.

No matter what path you take, you’ll still need to have a defined set of features that you intend to support. Here are some of the questions that may help contribute to shader permutation hell:

  • Is my object skinned or unskinned? Do I just pass the vertex data as-is (screen-space quads may want this)?
  • What lights are affecting my object? How many of each type of light are there (point, spot, directional)? Which lights have associated shadow buffers?
  • What lighting model do you use?
  • Does the object need specular lighting?
  • Do you do per-vertex or per-pixel lighting? Are you doing a mix? Are you doing any fancy effects like PRT?
  • What textures can the artist add/remove? What UV sets are they using? Are there any texture transforms per vertex? Are any of the textures using projections? Are any of the textures cube-maps? Do any of the maps share a UV set?
  • Is there a normal map? Is it tangent or object space? Is it encoded as DXN or a fancy DXT-based encoding? Do you have an Normal, Binormal, Tangent frame?
  • Are there vertex colors? How are they applied?
  • Are there any hardware instancing parameters?
  • Is there any fogging?
  • Is there any alpha testing (DX10 hardware makes you write this yourself)?
  • Do I need to write data to any other buffers? Depth? Normals?

Once you’ve built this decision tree, you’re still far from done. You’ll need to have a good mechanism for previewing this in the art pipeline. You’ll need to determine what hardware models you support. SM 2.0 in all its flavors can be a real challenge to develop for due to low instruction counts, branching limitations, and limited registers. When it breaks, you can’t easily programmatically determine why and react. The compilers are also really good at rearranging and deleting dead code, so it is often hard to predict precisely how many instructions will be used. Solving this may involve going different routes for different machine configurations, which makes testing that much harder. You may choose to go multi-pass and draw with different shaders for each pass, but then you’ll need to deal carefully with alpha blending and fog effects.

There’s a lot that I’d change if I were to go back and re-implement the shade-tree system in Gamebryo today, but a few years ago it managed to take all the complexity that was the old Gamebryo fixed-function pipeline and add a few new features on top and be cross-platform with PC, 360, and PS3.

Blog link: Improving Bug Triage Through User Pain

•June 24, 2008 • Leave a Comment

One of the more complex parts of getting a release out the door is deciding when it is done. That sounds a little odd, but in reality all software ships with bugs. Hopefully you know about them through testing. However, should they block shipment of the product? Here’s where the complexity begins. Most of the bugs are rarely encountered. Some are work-flow blockers. Some cause crashes. Some are misspellings in documentation. Not all bugs are created equal. Everyone has their own strategy for dealing with this. A recent blog that I read did a really good job of outlining a strategy that is in line with my own metrics. The blog in question (http://lostgarden.com/2008/05/improving-bug-triage-with-user-pain.html) attempts to take all the guesswork out of classifying issues. I’ve proposed that we adopt some or all of the mechansims outlined in the blog internally as we’re changing bug database software at the moment.

Why aren’t you reading these blogs?

•June 24, 2008 • 2 Comments

I have a ton of feeds that I monitor on a daily basis to stay current with trends in the industry. Here is a sampling of ones that I think any programmer in the industry should be keeping tabs on:

Edit: Fixed mistaken association with Level of Detail book for Level of Detail blog.