Does Not Compute

By Shamus Posted Wednesday Apr 18, 2007

Filed under: Random 31 comments

A bit of code-blogging.

I spent some of yesterday afternoon debugging a very mundane bit of code. Nothing special. A bunch of memory space was getting trashed, as poorly managed memory is wont to do. I picked through the code and found some appaling bugs. (Which I had written.) The full code was a couple of pages long, but the thing boiled down to this:

void DoSomething (void *thing_in)
{

    void       *thing1;
    void       *thing2;

    thing1 = malloc (sizeof (*thing_in));
    //Do some stuff with thing_in and thing1.
    thing2 = malloc (thing1, some_new_size);
    free (thing1);
    //Do some other, unrelated stuff. Then...
    memcpy (thing2, thing1, sizeof (*thing1));
    //now that i just got done copying a free'd block of memory to thing2,
    //I'll do some more stuff with thing2.
    free (thing1);
    free (thing2);

}

Now, the actual code had all sorts of crazy stuff going on between these steps that obfuscated the mistake, but at the heart of it this is what I was doing: I was free()ing blocks of memory more than once, and copying stuff from recently unallocated blocks of memory. Now, this in and of itself is not very remarkable. If you lose your head you can easily make a blunder like this. The thing is, it should result in a crash. What I’m doing above is programatic sepuku.

But in this case the program did not crash. At least, not every time and certainly not right away. Not only did it not instantly die when it executed this code, but it more or less did what it was supposed to, or failed in innocuous ways that weren’t readily apparent. It called this function several dozen times a day, and yet the program ran on like this for a span of nine months without anyone noticing something was seriously amiss.

There was another program that would restart this one in the event that it crashed. I don’t know how often that happened. I’m afraid to look. I’m terrified that I’ll discover my program ran like this for all that time, like a man going on and living his life without noticing that a couple of his major internal organs have been removed. This is not supposed to be possible.

The whole thing gave me the willies, really.

LATER: Edited the example to better show what the problem was.

 


 

Games Are Art

By Shamus Posted Tuesday Apr 17, 2007

Filed under: Video Games 45 comments

Roger Ebert made the assertion that videogames aren’t art. Demosthenes offers a rebuttal, which is so comprehensive that there is little for me to add. Jaquandor takes on the role of a cunning provocateur by soliciting my opinion on the matter.

But for people making the games-cannot-be-art assertion, I would issue the following assignment: Give me your definition of art. This is a difficult task, to come up with a description which would include all of the established and accepted forms of creative expression and yet somehow exclude videogames. It will require some degree of verbal contortions or qualifiers which have no other purpose than to define around games.

It is strange to see Ebert (who I enjoy reading) dismiss games like this, although it doesn’t get me too riled up. For a while there were people who assured the rest of us deluded fools that Rock and Roll wasn’t music. Without exception this claim came from people who hated Rock music. The games-aren’t-art position is the same thing in another form. It’s coming from people who don’t play games and don’t care to. That’s fine. His position will go the way of the Rock-and-Roll haters in another generation. The only time I get heated up about this issue is when I see it in this context:

“[There is] no conveyance of ideas, expression, or anything else that could possibly amount to speech. The court finds that video games have more in common with board games and sports than they do with motion pictures.”

— U.S. District Judge Stephen N. Limbaugh Sr. (2002)

And here Limbaugh demonstrates his own art, which is the weaving of ignorance and apathy into the very fabric of our laws. I don’t care for the performance myself, but I have to hand it to him: The guy is good.
Continue reading ⟩⟩ “Games Are Art”

 


 

The Creativity Cycle

By Shamus Posted Tuesday Apr 17, 2007

Filed under: Random 15 comments

My work recently has brought the following into sharp relief. Whenever I’m working on a challenging project, I follow a very predictable pattern.

  1. Enthusiasm: This is going to be my best project ever!
  2. Unease: Hm. This is getting tough.
  3. Dismay: This is impossible! It’ll never get it!
  4. Defeat: What a waste of time. I must destroy this project and erase all traces of it so that my lack of talent is never exposed to the world.
  5. Grim resolution: I’ve come this far. I might as well finish it, even if it sucks.
  6. Hope: You know, I’m starting to get it. I might pull this off after all.
  7. Elation: I did it!
  8. Hubris: That was easy! Next time I’ll do something twice as difficult!
 


 

Jade Empire: Nitpicks

By Shamus Posted Monday Apr 16, 2007

Filed under: Game Reviews 12 comments

How am I supposed to write a nitpick post about this game? It’s like, yeah this supermodel and I went out last night. We ate at a five-star restaurant and then we went back to her house. I played Guitar Hero on her PS3 while she played backup for me on a real, actual guitar, on which she is a virtuoso. But then she didn’t have any of the bonus packs for the game and I was tired of all the original songs so I just went home. Still, as I have noted before, complaining about videogames is part of what I do here, and I refuse to be denied my pleasure because the game doesn’t have anything worth complaining about.

The nitpicks, in no particular order:

It doesn’t make sense the Jia had the last part of the amulet. Wouldn’t she have given it to the Emperor? They had ready access to airships and he was keen on getting it.

I really would have liked to be able to change clothes or customize my character. Since part of the plot takes place in pre-rendered cutscenes, the character had to remain static in order to match the pre-rendered stuff. Now that the game has been ported to the PC, (and thus we are no longer limited to television resolution) the pre-animated stuff isn’t that much better looking than the game itself. Some might argue that the realtime stuff looks better. It’s certainly crisper. Still, it would have been fairly expensive to change this for the PC and I don’t fault Bioware at all. I just… you know, wish.

