GTA: Hot Coffee

By Shamus Posted Tuesday Mar 7, 2006

Filed under: Game Reviews 20 comments

A big controversy last year was when the “hot coffee” modification was released for Grand Theft Auto: San Adreas. One thing that infuriated me about the whole thing was the fact that nobody reporting on the issue knew what in the world they were talking about. Words were misused, meanings were mangled, and ignorance was propigated at an amazing speed.

Out of the box, GTA: SA has a mini-game where your character has an in-game girlfriend. You can do things like buy her flowers or take her out on dates. The dates are short missions where you drive her to a place to eat or a dance club. Once there, the game shows a brief scene (with sappy romantic music playing) of the two of you smiling and having dinner together, or you play a little dancing minigame. Once this scene ends, you drive her home. Each time you do this, the “relationship” meter will go up a notch. Once you’ve done this enough times, she will invite your character in for “coffee” at the end of the date. If your character accepts, then the camera stays outside, and muffled sounds hint at what is going on inside. This is silly and juvenile in a PG-13 sort of way.

As it was reported, a user-made download became available where you could access “unlockable” content. If you downloaded this patch, then the camera would go inside when it was time for “coffee”. I’ve never seen this myself, but from what I’ve been able to gather of how this works:

This was another minigame, where the player would have to mash buttons, similar to the weightlifting game, or perhaps like the dancing game. The upshot of the game was that the characters were having sex, (which was depicted with full rated-R nudity) and the player needed to do well at the game if they wanted to make their partner happy.

The term “hot coffee” has been used to refer to both the sex game and the user-made download that makes it possible. GTA itself does not use the term “hot coffee” in any way.

People called this thing an “unlockable”, but that’s not what unlockable means. Usually “locked” game content is stuff that you cannot access when you start out, but that you can earn at some later point through playing the game. That was never the case with the hot coffee minigame. There was never anything you could do within the game that would lead to unlocking hot coffee. In order to get the game, the user had to go and download other software made by some guy on the internet, and then use that program to modify their copy of Grand Theft Auto. To do this is a violation of the End-User License Agreement that the user agreed to when they installed the game. That is a hack, not an “unlockable”, and the distinction is very important.

This is like some guy using an illegal cable box to get the Playboy channel when he’s not paying for it, and then getting outraged at the cable company because they are providing him with pronography. This scandal would never have been such a big deal if people had understood how the technology worked. From reading the news, most people would be led to believe that:

  • This pornographic minigame was a part of all of the releases of this game. (Misleading: Hot Coffee is only possible on the PC version, as there is no way a user can hack the PS2 version.)
  • This was a “hidden feature” within the game that could be unlocked via some special cheat. (Not true: You had to hack the original game to make it happen. Doing so violates the EULA)
  • Rockstar games hid this in the game, trying to slip it past the rating system. (Given the facts, this is exceptionally unlikely.)

However, the resources used by hot coffee are indeed installed with the game. That is, there are “naked” textures and (I assume) some sort of pelvic-thrusting animations. There were probably sound files, and there was certainly game code driving the whole thing. The only reason the hack is possible is that the sound files and game code were available, although they were detached from the rest of the game and you can’t access them without hacking.

But again, this is like the cable theft analogy: The cable company is always sending you the Playboy channel; it’s just encrypted. If you take the step to hack it and decrypt the scrambled signal, then you bear the responsibility, not the cable company.

So how did this happen? Why was that stuff on the disk? Rockstar games never gave much of an explanation, which isn’t surprising. Their primary concern since the story broke has been to minimize their vulnerability to incoming lawsuits, which generally means saying “no comment” a lot. This game content took time to produce. Someone had to make the animations, record audio files, and program the game itself, so this wasn’t a case of a single rogue programmer run amok. At some point they intended this to be a part of the final product, and at some point they changed their mind. Just what’s going on here?

I’m going to take a guess, and it might sound absurd, but humor me here: They disabled the feature and then forgot about it. I’m sure if Rockstar offered this excuse they would be laughed out of business. I mean, how do you forget something like this?

From my own perspective, I can see this happening. I’ve had many large-scale projects over the years, and over the course of such projects features come and go. Someone says, “that building sucks, get rid of it” and so you remove it from the game world, but you don’t expunge the building itself from the assets. The building might be useful elsewhere. Bosses can be fickle, and odds are good that he will come in a week from now and ask for the building to be put back in. You don’t want to DELETE the building entirely, or when he asks for it to be re-instated you’ll have to design it all over again. This happens with objects, textures, and all kinds of other assets. As the project progresses, clutter builds up. Old versions of objects linger. Textures that seemed useful but were never put to use don’t delete themselves out of shame. Most importantly, coders (like myself) don’t expect people to alter our programs after they’ve been released. If I disable something, I assume its gone.

A word about “disabling” code:

