Oversimulation

By Shamus Posted Thursday Jun 14, 2007

Filed under: Projects 27 comments

I’ve run into a lot of problems with oversimulation in the past, where a programmer tries to replicate the behavior of a complex system with brute force. I’ve done it myself, and I’ve witnessed the results when others did it. The results are usually time consuming, maddeningly complex, and prone to a variety of hilarious failure modes. If you’ve ever played a buggy driving game where complex crashes led to nonsensical results, then you’ve probably seen oversimulation in action.

I’ve seen several games recently where heaps of random objects will “twitch” and “bounce” on top of each other instead of coming to rest. I also remember playing a game (back in the late 90’s) where two cars managed to intersect during a crash. They began to jerk around wildly, each attempting to come to rest on the ground but then “bumping into” the other car. This would nudge the other car up, causing it to fall harder, causing it to bump back harder, and building a nasty feedback loop until one of the cars was knocked free of the impasse and blasted into the stratosphere. Made me giggle. Not that I’ve seen the source for either game, but in both cases I suspect oversimulation is the source of the problem.

The key to making a good simulation is knowing when to replicate and when to approximate. Keeping in mind that in videogame it doesn’t need to be right, it just needs to look right.

Gravity is the most obvious example of something to replicate. The mathematics behind it are astoundingly obvious and well-known. It wouldn’t save you any time to “approximate” the effects of gravity. Just make everything fall at the correct rate and it will look right.

On the other hand, tires interacting with the road is a far more difficult subject. The SHAPE of the tires is exactly the sort of thing you want to approximate. Tires are not perfect cylinders. Off-road tires have maddeningly complex topography. They’re very knobby, with lots of deep groove patterns. You’ll kill yourself if you try replicate this shape in 3D and then do per-polygon collision on those bumpy surfaces as they touch the road, and then try to figure out how much “grip” you’re getting at the moment. The system will most likely fail, and you’ll find yourself adding more and more complexity trying to fix it. You’ll realize you’re not taking into account the effects of dust and dirt clinging to the wheels. Or what happens when the grooves become caked with wet mud. Or you need to account for the way tires bend a bit to “embrace” a small convex surface, like small rocks or imperfections in the road. Or take into account structures which should puncture the tire. Things can get impossibly complex very fast if you try to replicate everything.

No, this is probably the perfect time to approximate. For the purposes of collision with the road, treat all tires like perfect cylinders, and then have a few variables (smoothness, temperature, and a guess about how much of the surface area is touching the road) govern how much “grip” you’re getting. This method will be easier to code, less CPU intensive, and will most likely look far more realistic.

I think a good sense of when to simulate and when to approximate is more important than a deep understanding of physics when it comes to writing a good physics engine. (Although finding someone with both is always nice.)

 


 

DM of the Rings CXII:
Insubstantial

By Shamus Posted Wednesday Jun 13, 2007

Filed under: DM of the Rings 106 comments

Continue reading ⟩⟩ “DM of the Rings CXII:
Insubstantial”

 


 

Fallout 3 Trailer

By Shamus Posted Tuesday Jun 12, 2007

Filed under: Game Reviews 38 comments

Via the Rampant Coyote I find this trailer… teaser… thing… for the “upcoming” Fallout game. It’s more than a year off, so the thing is more or less worthless as an indicator of what the final product will look like, how it will play, or if it will be any good. It does demonstrate that the developers have hooked into the “atmosphere” of the original, for that that’s worth.

There seems to be some controversy about what sort of RPG we’re going to get. Continue reading ⟩⟩ “Fallout 3 Trailer”

 


 

Prey: Nearing the End (I think)

By Shamus Posted Tuesday Jun 12, 2007

Filed under: Game Reviews 30 comments

I’m still working my way through Prey. Not much to add except for a bunch of minor observations:

The thing with the kids was thankfully a very small part of the game. There still hasn’t been any explanation as to why the main character acquiring “spirit powers” led to the preteen poltergeists, and now I’m far enough past it that I don’t think any real answers will be forthcoming. It’s just this weird thing that happened.

Continue reading ⟩⟩ “Prey: Nearing the End (I think)”

 


 

Sopranos: It’s over.

By Shamus Posted Monday Jun 11, 2007

Filed under: Rants 76 comments

In the past I have lamented about the lack of decent story arcs in American television. I talked about my profound disappointment with Sopranos, which I thought would have a coherent arc, but ended up being a soap opera for men. I’ve been anticipating that the show would simply stop rather than conclude. Looks like I was right. The finale has aired:

And playing against viewer expectation, as always, Chase refused to stage a mass extermination, or put the characters through any major transformation, or even provide his viewers with comfortable closure.

Yeah, I loved how he played against viewer expectations by not ending the story. How innovative! Maybe Final Fantasy VII should have played against gamer expectations by leaving out the last disc. Maybe J.K.Rowling should have played against fan expectations and just not written the last Harry Potter book. I stopped watching The Sopranos somewhere in season 4, and have been waiting to see what the end would be like before continuing. Based on this, there is no way I’m going to waste my time just so I can follow the tale to this dead end. What a shame.

To be fair, the show has a lot going for it. The acting, casting, and cinematography were on par with that of big-budget movies, and it was an incredible achievement to maintain that level of quality for 86 episodes. But for people like me who insist on a story, a point, a wrap-up, or some sort of closure, it’s still an incredible disappointment.

In this post I talked about some of the ways the show could have gone. One reader dismissed my ideas as “dumb and predictable”. Fine. But I suggest that they are all superior to the end we got, which was dumb, predictable, and pointless.

Someday television writers might get their act together and write a complete story*, but I’m not going to hold my breath.

* Babylon 5 being the rare exception. Can you believe that for all my ranting about complete stories, I have never watched B5? It’s on my to-do list, I swear.

 


 

DM of the Rings CXI:
You Can’t Take it With You

By Shamus Posted Monday Jun 11, 2007

Filed under: DM of the Rings 137 comments

Continue reading ⟩⟩ “DM of the Rings CXI:
You Can’t Take it With You”

 


 

Post 1,001

By Shamus Posted Monday Jun 11, 2007

Filed under: Notices 13 comments

This is the one thousand and first post to the site. WordPress has numbered it #1196, but that’s because there are a lot of posts that I start but later throw away, and WordPress doesn’t recycle those numbers.

For “fun”, I’m going to post the Useless Stats of my site as of right now. I posted my stats almost exactly a year ago. It’s funny to compare to the stats from last June, before I started writing DM of the Rings, and before the site grew to its current size.

Continue reading ⟩⟩ “Post 1,001”