In KOTOR you could have two companions at a time. This seemed like a perfect number to me. Some games allow larger parties, and that gets too crowded. Jade Empire takes this down to one companion at a time, which means your friends rarely get the chance to talk to each other. I kind of miss that dynamic.

There are a few minor bugs. When moving to a new area, sometimes the camera ends up facing straight down. A quick save & load fixes this without losing any progress, and the bug is pretty rare, but I hope they fix it all the same. Once in a while a patch of fog will blink in and out of view, which is distracting. Other than these few hiccups, the game is flawless. I never saw any broken / buggy quests.

But my biggest lament is that I wish there was more of it. A single play-through takes between twenty and twenty-five hours. Sure, you will probably go through it more than once, but I felt like the game needed a longer first act. I would have liked to spend another hour or so in Two Rivers and the surrounding area. However, if given the choice between short and perfect (Jade Empire) or long and unfinished (Oblivion, Neverwinter Nights 2) there isn’t any debate. I’ll take the shorter experience every single time. Still, I wouldn’t have minded if the game just padded things out with a little more combat, just to stretch out the experience ladder a bit. And while we’re asking the genie for more wishes, I would have liked another town between Tien’s Landing and the Imperial City.

Yeah, this is a pathetic list of nitpicks, and it makes me seem sort of petty for even bringing them up. Still, this is what you get when you put out an excellent game: The thing is nearly unassailable.

 


 

DM of the Rings LXXXVIII:
An Unexpected Maneuver

By Shamus Posted Monday Apr 16, 2007

Filed under: DM of the Rings 101 comments

Gimli gets totally tossed..

Yeah, so this strip should really come before the earlier one where Gimli is already fighting on the causeway. I can’t help it if I don’t think these up in chonological order. Actually, I didn’t think about the Dwarf-tossing bit until people started talking about it in the comments and I realized it was an Anticipated Event.

 


 

GTA:LCS: First Impressions

By Shamus Posted Monday Apr 16, 2007

Filed under: Game Reviews 10 comments

I’m playing Grand Theft Auto: Liberty City Stories. Number of missions completed before I became disgusted and looked up cheat codes: 7. Some things never change. This game really knows how to enrage me.

In this game you play as Tony Cipriani, who was an NPC back in GTA III, which is in the future from this game’s standpoint. Got it? No? Fine.

New in this version of the game is the ability to see out windows. I like how I’m wandering around my apartment idly carrying a submachinegun.  Only in GTA.
New in this version of the game is the ability to see out windows. I like how I’m wandering around my apartment idly carrying a submachinegun. Only in GTA.
In GTA III Tony was the dumbest of the Mafia bosses. He was slovenly, tubby, and thick-headed. Not exactly the ideal protagonist. They’ve smartened him up and slimmed him down for you in this game. Perhaps the final mission has you hit your head, get brain damage, and the subsequent hospital stay has you gain 50lbs.

Even with the retcon IQ boost up he’s still not the sharpest knife in the drawer. He’s not very impressive physically, and he still looks like he needs to spend some quality time with a bar of soap.

The game re-uses the Liberty City scenery from GTA III, but with a few minor tweaks to keep things interesting. Many improvements from later installments were backed into the original GTA III gameplay. You can bail out of moving vehicles, ride motorcycles, change clothes, and a number of other things that weren’t possible the last time we visited Liberty City. Sadly, swimming and crouching didn’t make it, so you once again get to enjoy the stupidity of drowning in shoulder-deep water and standing like a target dummy in combat.

There are a few new mini-games here. I saw a set of missions that let you become a “car salesman”. I figured this was a euphemism for stealing cars, but no: You actually have to sell cars by taking an NPC for a ride and demonstrating the capabilities of the vehicle. Clever. I will say this: Those would-be customers are exceedingly brave. I have yet to make a sale, but I have killed a number of them and totaled a few cars in the attempt. They don’t seem to mind.

I had hoped the flirting they did with RPG stat-building gameplay in San Andreas would make it into this game, but that didn’t play out. I cling to those scant few RPG elements like a lifeline. The core gameplay of GTA isn’t really my thing, and as I play the game I can’t help but fantasize about how the game could be a sort of urban version of Oblivion.

An apt title for the game might be Grand Theft Auto: More of the Same. This is not necessarily a bad thing.

 


 

Grand Theft Chronology

By Shamus Posted Sunday Apr 15, 2007

Filed under: Video Games 17 comments

I’m writing about Grand Theft Auto this week. I’ve remarked on this series before.

The series turns ten this year. The game has an odd history. Most of the press surrounding the game focuses on the graphic content and outrageous gameplay, but the thing that has amazed me the most about the game is the technology.

The original Grand Theft Auto games looked primitive for their day.
The original Grand Theft Auto games looked primitive for their day.
The original GTA and the sequel GTA II were both top-down scrollers. GTA came out in 1997. The graphics were fairly dated, but it featured some very shocking gameplay (car theft, murder, and rampant destruction) and a sense of humor, not to mention a refreshing open-ended approach. GTA II came out in 1999 and used more or less the same graphics. Neither game was particularly compelling to me. I found them to be amusing but frustrating.

Then in 2001 Rockstar came out with GTA III and more or less conquered the PS2 with it. I still can’t believe the technological jump they took from the 1999 GTA II to the 2001 GTA III. It was like they got hold of some strange alien technology. The game went from being a simplistic, lo-tech excuse to blow up cars to one of the most cutting edge 3d worlds ever. Even six years later I don’t think anyone else has really matched them for spacious, realistic urban landscapes. I don’t know what happened that enabled them to take such a huge leap forward. Did they harvest some of John Carmack’s blood and make themselves a clone? Or an army of clones?
Continue reading ⟩⟩ “Grand Theft Chronology”