The Animal Farm

September 29th, 2009

Business Trips

I recently went to Warren, MI with my company on my first experiment.  Normally my business trips consist of integration and all the nightmares that go with them.  This trip was a different breed though.

Basically in an experiment it is assumed your software is working properly and third parties can use that software to run tests on their UI design/simulation design to see if what they are aiming for is actually working properly.  Basically soldiers come in and use the software, give feed back (whether it be vocally or just through the recording of button presses), and then take an exit interview.  This experiment was more for the UI end of things.  Basically in an experiment I am a baby sitter.  I just sit around and watch the system and make sure it is performing properly, if anything goes wrong, I attempt to fix it, or at the very least restart the system.  Much different than trying to get my code to work on a new machine with the actual hardware to communicate with, instead of just stub code.

At any rate, I quite enjoyed my time out there as the people I went with and the people running the experiment were pretty awesome people.

Also, I get to go to Morgantown for a business trip in a couple weeks.  I am representing DCS in the career fair at WVU.  How awesome is that?

Aside from that, I’ve just been playing WoW, so no new games to report on.  Though I did buy the new Mario and Luigi as well as Scribblenauts, and I have Kingdom Hearts 358/2 days to be picked up today.  I just don’t have the drive to play any of them, so they’ll sit on my shelf for a while until I do.

~Zach

September 15th, 2009

Voxels, Dynamic Destruction, Fast Collision, and Love*

With Word Duelist 98% code complete and less than 50% art complete, I’ve had some time to start exploring other game projects. My next “official” project intended for XNA release will likely be Penguin Push 2, but the coding on that is fairly trivial in all regards (the original was code complete, tools included, in three days), and I’m more interested in solving challenging problems at the moment. So I’m looking into a toy project I came up with a couple days ago.

The concept is a cross between Worms, Smash, and Soldat. Basically, multiple characters - XBox 360 Avatars in my case - run around a dynamically destructible terrain, blasting holes in it with weapons and trying to knock each other off the world. Some weapons have more knockback, some blast larger holes in the terrain, some are just meant for doing damage. The levels are dynamically generated, and the perspective is 2.5D. And by that I mean the world is 3D, but play takes place on a 2D plane.

The biggest challenges are getting the destruction and collision detection to be fast enough. Here’s how I’m approaching things thus far:

The world is represented as a 2D bitmap of 0’s (empty) and 1’s (walls). From this, you can sweep along the bitmap, constructing the triangle geometry for a wall based on the adjecent walls. If you’re CS savvy, this is exactly how Marching Cubes/Tetrahedron works, but those are a bit more complex because the configurations are more varied. I call my system Marching Squares.

That’s all good and fine, but updating the whole world each time there’s an explosion is impractical. So break the world up into, say, 16×16 chunks. When the original bitmap changes, determine which chunks are dirty, and only update the dirty chunks. A “complete” solution would update connected chunks in case the edges change, but I’ve found that at my scale this is unnoticable and adds considerable complexity. This saves you from updating a whole lot of geometry. It does, however, make rendering noticeably slower (more draw calls).

This LOD system extends to collision detection, since you’ve setup a uniform grid. Probably not an optimal collision grid size depending on your entity size, though; I’ve found that with larger entities, collision can take a bit of time. So I’m probably going to have to do some extra refinements to narrow the number of triangle checks. A makeshift quadtree, essentially, but I think I can do this without adding a lot of memory/tree traversals to the system.

At any rate, the collision research I did for Oh No, Zombies! has come into play; I was able to drop in my collision solution directly, only refining some of the interfaces to (a) avoid any dynamic memory allocation during the collision checks, which strangely *hurt* performance, but that’s another discussion, and (b) be a little more generic. I’m very glad for this, since I struggled with that code.

I’ve found that I can have a 512×512 map split into 16×16 chunks running reasonably well; I’ve tested causing 15 simultaneous 10×10 explosions, which goes without a hitch. Current bottlenecks are rendering and collision. I can speed up the rendering a bit once I get culling in place (though this isn’t a guarantee, since I intend to have the camera zoom in/out as players move around ala Smash). Collision, as I said, could do with some better LOD, and there are probably mathematical optimizations I can make. At any rate, it all looks pretty cool.

