Blog Archives

← 2004 
Months
Dec

Links

Kevin
Charles
Thatcher
Aaron
Ryan
Ignacio

Goooooooolllllld!

Oddworld: Stranger's Wrath is off to MS Cert. Once they sign off, it's off the the replicator, and we can kick back and slide out the French and German versions after the xmas break. This is actually our second trip into the Cert box for the english version. We got kicked this Monday for some minor stuff that we quickly fixed. Luckily, we were also able to integrate some fixes that we made for the localizations that fix some rare crashes that didn't come up during the primary QA process.

Looking at the perforce depot, the first change was put in on November 5th, 2001. There were 101,332 checkins to the depot over the course of the project, of which roughly 75k were done by humans, 25k by our build process. That's an absolutely astonishing number to me. If you guess that there are about 250 working days in a year, and the OSW team averaged about 20 people over the course of the project, then you can estimate that on average every person on that team was making changes to the project 5 times a day. The fact that the game is solid despite that murderous amount of churn, 4 or 5 demo builds placed randomly in the middle of the schedule, and a fairly lackadaisical QA team at EA makes me proud to be on that team.

3 years, and the last of my twenties went into this one. I can't wait to see it in a green plastic DVD case so I can be sure it's over.

Large-Scale C++ Software Design: John Lakos

Nick Wheeler, one of my favorite professors, liked to say that the best books about physics and mathematics were "short works by masters." Ideally, a book should be about a big idea, written by someone with a virtuoso's grasp of the subject and the talent to pare it down to its simplest form. This is a huge book about a medium-sized idea.

To be fair, this book plugs a gap in the literature on software design. When you read, say, Booch or Meyers, when they say "design", they mean exclusively logical design. They're entirely concerned with the relationships between the modules and classes you're working with. This book is the only one I know of that comprehensively deals with physical design: how those classes are physically laid out in source files, and the consequences for development efficiency. Anyone who has ever spent 5 hours of an 8 hour day actually programming, and the other 3 hours waiting for the program to compile knows that those consequences can be huge.

Unfortunately Lakos spends endless pages devoted to subjects that anyone who's ever written code for a living should either a) already know or b) instantly grasp in a sentence or two. At 800+ pages, the only non-reference books on my shelf that compare to it in length are McConnell's phone books and the three volumes of Knuth. If we were to assign elements to these to indicate information density, Lakos is lithium, McConnell iron, and Knuth is somewhere in the transuranic portion of the periodic table. As such, the book is probably best suited for someone who has done plenty of coding, but needs to work on their discipline a little bit, i.e. students taking their first professional job.

Luckily, the author has provided an out. If you turn to page 815 (!), you will find in Appendix D a list of all of the aphorism, principles, and tips from the main text. It's like a list of koans that distill the entire book down to a manageable length. If you squint at these 17 pages just right, this is a small book by a master. I promise you, reading these will give you 80+% of the value of the entire book. There are page references with each tip in case the meaning isn't instantly apparent.

Recommended if you are about to begin working on your first large software project, or if the compiles on your current project are taking more time than it takes to get to Starbucks and back. Make sure to buy a used copy though, Powell's will frequently have them in stock.

Prime Obsession: John Derbyshire

I can say with confidence that this is the most interesting book for laymen about the Riemann Hypothesis ever written. Derbyshire has written a book that is roughly equal parts Men of Mathematics and introductory number theory. Since he's pitching at a general audience, the introduction to the complex plane and calculus can drag a bit if you've encountered them before, but eventually he's sketching results that you're not likely to have encountered unless you've taken analysis or number theory courses at an undergraduate level. The result is an extremely approachable introduction to the most famous outstanding problem in mathematics.

One area where I felt the book could have done better was in the annotations. As an example, on page 259, Derbyshire refers to two theorems that allow the number of zeta function zeros in the critical strip between two heights to be compared to the number of zeros on the critical line. This is a key component in verifying that there are no violations of the Hypothesis up to a given height above the real number line. It wouldn't be appropriate to his main text to give a detailed explanation, but even in the footnote for the section, he refers to the theorems only as "Theorem A" and "Theorem B". A Mathworld link or some other more detailed reference would have been ideal here.

