Lost in the 4th Dimension…

Most indie game developers I know do “indie game work days”, where one or more people will get together at somebody’s house or a coffee shop to work on their individual games in parallel.  Some people call this “co-working”, I guess.

Today, Marc ten Bosch is over at my place, and is working on new levels for Miegakure, his mind bending “puzzle-platformer in four dimensions”.  This is what it looks like to try to design 4D puzzles:

Okay, back to redesigning my bookcase mission.

SpyParty E3 “Competitive” Analysis

I’m not an economist, so I could be completely wrong here, but I don’t think games (or works in any art and entertainment form, whether film, music, books, whatever) really compete against each other in the usual sense of the term “compete”. Yes, if you ship on the exact same day as a big hit, you’re hosed, but in general, I don’t think even games as similar as Halo and Gears of War compete in the same way Honda and Toyota compete. Ignoring the hardcore fanboy zealots, if you buy and enjoy Halo, you’ll probably buy and enjoy Gears, and vice versa. My guess is the overlap between the owners of those two games is pretty high. Here is an article about purchase intent for the two games, which says slightly over 50% of the people who buy one intend to buy the other1.

By contrast, few people buy more than one car every few years, so if somebody is in the market for a car, the auto companies really are competing for that one sale.

With games, I think the most important thing is to make the game you feel passionate about making, and not worry too much about what other developers are doing.

That said, it is still important to keep abreast of what’s going on in the industry, and to keep tabs on what games have come out or are coming out that are related to yours in some way. It’s good for inspiration, motivation, and education.

I went to E3 this year with a list of spy games, mystery games, and games that looked like they could have some subtle social interactions to check out, and here’s how it went:

  • Assassin’s Creed Brotherhood, Wanted Mode Multiplayer
    I felt like Ubisoft’s ACB was the most important game for me to check out, and I got to play it for a while on the show floor. I had heard about the “Wanted” multiplayer mode before I went to E3, and how it was similar to The Ship, an older game on Steam that’s been mentioned whenever people talk about SpyParty
    . Here’s a good video explaining the Wanted mode:


    Like The Ship, it’s basically the old college campus game, Assassin, where each player has a known target, but doesn’t know who has them as a target. Both are much more symmetric than SpyParty, in that everyone is basically playing the same game. As you can see in the video, there’s not actually a lot of “hiding in plain sight” or “acting normal” going on, especially since there’s a giant radar on the screen, you can climb all over buildings but the NPCs don’t, and you have various super powers. In my playtests, it tended to degenerate into running around, climbing on things, and trying to get quick kills. The game ships in November, so I’ll be interested to see if they change the mode at all by then. I hope they remove the radar, and tune it so people actually try to blend in more and it becomes more about behavior. If they do that, there will be some useful lessons to learn from watching it in the wild.
  • Guilty Party
    This Disney game for the Wii has a few content-oriented things in common with SpyParty, including the settings and characters, not to mention the name similarity, so I thought I’d check it out. Here is a brief video of the developers talking about it:

    http://www.youtube.com/watch?v=FKC_HoxdUz4


    The game has quite nice stylized art direction and characters, but the gameplay itself is pretty much pure deductive reasoning, kind of like the board games Clue(do) or Guess Who?. You gather explicit clues to narrow down the suspects until you can prove somebody’s the guilty party. I want to have some deductive reasoning aspects to the Sniper side of SpyParty, because the practice of narrowing down your suspects is fulfilling and interesting and helps you focus your attention, but I want the majority of the game on the Sniper side to be about perception, observing subtle human behavior, and making decisions with incomplete information. I don’t want you to be able to brute force figure out who the Spy is by deduction.
  • The Agency
    This is a Sony Online Entertainment “FPS MMO”. Besides the spy fiction theme, there’s not a lot of overlap here, and even the theme is pretty different, with The Agency being some kind of future scifi spy world. The game is mostly a First Person Shooter with some persistent RPG elements. Here’s an interview where they talk about the various aspects of the game they were showing at E3, and it’s mostly shooter stuff. This video talks a bit about some less shootery things, but it’s all in cutscenes in the video, so it’s hard to see whether they’ve got that stuff working in gameplay. They’re also doing some sort of more casual Facebooky thing to go along with it, and here’s the trailer for that. Edit: although, this ballroom image looks interesting.