There are two ways to disable code: the wrong way and the ugly way. The ugly way is to add special notes (called preprocessor directives, in fancy-talk) that say to the compiler “do not compile this code”. It leaves the code out of the final execuatble, but it also messes up the indentation (like paragraph formatting for computer code, it helps the coder keep things organized) and this can make the code hard for a human to follow. It also causes other annoying problems that require an extra few moments of typing to resolve.

By contrast, the wrong way is to do this:


if (0) {
    PlayHotCoffee ();
} else {
    GoToChurch ();
}

The “if” thing is a test: if the stuff in () is not a zero, it will do the next set of code, which is PlayHotCoffee (). But since it IS zero, then it will skip PlayHotCoffee () and instead it will GoToChurch (). Doing things this way, if the programmer wants to re-enable hot coffee, he just changes the zero to a one and re-compiles the program.

As long as he leaves the zero there, the game will always GoToChurch () and NEVER PlayHotCoffee ().

However, unlike when we use the preprocessor directives, the code to PlayHotCoffee () is still a part of the program. If some hacker puzzles through the program he may discover the disabled code. Then all he’d have to do is change that zero to a one and he can too can PlayHotCoffee (). (Note that the hacker won’t see computer code like I showed above. Once the program is compiled, all of that code is turned into pure numbers, which are much, much more difficult to read.)

For me, I always use the wrong way of doing things when writing code. Sure the executable is bigger by a few bytes, but that’s trivial compared to the value of readble code that can be understood at a glance.

I strongly suspect that this minigame was part of the original spec, but at some point in development they thought better of it. Word came down to remove the feature from the game. A programmer added the “If” to skip hot coffee and do something else instead. The feature disappeared from the game and everyone forgot all about it.

It would be strange for them to fear someone coming along and re-enabling hot coffee – players wouldn’t even know the minigame existed. For them to find out, someone who knew a LOT about machine code would have to painstakingly examine the executable, paging through all those numbers a few bytes at a time until they found it. But what would cause them to go to all that trouble if they didn’t know about the game in the first place? Oddly enough, this is exactly what eventually happened, and I’ve never heard an explanation from the original hacker as to what he was really trying to accomplish when he stumbled on hot coffee.

Remember that this game was originally developed for the Playstation 2, where no hacking is really possible. The programmer would have needed to be thinking pretty far ahead AND be a bit paranoid in order to see this eventual outcome. I wouldn’t work on a pornographic game myself, but in a similar situation I could see making the same mistake. In fact, if you looked at the source code for my terrain project you’ll see I disabled several bits of code using this method.

But what about the textures, animations, and sound files used by hot coffee? How did all those get left in the final product? This isn’t that hard to imagine either. By the end of the terrain project (which was a one-month part-time project by one guy, and not a two-year full-time project by a team), my textures directory was full old textures that were no longer used. I deleted them before releasing them to the public, but I was working with a list of a dozen textures. In the case of GTA, there would have been thousands of textures, thousands of sound files, and hundreds of animations. Somebody would need to have a lot of time on their hands to go through that list and figure out which ones were unused, and remove them.

I find the scenario I outline above far more plausible than the idea that Rockstar games hid hot coffee in an attempt to bypass the censors and ratings board, or in order to create controversy.

To my knowledge, this post is the first time someone has sat down and attempted to explain just what happened and why. The news treated us to endless blathering about “unlockable” content, but none of them answered everyone’s number one question, which is: Why was that stuff there in the first place?

Now that the scandal has happened, I think lots of companies, and Rockstar in particular, are going to be a lot more paranoid about what they leave on the disc. Now that they know people will tear the program apart looking for… well, anything, I think we can expect developers to be a lot more careful from this point on.

 


From The Archives:
 