At 350+ pages, Prime Obsession will keep you tied up for a while. I'd recommend it if you recognize at least 3 of the following 4 names: Euler, Ramanujan, Russell, Hilbert. You will really enjoy the book if you know what an Erdős number is, but don't have one. You will certainly be bored by it if you have an Erdős number less than 4.

Sneaking in Bad Legislation

The lame duck Senate might try to sneak through a really nasty Copyright bill before this session expires. (Really, before the excerable Orrin Hatch's chairmanship of the Senate Judiciary committee expires.) This bill would do wonderful things like make it illegal to tape a movie from broadcast TV, and edit out the commercials for later viewing. Lovely. Since I'm in California, writing my senators (Boxer and Feinstein), has roughly zero chance of influencing their views or votes, but what the hey.

Senator [Feinstein|Boxer],

I am writing to you today to urge you to vote "no" on HR.2391, the CREATE Act, if it comes to a vote in the Senate. This bill further unbalances an already badly skewed copyright regime.

In addition, I urge you to adjust your position on such intellectual property matters. As a constituent, I note that you allowed the Digital Millenium Copyright Act, a similarly flawed piece of legislation to pass without registering an objection. That bill has created barriers to innovation in the the technology industry, but has created only small inconveniences in the everyday life of consumers. HR.2391, and upcoming regulatory changes such as the "Broadcast Flag" will have a far greater impact on everyday life. It is not likely that such legislation will go unnoticed as it has in the past when Tivos and VCRs start to lose functionality that upsets the MPAA or the RIAA.

Dave Moore

To see why these letters have no shot, check out the excellent opensecrets.org website. In particular: Boxer, top contributers (Time-Warner, Viacom, Sony, Disney, and Vivendi) and top catagories. Feinstein, top contributers (Disney, Time-Warner, and Vivendi) and top catagories.

These numbers are for Boxer's 2004 race, and Feinstein's 2000 race. It's extremely frustrating to me that I can't find candidates to vote for in this area that aren't completely in the pocket of the movie and music industry.

Fun with CSS

New design for the site, whee! Most of the design I ripped off from various entries in the css Zen Garden database. Most notably, the bulk of the CSS for the site came from Ben Nolan's Utilitarian entry. Most of the layout is cribbed from Nelson Minar's excellent blog.

The site also validates as XHTML 1.0 Strict and CSS again. I'm sure that will come in handy. For fun, you can see what the site looks like with all of the CSS turned off here.

Hm. There are some problems with IE, apparently. Fun. Ok, that's fixed. Standards compliant browser my ass.

Finally

Commercial CG that doesn't make me wish that computers were vastly more expensive! The latest TV spots in the HP Invent ad series are really sharp. (Click, Click.) The CG doesn't get in the way, and they obviously spent a lot of time and thought to make it convey the message that it's effortless to make and manipulate digital images with HP products.

Another bit of CG that I really liked recently was the What Barry Says propaganda short that's been popping up in various places. The visual aesthetic is great, but I most admire the way the transitions play with constructs that only parse correctly from one viewpoint, creating a flowing visual that doesn't jar the viewer despite radical changes in scope and subject. (n.b. the audio track is a little Black Helicopter, turn it down, it won't detract from the visual.)

It's particularly nice to see CG coming out that takes advantage of this "limitation" of computer rendering to create effects that would not be possible if the image were truly 3-dimensional. If the Barry viewpoint tricks were presented as a proper pair of stereo images, you would spot the wires right away. This is the same technique Escher used to make his famous images that fiddled with perspective; taking advantage of the fact that a 2d projection of a 3d scene causes several points in 3-space to collapse to the same point in the picture plane. Since this stuff is my stock-in-trade, I really like it.

Non-geeks stop reading here
As a pedantic aside, it would be possible to recontruct some the HP ads if we were rendering stereo pairs, but only for the effects in which the actor drapes the picture frames over his head. You would have to replace the texture that you had been rendering to the frame with the pixel for his face at the exact moment that the point on his face intersected the texture plane. The images that you'd have to use for textures wouldn't be nearly as neat and tidy, however, since the frame and his face are in motion. It would have to be all stretched and smeared, as if you'd moved a piece of paper in the middle of a photocopy. The effects in which the piece of paper "snaps" an image while held in front of his face would be impossible to make seamless unless you make the assumption that the viewpoint is infinitely far away, in which case your stereo pairs collapse to the same image.

Small bug fix

Small update uploaded for perforce_rss to fix a bug in the GMT date calculation. Also adds a new parameter for the output location of the tempfiles used in creating the feed document.

iPods Nerfed: you're surprised by this?

So prominent folks are complaining about Apple nerfing the iPod to break the "iPod Download" app. How is this news? Look, when you buy an iPod, you're signing into an implied contract with Steve Jobs that goes something like: "You will give me a pretty object with superior industrial design, and in return, I yield the right to use that object as I see fit." This is not a new thing, this is essentially the deal that every purchaser of a Macintosh has signed up for from day one. Jobs believes in certain business practices that have nothing to do with benefitting his customers.

Apple's products are beautiful and well designed, but like concept cars, they are essentially objets d'art with little or no functional value if you stray outside the narrowly defined parameters of use set by the creators. If you want to do useful things with your music player, get yourself an iRiver iHP. These are the most open players on the market, slightly less beautiful than iPods, but at least you can do whatever the hell you want with them...

Perforce to RSS

Presented for your approval, perforce_rss, a small Perl script to publish changelist events from a Perforce source control depot as an RSS channel. It's pretty braindead right now, but it's nifty enough at this point to throw up on the site. I'm releasing it to the public domain, so do with it as you will. There are still quite a few todos though, so this is presented "as-is".

Fishing?

This is not how to make GPS enabled games folks. Fishing? Presumably there is some x such that you will never catch a fish greater than x pounds, after which there is zero point in playing the game further. This may be a feature of the business plan, but it's certainly not good game design. "I caught a bigger bluefin tuna than you," is a sentence that will never be uttered with the same satisfaction as "I found an upgrade for my character on my hike last weekend and I am going to kick your ass. Have at you!"

Clearly, at some point in the future I am going to have to start writing the sort of games that will get my son off his ass, where he's been playing games of the sort that I'm making now.

The Debates

I've been very impressed with the debates thus far, although I'm pretty sure that I'll be disgusted again after the Town Hall on the 8th. (The moderater of the VP debate asked silly, rambling questions, I'm supposed to believe Joe Random is going to do better?) The tone has been fairly even and civilized, which is a refreshing change after the last 12 vitriol filled months. It would be nice if that sort of dialogue could be sustained over an entire campaign season, rather than clogging the airwaves with slime-by-proxy.

Special mention should go to the way both VP candidates refused to spew nonsense when the moderator wanted to use the gay marriage issue to create sparks. I got the impression very clearly that Cheney thinks that the party is in the wrong in this case (which doesn't get him off the hook for standing behind the position, even though he has little choice), and Edwards managed to state the Democratic position without making a huge issue of the VP's personal stake in the issue.

Imperial Hubris: Anonymous

I found this book to be something of a mixed bag. His analysis of the motives of Al Qaeda and related organizations is the most on-target, honest reporting on the men and their motives that I've seen anywhere in the American press. In particular, his discussion of the error in defining what we are facing as "terrorists" rather than "insurgents" is spot on. The "they hate freedom" rhetoric that comes from the current American administration has always been patently false, and the author gives us a good look at the strategic dangers of fighting against a misconception of the enemy. You do very different things when fighting a low-intensity, assymetrical war with a non-state opponent rather than a terrorist organization.

The analysis of the writings of Bin Laden is particularly refreshing. Bin Laden's case against the U.S. is laid out in explicit, itemized detail, and while I (obviously) can't agree with many of the points in Bin Laden's fatwas, it's clear that he could care less how easy it is to start a small business in America, or our porno industry; he would be just as pissed at a Stalinist dictatorship that executed the policies he's objecting to. The discussion of the true motives of Al Qaeda should have been up front and center in American political discussion, the "they hate freedom" sound bite notwithstanding. It doesn't take much reading or deep thought to see that this view of Bin Laden is ridiculous, but early discussions of what American policies caused the attacks on Sept. 11 were purposefully derailed by rhetoric confusing "caused" with "deserved". Immediately, this set any reevaluation of American foreign policies that have been causing mistrust and hatred of us outside the bounds of debate in any significant national forum. This has greatly hampered our ability to make reasoned judgements about whether the cost of, say, propping up repressive dictatorships in the Middle East is worth the increased enmity we earn through doing so.

The last bit of the book, where the author discusses potential remedies is where the book comes of the rails a bit for me. Most of his suggestions are good, but one of his points is that we cannot commit troops or treasure to the preventing of civil wars and genocides that don't directly bear on our national interest. "We must learn to bear with equanimity the death of others," is his way of putting it. His quote from John Quincy Adams to illustrate his point: "[America] is the well-wisher to the freedom and independence of all. She is the champion and vindicator only of her own," I find unconvincing post-Holocaust. There must be some middle ground between intervening to stop genocides in Darfur, and our current adventure in Iraq that would better serve our national self-image than blithely ignoring atrocities that don't affect people that can't harm us or buy things from us.

Webslinging

Played through Spiderman 2 this weekend. I was a little apprehensive about the game, since some of my coworkers were heaping scorn on it last week, but the game is really good. Granted, some of the graphical elements suck, and some of the animation looks like King Kong era stop motion, but if you can swing around New York for half an hour and tell me that this is not exactly what you wanted to be doing when you were 10, then you're a freak. I know that's harsh, but it's true.

My only complaint with the actual substance of the game is that the combat is either too easy, or silly hard. In particular, some of the boss fights with Doc Ock were ludicrous. Putting large damage elements into the environment is fine, but the developer must, MUST, MUST make sure that these are predictable to the player, and consistent in their effect. It's just frustrating to be thrown by a plasma blast, and because you randomly hit a pillar in the environment, get bounced back into the plasma for 2 or 3 more hits before you regain control of the character. Not good. Makes me want to throw the controller at the screen. It was like finding a fly in the last bite of a really good creme brulee. Fortunately, after you finish the main (read: movie) storyline, they let you just screw around in the city, so it's easy to erase the taste of the poor design from your mouth.

Confidential to Joel in Cambridge: Look at this. I'm home this weekend, and I fail to call. Great.

More Outside Gaming

So it looks like some people are experimenting with the concept of using GPS devices to create novel games that involve getting outside to play. GPS Tron is a lightcycle game that's played just as you'd imagine, running around with GPS units to lay down the walls that you try to get the other player to run into. It's obviously very rough, but the core idea looks pretty fun. Ideally you'd combine this with some sort of augmented reality support (see ARQuake for an example).

New Games, Old Games

Full Spectrum Warrior is out. It's a fun game, ships on the Xbox with a ton of content, co-op play, and somewhere in the range of 1 gigabyte of content on the DVD. So naturally, the game that all the programmers at Oddworld are currently addicted to is Tetris Attack, a game that ships on a 1 megabyte (or so) cartridge, and runs on a gaming platform that can be comfortably simulated by your average cellphone.

Ask and ye shall receive

Cool, a GPS attachment for the GBA! Time to get going on those location enabled games. Also, make it smaller, please.

New Game, Old Methods

I haven't bought City of Heroes yet, though I'm likely to pick it up at some point. The only thing holding me back at this point is that I'm completely ticked off at the distribution model of the game. Why must I walk to the damn store, and pay fifty bucks for the damn game? I'm supposed to shell out $15 a month to play the dang thing, why must I pay for the crappy cardboard box? Just let me download it, dammit! I'm going to sign up, forget that they're charging me, just like they expect a significant fraction of their user base to do, and they'll make stupid amounts of money by automatically debiting the accounts of thousands of forgetful geeks. Nailing me for an extra $18 bucks or so after the COGs and retail markup is accounted for is just annoying. It's the game equivalent of a cop who breaks his baton on your kneecap and sends you the bill for a new one.

Developers stuck in bad funding deals with publishers are trapped into this model, and it's possible that Cryptic wound up in that trap, but the publisher is NCSoft! I would have expected them to be a little more forward-looking, given that they have nearly infinite cash from running Lineage in Korea. They know that all the juice from running one of these things comes on the backend, and they have all of the infrastructure in place to completely sidestep the normal distribution channel. You know that there had to be people agitating to distribute online, but were overruled by the suits. Sigh.

Rambling about games

Engadget has a post about the first cell phone that's excited me in quite some time. Good screen, small, GPS built in, and expandable storage. (Through cards, unfortunately, rather than a microdrive, but nothing's perfect.) Why must all the good toys show up in Japan first?

It'll be fun to see what sort of new games will pop up once you have a serious cellphone platform for them. GPS and decent amounts of storage are key, I think. The really interesting new game concepts are going to be based on location, proximity, and real-world activities. For instance, combine the flash mob meme with an RTS, and stage giant real-world battles. Commanders would direct from above, with an interface that translated the GPS location information from the players into something very much like a traditional RTS. People in the fray could conduct battles by playing quick heads-up games with opposing team members. The interesting bit would be that unlike a computer game, you'd be directing units with genuine autonomy. What does an RTS play like when your units decide to completely ignore your directives? Would players even be interested in playing anything but the commander? There are a ton of fun questions to ask here. Could you work "artifacts" into the game? (Cannons that can remove players from the game when "fired" into a crowd, nerf swords that disable any player if it gets within a foot or so of the player's phone.) How do you represent defensive structures? Do you use natural structures? Invisible "virtual" structures?

Now that I've got all of this written out, I don't think the idea of set-piece battles with hundreds of players is workable. Fun, but it definitely falls into the category of "never-gonna-happen". So, maybe a stealth game, with fewer players. Play it on large areas, with few people. Use some downloaded satellite imagery from the USGS National Map site. (1 foot/pixel color satellite photos. Their interface blows, and it only covers major metropolitan areas, but the imagery is unbelievable.) Moving games off the couch and into the real world is going to be a lot of fun in the next few years.

(Also now that I'm reading this, the idea of a bunch of gamers running about in a field with their phones out also seems pretty laughable. Maybe we'll all just play Pokemon outside.)

Wheat Thins

OK, so this isn't exactly an earth-shattering question, but why is the quality control of Wheat Thins so terrible? I've consumed quite a few of these things in my life, and I swear, I never know what I'm going to get when I open the box.

Roughly a third of the time, you get proper Wheat Thins: textured, salty, golden brown. (The fundamental theorem of Thins states that crunch + salt = good.) The rest of the time, you get flat, untoasty poker chips, lightly dusted with a powdery substance that might be salt, but has no power to make my tongue happy.

Why is this so hard for Nabisco to get right? I don't mind variations in food that is made by humans, but this is the sort of cookie cutter, no surprises, snack food that is supposed to be the same every time. No one would tolerate it if every third box of Chips Ahoy was delivered with no chips, so why is it acceptable to deliver a product that is basically cracker and salt without the salt?

Virtual Hosting

I'm considering moving onepartcode.com to a virtual hosting provider. I'm starting to get very annoyed that I can't just ssh into my account and twiddle with files manually. Especially given that blosxom depends on file timestamps to determine the date of a posting, dealing with my site through ftp is just a pain in the ass. I can't correct typos without moving a post to the front of the queue, which for a compulsive proofreader is a problem.

The only thing holding me back at this point is that most of the reasonable hosting plans I've found are in the $20 per month range, which is just too much extra dough for the amount of use I'm giving the site. Hopefully competition will push that down before too long...

Indie Game Jam

So Thatcher, Charles, and Ryan are back from the Indie Game Jam. Check out the results, the games are reasonable counterexamples to the idea that totally physics-based gameplay is always boring. (As of this writing the games have yet to be posted, but they'll be up soon.)

I love the idea of the Jam; I wonder if you couldn't take the idea a bit further. For instance, the average game takes, let's estimate, 10 people about 1.5 years to develop. Call it 30,000 hours of effort, just to toss a number at it. The jam winds up generating games in about 50-60 hours of work, which gives us a speed up factor of about 500; call it two orders of magnitude. (I'm ignoring the fact that the jams always start out with a technology base, but I'm guessing that the estimate is still pretty close.) What if you could knock off another two orders? At that point, you'd be sketching a game in about 30-60 minutes, which might move it into the realm of performance art. Lord knows people have done more boring things on stage in that genre.

Probably to get the time requirements down, it would have to be almost all level design for an already complete game. So invert it: have the audience design the level, and the programmer/artist/m.c. is there just to mediate the experience. Buy a bunch of digitizing whiteboards (or conversion kits), and cover the walls of a small room. Put some wine and food in the middle, give the audience the pens, and let them design a 2d platformer level. Have a couple of PCs or consoles in the room to test the level out, and email everyone a copy of their work at the end of the night.

Or, if you wanted to follow the theme of this year's Jam, just take two whiteboards, split the room into teams, and have them draw rigid body machines to "attack" the other side. The team that manages to fling, slide, or drop the most mass into the other teams region wins. You'd have to run this one as an iterative session so the teams could develop defenses against the other team's onslaught. The mediator's job would then be to enforce some rules to ensure a fair competition. Ideally the final level would resemble a sort of emergent Rube Goldberg kinetic sculpture.

It'll never happen, but it's a fun party to imagine...

More simple C#

Might as well put all of this stuff up. Surely my hosting provider's backup procedure is better than mine...

While I was in Portland a few months ago, I picked up a copy of Graham Stephen's String Searching Algorithms at Powell's. Fun little book, although given its size and scope, somewhat overpriced. Out of that: C# project number two. Eventually, this might wind up as part of a diff tool I've been thinking about for a while, but for now, it just does generalized string distance computation using Ukkonen's algorithm, and Boyer-Moore-Horspool searching. It's extremely general and inefficient, since the idea was that the symbols that would be compared would be entire lines rather than entire characters.

The next project I put up should be a little more substantial.

Tabview Extreme

So I've been playing around with C# lately; this was the first project I did a few months ago. Now I've started paying attention to onepartcode again, I'm going to throw it up, since it's mildly amusing. Tabview is a little utility written by Casey Muratori that we use at work for viewing memory debug dumps. The idea is that leading tabs are interpreted as tree depth, so you can collapse large sections of your text file for ease of interpretation.

Tabview Extreme Screenshot

No program description is complete without a screenshot, so here are some highly fictitious memory stats displayed in TVEx. Note that we've included 200% more interface than Tabview, and our .NET technology guarantees that you'll receive more value for the dollar than you can get from Tabview. Download Tabview Extreme 1.0 now!

Failure

Under the heading of "stuff that didn't work", I'm stuffing my attempt at spline-based audio compression. The thought was to take advantage of large scale structure in audio data to losslessly compress it by fitting a spline to the data, and encoding the residual signal using standard techniques found in codecs like FLAC. Initial results were well short of encouraging, so onto the junk heap it goes. On the bright side, I did get some halfway decent spline fitting code out of it.

Here's what I completed before setting it aside. The code's a bit of a mess, since it was stopped mid-stream, but the spline code should be separable with a bit of effort. I was testing out a way of enabling/disabling exception handling in the library using #defines, but this turned out to be more trouble than it was worth. If I come back to it, that's definitely coming out, maintaining two error pathways is just a pain in the ass, with no real benefit.