The three games I wanted to see but that weren’t anywhere on the show floor or even behind closed doors (that I could determine) were:

  • Bloody Good Time
    This is the spiritual sequel to The Ship, by some of the same developers. Ubisoft bought or absorbed some or all of Outerlight, the developers of The Ship, and they’re working on Bloody Good Time for XBLA. From the sounds of it via ESRB filings, it’s going even farther away from the subtle social stuff, which is too bad, but it will be interesting to see when it’s finished.
  • Agent
    Very little is known about this Rockstar game, but there’s a bit of info out there. The fact that they’re calling it “the ultimate action game” implies it’s not going for the subtle stuff, but who knows. I’m assuming it will it be Grand Theft Espionage like Red Dead Redemption was Grand Theft Western, which could be pretty cool, but very different from SpyParty, but we’ll have to wait and see!
  • Hitman
    No sign of Hitman 5 that I could find. Some news has come out since then, but nothing very interesting yet.

One of the more interesting games I heard about at E3 was described to me by my friend and colleague Eric Zimmerman. He told me about playing Love’s Labor’s Lost at Come Out and Play 2010, which was a live action game with a lot of subtle behavioral interactions and hidden information.

Anyway, that’s it for the SpyParty-centric E3 roundup. My review of E3 in general is:  “wow, that’s a lot of shooters.”

Post a comment or send me email if you know anything more about the games above, or any other games I should be keeping an eye on.

  1. I wonder if there are numbers out there about actual purchases rather than intent. []

Full Body IK Solver in a Day

I am finally nearing the end of the list I made almost two months ago to get picking up and interacting with objects working in SpyParty. Here is is again:

  1. Add an event track to the animation system so the animations can tell the AI when the object should be attached.
  2. Make an animation for picking up the object and have it fire an attachment event.
  3. Add non-character dynamic items as a concept to the code.
  4. Add a simple attachment system to the character AI and rendering code.
  5. Write a quick full body IK system so the character doesn’t have to align with the item exactly.
  6. Hook it all up.

Steps 3 and 4 were discussed in this post.

In the original post, Step 5 had this footnote:

“This is a step that might give some people pause, but I’ve written so many IK solvers over the years that I figure I can whip this out in a day or so. Famous last words.”

Well, I managed to get a full body IK solver mostly working on Sunday. Admittedly, it was a 12 hour day, but still, not bad if I do say so myself.

Briefly, IK stands for Inverse Kinematics. Kinematics is the study of how things move through time and space. Taking the simple example of your arm, Forward Kinematics is about how your hand moves when you change the joint angles at your shoulder and your elbow. You might rotate your elbow by 30 degrees, and figuring out where your hand ends up is a Forward Kinematics problem. As you might imagine, it’s somewhat difficult to pick up objects if you have to manually specify the shoulder and elbow angles to move the hand towards the object. Worse, if you change the shoulder angle, obviously the elbow angle has to change to keep the hand in the same place, since your arm is hierarchical.

Inverse Kinematics is the solution to this problem. Where FK says, “given the joint angles, where is the hand?”, IK inverts that and says, “given the desired hand position and orientation, what are the joint angles to get there?” There is some more math involved in solving IK problems compared to FK problems, but it allows you to control the arm from the hand and the shoulder and elbow joints figure themselves out.

One interesting point is that the FK problem always has a solution: for any joint angles at your shoulder and elbow, your hand will end up somewhere. By contrast, the IK problem doesn’t always have a solution: if I ask the IK solver what joint angles will put your hand on the moon, it had better give back either “none” or something reasonable like angles that point your hand towards the moon.

So, that’s the Kinematics lesson for today, let’s get to the examples. Remember, all of this art is temporary prototype placeholder artwork!

First, here’s a video of a character interacting with a statue in SpyParty, where the character is aligned with the statue in the same way the animation was created, so it all lines up nicely:

Now, since there’s no IK in the game yet, here’s what happens if you don’t align exactly right:

The statue still attaches to the character’s hand, due to Step 4 above, it’s just that the hand isn’t aligned with the statue correctly. So, when the attachment event fires in the animation, the code detaches the statue from the pedestal and attaches it to the hand in the wrong place1.

And finally, after Sunday, here’s a video of the IK working in the SpyParty contentviewer, which is a simple little application for testing animations and models and whatnot. It’s way easier to make changes in the contentviewer and then move the code into the game than it is to make changes in the game with AI running and all that other stuff.

As you can see, the new IK system still needs a ton of tuning, but that was the result after the 12 hours and it felt pretty good. I think I’ll spend another day on the core math to tune it a bit, and then I need to put the IK code into the game and do Step 6 to hook it all up.