*I lied. There is no love. But I love candy. Does that count?

September 6th, 2009

Gameplay is not a Story

When discussing how to effectively tell stories in games, the following point invariably comes up: the player is creating/telling the story. Here’s an excerpt from GameDev.Net’s coverage of SIGGRAPH:

“For game players, the story is immersive and subversive. “It is the player’s story,” commented Danny where actions speak louder than words. Danny then gave some examples. While playing Everquest, a low-level player fell down a well to a level with higher-level monsters. Although probably not intended by the game designers, this created a compelling story for the player who discussed it with other players. Eventually, the player was escorted out by some higher-level players, but the story was unique and memorable.”

I find this to be wrong on essentially every level. It’s a flat, uncompelling form of storytelling at best.

It might be correct if the stories were interesting. Danny’s example was a character falling down a well. If you’re interested in the depth of a Lassi episode this is great. However, if you want to penetrate beyond the depth of a novel you might find in the child’s section of a bookstore, you’re going to need significantly more.

Here’s another bit from the same article:

“Another good example is Knights of the Old Republic and Fallout 3 where the player has the choice to choose a faction to defend.”

I’ve never played KotoR, but I can speak on Fallout 3: it had no story to write home about. Sure, I did some neat things, but I was playing; there was no compelling story there. If I sat someone down and told them my tale through the wasteland, they would be bored to death. Literally. They would choke and die right in front of me out of spite. It wouldn’t be the first time.

Here are a few observations about why these stories are without:
(1) There is no character depth. My character had 0 personality. He was an avatar that trekked through the wasteland. He did not grow. He did not evolve. He did not change. I was not emotionally invested in him. Not at all. When he died at the end - oh, there’s a spoiler there - I shrugged and played again. These are not the hallmarks of a good story.
(2) Game events are often superficial. I killed a dragon. I killed a bigger dragon. I killed the biggest dragon. I killed the biggest baddest dragon with three people by my side. Great. Yawn.
(3) The interesting game events that grow organically are usually very small in scale. A boy fell down a well. Oh great, five minutes of challenge. Awesome story. You can try to claim that this connects to your other gameplay events to make a bigger story, but you’d be wrong. They’re all disjoint, disconnected nuggets. Mini stories at best, not one large good story.
(4) Sandbox games ala Fallout are just as disjoint. Sure, I picked a camp to defend. Then I never saw that camp again. Going through a game doing thirty unconnected things does not make a good story.
(5) When you’re the only important character in your story, your story is lacking. Every other medium recognizes that a star needs a supporting cast. Do not tell me your WoW buddies are your supporting cast. Your WoW buddies rarely show more depth than an NPC during play. And the depth they do show? That’s real life depth, not a game story.

I find it strange that people keep talking on this topic as experts despite the fact that nobody is approaching the problem in a meaningful way. Calling cutscenes “evil” and “the worst storytelling mechanism” isn’t a credible statement when they’re still the only actual storytelling mechanism being used. They’re the only thing currently providing character depth, over-arching goals, and novel events that do not fit the mold of the gameplay. No amount of opening up the world or allowing character choice has yet to change this.

To drive this point home, a challenge: ask people to tell you the story of their favorite games. If they start talking to you about their choices and what they did and all their crazy exploits, well, awesome. Clearly they’ve crafted their own story. But I’ll wager they’re going to start talking about the elements that were revealed to them via text elements, audio overlays, and cutscenes. Because at the end of the day, the really interesting stories are still the ones being told, not the micro stories being “created.”

This is not all to say that I think cutscenes are the end-all-be-all to storytelling. I actually agree that we can do better. Right now, I think games like Half-Life and Bioshock and to a lesser extent Arkham Asylum strike a really good balance. In Half-Life and Bioshock, cutscenes exist in a way, but they never take control from you - you’re being given a compelling story without being yanked from the game. Arkham does yank you away periodically, but usually for very short periods that aren’t particularly distracting. I’ll take these over what my friends create in WoW any day.

Because I’ve heard what they’ve done in WoW, and I nearly choked and died in front of them out of boredom and spite.

I laid a trap, and you sprang it beautifully!

|