20 thoughts on “GTA: Hot Coffee

  1. mom says:

    Well, I had never heard of any of this before and almost gave up while reading your commentary but in the end I felt I had a rough idea of what happened. I had a thought while reading that the explanation of how ( or why) someone could “find” this unused code was that an insider had blabbed it to someone. maybe after too many beers.
    Anyway, thanks for the article.
    Mom

  2. Zenja says:

    I’ve installed the mod, and all you can see is clothed characters humping, with the option of changing the camera angle. You need to press forward-back in rythm. If you are out of rythm, then you climax too soon and end up with a disappointed girlfriend. The fun bit is listening to Carl Johnson’s confidence based remarks during the whole ordeal.

    Clothing characters rubbing their boddies against each other – you see this in most PG rated films. People with no life wanting publicity/ratings ran with the story. The rest of the world just went “Ah?? Crazy Americans.”

  3. Patrick says:

    mmmm…..beers. good idea mom.

  4. Leonard Lime says:

    It’s actually very funny to watch, especially because of CJ’s remarks. There is a video of the minigame “in action” posted on the internet somewhere if anyone is interested in seeing it.

  5. Clarifon says:

    This trivial thing caused GTA:San Andreas to be banned in Australia, the Playstation 2 version included.

  6. Miako says:

    Oblivion’s naked mods were worse than this, for goodness sakes.

    And those were merely the removal of a few textures, b/c the artists, like most artists, draw people nude first, and then add clothing.

  7. Bob says:

    how to downlode unlockable I dont know just have the game and playing when I meet CJ girl friend when my date is finished she ask me for hotcoffee when I say yes my camera stay outside of her house and move here and there of her house I want to go inside of her house can any one want’s to help me and tell what is unlockable and how unlock this unlockable please for good kindness please help my ID is [email protected]

  8. guy says:

    Another thing is that code that was put into a game may be a reference for other code, making it impossible to remove without effecting other things.

  9. roma says:

    were do u go to have sex in the house to see how they do cuz i am trying to fiend and i cant lol i wonly know were my grlfriend is ???

  10. rg says:

    lol i dond even know how to go in the house to can som one tell me the unlokebal pass fore ps2 to go inside the house my emale is [email protected] any one plz tell me

  11. mmg says:

    It seems unlikely that a blatantly non-executed statement like ‘if(0)…’ would not get purged by an optimizing compiler. There would need to be at least one unqualified reference somewhere in the code, for the routine to be included in the final executable, unless they wrote it in assembly (highly unlikely as this hardly constitutes bottleneck code), or they opted for unoptimized compilation of a release build. I’m not saying I believe the they-hid-it-to-cheat-esrb explanation, because your idea more elegantly covers the inclusion of the needed artwork, but I don’t much like it for the actual code.

    My apologies for waking the ghosts of posts past

  12. Pete!! says:

    its really a shame that you take all this time to write all this stuff down, and try to explain it, and yet you still get people asking how to crack the ps2 version…

  13. Ravens_Cry says:

    It is quite simple rg and roma, take the disk out of your playstation two, and put it in your microwave, and put it on high for :30 seconds. That will unlock ‘hot coffee’. If it doesn’t work, go to your mother and explain EXACTLY what you were doing. Best of luck ;P

  14. william says:

    hahahaahahhahaha
    I love Bob
    and roma/Rg. ( we know you are one)

    But in all seriousness, I sympaphise. In this day and age, with the internet and all its puritannical nonsense, it can be hard for a young man to find out about his sexuality. I tried Raven’s method, and it did work. however be careful, as if you do it for too long, it might cause troubles. but i would advise against going to your mother if there are any problems. instead try the GTA rockstar forums, or even better, go to microsoft support forums. they designed the xbox after all
    best wishes
    will

  15. Nathon says:

    Hey, look, someone reading through archives waaay after the fact. I’d like to point out that most optimizing C compilers will actually interpret your

    .if (0)
    . DoSomething ();
    .else
    . DoSomethingElse ();

    code and replace it with just a DoSomethingElse (). While this will probably not actually shrink your code, since the DoSomethingElse function is likely in a seperately compiled module, it will keep your hack from degrading performance by not actually performing the branch or having to cache those extra bytes of code. I work on a high performance embedded system (odd, eh?) and we do that sort of thing all the time for supporting multiple architectures:

    .#define PLATFORM_IS_FOO 1
    .bool platformFoo = PLATFORM_IS_FOO;
    ....
    .if (platformFoo)
    . YouGet ();
    .else
    . TheIdea ();

    Pardon the extra .s. Your page ate my formatting.

  16. Argiod says:

    The only thing that amazes me in this whole deal is this:

    …that we are such prudes in this supposedly ‘most free country in the world’…

    For the ‘most free’ country in the world, we in the United States are beset by restrictions on all sides. We can barely take a breath without someone sueing us for one thing or another. Why, in New Orleans, it is even against the law to spit on the sidewalk… How barbaric!

  17. SheffieldSteel says:

    “If your character accepts, then the camera stays outside, and muffled sounds hint at what is going on inside.”

    This tells me everything I need to know to understand why the resources are still in game, and how the hack works.

    At some point probably late in the development cycle, a probably overworked and overtired programmer is told that the minigame is to be cut, and replaced with a non-interactive cutscene(as described above). How to accomplish this? The easiest solution is to (1)hardwire the input code for the minigame so that, effectively, the player plays perfectly and predictably every time, and (2) move the camera so that nothing “offensive” is seen. The reason why the resources are still there is that, without the sounds, the player is left staring at a wall, and without the animations there’s no way of knowing when to play the sounds, or when to end the cutscene. (The sound effects are probably triggered directly by timed events in the animations and may even be part of the animation resource.)

    All the hacker had to do was to reposition the game camera.

    1. Aaron says:

      That actually sounds most likely of all, so far. Of course, we can only speculate.

      And I speculate that whoever “found” this, if it was not as a result of insider knowledge, was probably browsing through resources, found naked stuff, which raised eyebrows, causing them to look more deeply.

  18. baud says:

    You’ve forgotten one ugly and wrong way to remove something: commenting the code.

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun. Your email address will not be published. Required fields are marked*

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>

Leave a Reply to Bob Cancel reply

Your email address will not be published.