The Theory of Games (16 page)

Read The Theory of Games Online

Authors: Ezra Sidran

BOOK: The Theory of Games
5.09Mb size Format: txt, pdf, ePub

“Right.”

 

The screens across the top row were labeled Chalk 1, Chalk 2, Chalk 3 and Chalk 4. The second row of screens were the HUDs for players White Knight 1 through White Knight 4. The third row of screens displayed HUDs for the section leaders and the bottom row showed 2D overview and tactical maps and the HUD for someone labeled ‘Package’. It didn’t look like Package was doing much in the game since the view from his HUD appeared to be the inside of a toilet stall.

It was a very good FPS. I couldn’t tell for sure, but it looked like they were humping well over ten million polys per minute with a frame rate of 60 frames per second.

 

“Time out,” the Authoritarian Man stopped me, “explain humping polys and frame rates.”

“Polys are polygons,” I went into semester one, day one lecture mode, “Polygons are the basic building blocks of 3D computer graphics. Maybe that’s a bad use of the term ‘building block’ because a block is made up of six polygons; think of the six sides of a die.

“A polygon is a flat surface. All computer graphics – and it doesn’t matter how complex the image is – are made up of a whole lot of flat surfaces. Even if we want to show something that’s round, like a tire, it’s made up of many flat surfaces. The more flat surfaces that make up the model of an object the rounder and smoother it will appear.

“Now there are two steps to creating computer graphics: the first step is modeling – that’s where we put together a bunch of polygons to create an object – and the second step is rendering, that’s where we do the 3D calculations to figure out what something looks like from a specific camera angle.”

“Okay, but how about something like the movie Shrek? He doesn’t look like he’s made up of flat surfaces. And what about Donkey’s fur or King Harold’s hair?” the Authoritarian Man asked.

Why did I know that Shrek was going to be the epitome of computer graphics for the Authoritarian Man? “Even Shrek is made up of polygons, lots and lots of polygons. And all of King Harold’s hair is made up of polygons, too. After we construct a 3D model of an object, like Shrek or Donkey, we then apply texture maps to the surfaces. In Shrek’s case the texture map is green skin. For Donkey they used a special program called a geometry shader that created a texture map of his fur and applied it to the polygons that made up his body. Lastly we add a bunch of light sources, select a camera viewpoint and then render the image. The faster we can render images the smoother it’s going to look. If you can render thirty images, or frames, per second it’s going to look as smooth as broadcast TV; so that’s the gold standard that we’re always shooting for.”

“So Shrek was rendered at thirty frames per second?” the Authoritarian Man asked.

“Well, no, actually, Shrek is a movie. It took many hours to render each frame for Shrek. Then all the frames were transferred to film which is then played back at 28 frames per second in the theater. Each scene in Shrek was composed of hundreds of millions, maybe billions, of polygons. They had far more detail than film could possibly capture so there was some serious overkill there. But that’s why Shrek’s face is so smooth and you can’t tell that’s it made up from all these flat surfaces.”

I got a reassuring nod from the Authoritarian Man. He seemed to understand the basics of CGI, computer graphics imagery, so I returned to Conference Room B at Site-R.

 

Stanhope turned up the audio in the conference room and I could hear the confusion of net chatter; a half-dozen or more people all talking at once. A gruff voice was demanding “Where is he? Where is he?” There were overlapping sounds of gunfire. Somebody was calling for a status report from White Knight Leader. On the 2D tactical display I could see multicolored triangles representing the players moving about and congregating near what appeared to be a women’s restroom. The gruff voice was now counting, “One… Two…” more gunfire in the distance and then a couple of minutes later Stanhope hit the pause button on the replay.

“Let me call your attention to this,” Stanhope said and with a laser pointer drew an imperfect red circle around part of the screen displaying the HUD for White Knight 1. A pair of legs had extruded from the ceiling.

I had to laugh. “It’s a clipping error,” I chuckled.

 

I looked up at the Authoritarian Man, and before he could ask I answered, “Don’t worry; I’ll give you the same explanation that I gave Stanhope.”

 