I’m doing IK a little differently than most games do, using learning from my work on Spore. Most games use IK to simply pull the hand towards the object when the animation says to use IK, but what we did on Spore was a little different, and I think, better. Instead of IKing the hand to the object, I warp the whole animation as the IK blends in, so the torso bends and all the little stylistic tangential movements still show up, only now they’re aimed towards the object rather than just straight ahead. I’m going to post more detail about this technique once I get it cleaned up, but you can read the super-detailed technical description of the Spore IK solver in the SIGGRAPH paper we wrote about the technology if you want to know more now.

Edit: You can actually see the results of the animation warping in that video, because the left hand is not being IK’d directly to its hardpoint at all, the only thing changing its position is the space warping, and you can see it’s in the neighborhood of the other hardpoint even without an IK fixup. This is one of the huge advantages of this method, it preserves the animator’s source poses as much as possible, so the IK itself is only used to polish up the pose for the new configuration. This is the blend of sampling and synthesis I’ve talked about before in lectures, where you want to augment the animator’s work with the computer’s work, not replace one with the other.

  1. When you’re making a video game, you really do have to create the basic laws of the universe, and then implement them; it’s kind of mind boggling that anything actually works. :) []

object.h is dead, long live object.h!

Ugh, sorry for the lack of updates, I feel like I’ve been clawing my way through a giant pile of manure and have barely gotten my head out into the air.

If you recall, my current task on SpyParty has been to get the folks at the party to be able to pick things up, like books, magazines, martinis, cigarettes, top secret plans for a nuclear device, etc.  Well, steps 3 and 4 on that task were the following:

3.  Add non-character dynamic items as a concept to the code.
4.  Add a simple attachment system to the character AI and rendering code.

Oh boy.  These look pretty simple, but since I’ve been 100% focused on getting the gameplay prototyped, the actual game code had gotten a little, shall we say, funky smelling.  It was never very clean, having started from the Indie Game Jam 3 engine source code, which was not in great shape itself, but my singular focus on getting gameplay in without regard to how I got it in has made matters worse.

It became clear that I needed to clean things up before I could move forward.  My friend and executive producer at Maxis, Lucy Bradshaw, used to bristle whenever a programmer would mention the word “refactoring” because it had a perfect trifecta of badness1, but it was time.  I couldn’t figure out how to attach an object to another object in the old system without hacks even more heinous than I was willing to attempt.

This kind of task gets to the heart of the “game object system” issue.  I’ve got a good powerpoint by Doug Church on my site on the topic, and I’m going to write more about my new system soon, but I wanted to at least post something to indicate that I’m not dead.

Briefly, I choose a fairly simple component based object system architecture.  There are really two basic options when you’re doing object systems:  inheritance-based and component-based.  I’ll have much more to say about this later after I’ve used it for a bit and worked out the kinks, but for my usage I thought components were the way to go.  These terms are pretty loose; they don’t necessarily directly correspond to C++ (or whatever) definitions when you use them in this general way.

The other thing I am finally starting to test out is my new namespace-centric coding style I’ve been simmering on for the past 5 years.  I’ll also write more about that soon as well.  I’ve been styleless for a long time, after becoming dissatisfied with my previous programming style, and not seeing any others I really liked.

The final thing I wanted to mention was that even after 20 years of programming, I still need constant reminders to figure out ways to keep changes small.  I started writing the new object system and porting all the code over to it in one big change, and after bogging down in that for days and days, I finally rolled back to the old object system and figured out a way to incrementally change over.  It’s more hacked code in the interim with the two object systems fighting for attention, but having a compiling and working piece of software you can test incrementally is so important it’s hard to overstate.  I had two object.h’s in the project for a few days (the old one renamed to _object.h), but it let me move things over piecemeal and keep testing, and I was finally able to delete the old object.h last night.

Also, source code control is your friend and it saved me when I realized I’d bitten off more than I could chew in one bite during the refactor.  I currently use Subversion and have for years, but have been thinking about switching to Mercurial or Bazaar.  I wish these distributed systems dealt with large binary files like those found in games better, though.

  1. 1) refactoring takes a long time, 2) it adds bugs to the code, 3) even when it works perfectly, it has no visible improvement on the game []

A couple interviews…

Martin Davies from PC Gamer UK just posted an interview with me to accompany his SpyParty preview in the print magazine where I talk a bit about some of the aesthetic goals for the game and how it got started:

http://www.computerandvideogames.com/article.php?id=245666&site=pcg

And, Alice Bonasio from The Escapist posted an interview/article about games as an art form and film and comics and all the usual stuff I babble about incessantly:

http://www.escapistmagazine.com/articles/view/issues/issue_252/7496-Better-Than-Film

It’s really wonderful that people in the press are giving more and more attention to indies these days, I think it’s great for the industry.  I mean, not just because I’m getting some of it, but in general!  :)