Monday, June 3, 2013

"I only speak two languages, English and Bad English"- Bruce Willis, The Fifth Element


That quote might as well be from me. 'Cept lose the "English" part. At least that's the case if you think about the term language in the typical sense. It's not for lack of trying either, I took multiple years of Spanish to little avail. 

That being said, if your definition of language is a bit looser, I probably speak more languages that most people. By my count I can "speak" at least 5 languages well, and I could probably get by with a half dozen more. The languages I speak are not your typical verbal kinds, for I am a programmer. If you want you can call me the "computer whisperer", but that'll never catch on. So where am I going with this?

In one of my earlier posts I mentioned my interest in video games. At the writing of this document my job is actually making video games (every little boys dream job I know). Making video games is fun and I enjoy it, but (and this is the point I wanted to make) there is a down side to being a video game programmer. 

MAGIC. To some people this is how video games and technology in general works. If the person I'm describing is you and you like it that way stop reading now, lest your magical kingdom come crumbling down.

There are a few very generic devices we programmers tend to use a lot, I'm only going to focus on one here though. TRIGGERS. Triggers are a very useful in programming, they are however a double edged sword. 

So what is a trigger? Typically a trigger is waiting for a specific event to occur. When that event happens it will 'trigger' some code to run. In most cases this is fine and works quite well. A good example would be automatic doors. They work in a similar way in video games to the way they work in real life. Automatic doors work by waiting for an object to be in front of their sensor, then the sensor tells the doors to open. In a video game it would probably work about the same, although the way it would get there would be a little different. Instead of the sensor being on top of the door there would probably be something more like a "pressure plate" in front of the door. When an object landed on the pressure plate it would trigger the code to open the door. Take the object off the pressure plate and the code to close the door will kick on.

So that's some of the good things about triggers. The down side for triggers is pretty detrimental though. I'm going to bring up two key examples of bad trigger usage. Example 1: Dead Space. The first time you play through dead space it's a pretty scary game, stuff busting out of walls just as you turn the corner, crazy things happening at just the right time. The first play through is great... unless that thing that popped out killed you. Then you have to play through the spot again, but this time you know exactly when and where that monster is going to be. Those events I just described are all trigger based. While the triggers give the control needed to pull off such excellent scares, they also make the game predictable and boring, at least after the first play through.

Example 2: Halo: Combat Evolved. Near the end of the game you get  in a situation where the ship you're on is getting ready to blow up. The core is overloading and is about to blow any minute!... as long as you hit the trigger. If you would prefer hide in a corner for hours on end you could just do that instead. The game does redeem itself with a totally awesome timed driving sequence. The problem with triggers here is flow of the game, it completely  takes any urgency out of what you might have been doing. I remember when I first played it I didn't know about triggers, so you know what I did? I ran. I ran as fast as I could. Because the ship was about to blow up. Was it actually going to blow up while I was still fighting my way out? no, but my urgency to try and escape was off the charts. And you know what? IT. WAS. AWESOME. 

So I guess what I'm trying to say is this: I wouldn't trade my computer science knowledge for anything, it's gotten me where I am today. But that knowledge comes with a price, I may never get to appreciate the Magical qualities of games the way I did when I was a kid. And while it's sad that I may never have that feeling again, the fact that I can probably figure out how to make my own game that does the same thing is pretty sweet.

1 comment:

  1. Or, like in Legend of Zelda Wind Waker! There are triggers which occur in one room and affect another. Take one Cosmowright's speed runs. He explains how if you travel across a certain spot in one room, it affects the spawn of a mob in the next. As a speed runner, you find a way to exploit that trigger by avoiding it and the following encounter. Triggers can be so cool once you discover them.

    ReplyDelete