Technically a clipping error is what we call it when you can see through an object that’s supposed to be solid. The object in front is supposed to ‘clip’ the invisible parts of the object that’s behind it from view. But it can also refer to a situation when one object that’s supposed to be solid goes through another object that is also supposed to be solid. Remember that a polygon is just a set of points on a plane. The computer has to extrapolate the surface of the plane. Imagine we’ve got a football field, but we describe it to the computer by just recording the four points on the edges of the field, the extreme ends of each end zone. We don’t have to tell the computer about points on the twenty yard line or the fifty yard line or whatever because we’ve described the entire plane of the football field in just four points.

There are two basic reasons that clipping errors can occur: 1, there’s an error in the 3D database. The computer doesn’t know where in 3D space these points are. This could happen for a number of reasons. Maybe something walked into memory and trashed the database. And, 2, there’s a basic flaw in the algorithm that is used to determine clipping, or in this case, object collision. A lot of algorithms try to skip over checking for all collision or clipping points to save time. The theory behind it is that rather than check every point for clipping or collision just check every other point, or every tenth point or hundredth point. You get faster rendering times but you also get clipping and collision errors.

Before Stanhope could ask I volunteered that I didn’t know which was the case here – bad code or a bad database – until I looked at everything. “General,” I said, “I wouldn’t even hazard a guess at this point.”

“I cannot stress the urgency of this, Professor Grant,” Stanhope looked right into my eyes, “It is imperative that this program function properly before the Tuesday after next.”

 

“Do you know what that Tuesday is?” asked the Authoritarian Man.

“Nope,” I answered.

“It’s election day,” the Authoritarian Man answered.

 

 

CHAPTER 4.6

 

I followed Stanhope through the maze of corridors until we reached what must have once been an extraordinarily large gymnasium. The near side of the room held a row of high-end computer workstations. Arrayed on a work table in front of the workstations were a couple of dozen nVisor SX HMD units. The walls and the ceiling of the gym were covered in evenly spaced black and white disks. Each disk, which is called a ‘fiducial’, has a unique pattern cut out from the metal. I recognized the system from an abstract of an SBIR (Small Business Innovation Research,
i.e.
government funded) grant that I read a while back. When you put them together in a data matrix of fiducials you have a system for wide area mobile tracking.

 

I looked up at the Authoritarian Man. “You want a translation?” I asked.

“Yeah,” he nodded.

“HMDs are head-mounted displays for virtual reality environments. You put them on and you see, in stereovision, whatever the computer wants you to see. The nVisor SX is probably the top of the line. They cost about $25,000 each and there were a couple of dozen on the table so…(I stalled while I did the math)… that’s a cool $600,000 in toys right there.

“The fiducial system… by the way you know why they call the disks ‘fiducials’?”

“No.”

“Fiducial means ‘taken as standard of reference’ so in accounting ‘fiduciary duty’ means they didn’t cook the books. Anyway, I have no idea what the fiducial system cost. It’s one of those ‘if you have to ask you can’t afford it’ systems. Like I said, it was developed under an SBIR contract for the Army so you do the math. In conjunction with head mounted cameras it constantly tracks your position in 3D space.

“Bottom line is this: you combine nVisor SX HMDs with the fiducial tracking system and you’ve got a complete VR – that’s Virtual Reality – system where you can have a couple of dozen people running around in a gymnasium but the computer is keeping track of them in a completely different 3D space while feeding back to each user a unique view of what they should be seeing in the VR environment.”

“In other words,” the Authoritarian Man said, “you have the ultimate combat mission training environment.”

“That would probably explain all the weapons that were neatly stacked in racks on the other wall,” I volunteered.

 

Colonel Finley was waiting for us in the gym. “Professor Grant,” Finley began, “I’m here to make sure you have everything you need.” He handed me a 3 x 5 index card. “This will be your user name and password to get into the system. Do you need anything else?”

“Yeah,” I answered, “a pot of coffee and an ashtray.”

Finley and Stanhope left and I pulled up a chair in front of a workstation. I flipped over the index card and read the user name: HWANLEEPARK and the password: LEONIDAS both of which surprised me.

 

“Why is that?” asked the Authoritarian Man.

“Well, Hwan Lee Park is a professor specializing in VR at Carnegie Mellon,” I answered. “Why would they be giving me his user name? And, for that matter, where the hell was Hwan Lee Park? He was the VR expert. He probably wrote most of this code. Why isn’t he debugging it?”

“And the password?”

“Yeah, that was pretty weird, too. LEONIDAS was the Spartan king who died defending the pass at Thermopylae in 480 BCE. I didn’t know what any of this was about but I sure wasn’t getting a warm fuzzy feeling.”

 

I logged into the system, and started going through the code. There were hundreds of files. I have to admit it was pretty well commented; Park’s no slouch. But, still, I figured this was going to be a ‘needle in a haystack’ kind of a problem.

I took out my cell phone and thought I would give Katelynn a call and check in, see how she and Bill were doing. Needless to say I got an “unable to connect to network” message from my cell. Good thing Katelynn wasn’t there because she would have shot me one of those, “I can’t believe you’re that stupid” looks of hers. Here I am under a mountain in Pennsylvania and I’m trying to get a cell phone signal.

Finley came back in with a pot of coffee, a ceramic mug and a stamped metal ashtray. “You need anything else?” he asked as he put the stuff down on the table next to the workstation.

“No,” I answered, “not for now. You understand this is a very difficult problem. I can’t guarantee I’ll solve it within a week.”

“The security of the United States depends upon you solving the problem, Professor Grant,” Finley solemnly intoned and then he walked out of the room. I thought I heard the click of a lock after he shut the door.

 

CHAPTER 4.7

 

The Authoritarian Man looked up from a file that had been brought in. “Dr. Hwan Lee Park has been missing for almost three months. He was supposed to be back on campus at the beginning of the fall semester but he never returned after the summer break. His classes have been cancelled. According to his secretary he has not returned calls to his cell phone or numerous emails. I don’t suppose you have any idea where Dr. Park is?”

“Actually, Jim,” I answered, “I’m afraid I do.”

 

You can measure my progress on a project not by the lines of code that I’ve written but by the number of cigarettes stubbed out in the ashtray and the pots of coffee drunk. I don’t know how long I had been looking at the code but I was now out of cigarettes and I desperately had to pee.

I walked over to the door and tried the handle. It was locked, all right. I tried pounding on it a few times but I doubt if anybody heard me.

I turned around and scanned the room, looking for what I don’t know, perhaps a door with a men’s room sign on it. What I found, instead, was a security camera embedded at the point where the corner of the room met the ceiling. I walked over to the camera and did the universal “I’ve got to pee” pantomime and pointed towards the locked door. Not even sixty seconds later I heard a key in the lock.

Colonel Finley walked in. “Sorry about that,” he said, “security, you know.”

“We are under a freaking mountain,” I replied, “how much more security do we need? Don’t ever,” and I looked straight into Finley’s eyes, “ever lock me up again. Do we understand each other?”

“Yes, of course,” Finley replied, “It won’t happen again.”

“Okay,” I said, pretty pleased with my little victory, “now, which way to the pisser?”

 

After I finished my business I told Finley I needed to get another pack of smokes from my bag. I followed him back into the labyrinth of corridors until we stopped in front of a fairly nondescript door. Finley opened it and I walked inside.

My room could only be described as mid-60’s military industrial: grayish bare walls, linoleum floor, two beds, and one chair. It had probably been designed for two low commissioned officers to share. My bag was lying open on one of the beds. I fished out the carton of smokes, grabbed a pack, and pushed past Finley into the hallway, walking with purpose in what I supposed was the direction of the gym. Finley hurried after me. “Do you need anything else?” he asked.

“Yeah, more coffee,” I answered, “Keep it coming.”

 

I spent 44 of the next 48 hours going over the code. Maybe I got four hours of sleep back in the room. The code was well written, well commented, I could even duplicate the clipping bug but not consistently. Those are the hardest bugs to find: intermittent bugs, things that go wrong
sometimes
but not consistently. If you can duplicate a series of steps that always leads up to the bug you’ve got a fighting chance to find it. But these clipping errors were just random; they happened at the weirdest times; sometimes at the beginning of the scenario sometimes at the end.

Other books

The Prince by Niccolo Machiavelli
We Are Not Eaten by Yaks by C. Alexander London
Red Dog by Louis De Bernieres
Scraps & Chum by Ryan C. Thomas
Beloved by Antoinette Stockenberg
Blood Double by Connie Suttle
The Year of the Rat by Clare Furniss
Down the Hidden Path by Heather Burch