Stolen Pixels #191: Max Blame, Part 2

By Shamus
on May 4, 2010
Filed under:
Column

Part 2 of 4.

I was right that the game was doing something really screwy at load time. I searched around and found that if you add -disable3dpreloads to the command line like so:

mp_shortcut.jpg

…the game will stop stalling on the loading screen. The load times went from two minutes to about eight seconds.

Max Payne always had horrendous load times. I wonder if this “feature” was the problem all along? Would this have sped things up in 2001? I no longer have a machine of that vintage so I can’t test.

On Sunday I plowed through the whole game using cheats, just taking in the story and trying to get a feel for the writing style. (Since I needed to mimic it for this series.) I wish I’d done so before I began the series. Part 1 was written in present tense. I could have sworn the game was written in present tense. But it wasn’t. Hopefully the shift isn’t too off-putting. It will probably be more noticeable to people doing an archive binge than to people who are just reading them as they come out.

I will say this series is really fun to work on.

Enjoyed this post? Please share!


20201Feeling chatty? There are 41 comments.

From the Archives:

  1. Gandaug says:

    Second comic is much better. It captures the feel of Max Payne quite well. Better than Max Payne 3 really from what I’ve seen of Max Payne 3.

    Also, I just realized shortening Max Payne 3 to MP3 is not going to work.

  2. Galad says:

    What is the -disable3dpreloads command actually supposed to do? Any idea why it reduces loading times? Also, any idea why part 1 is written in present tense, while the other 2 parts are apparently not, and what significance this might have?

    • Ace Calhoon says:

      Part 1 is referring to Stolen Pixels, not Max Payne. In other words, Shamus wrote the first strip in present tense, found out that the game is written in past tense, and changed styles.

    • The -disable3dpreloads is a command line argument to the program that runs Max Payne, and tells it to disable that feature of the game. So, in other words, it makes the game just load the 3d elements as required rather than loading them all before playing 3d bits.

      Due to the way the internals are coded, this must have been a very expensive process in terms of CPU cycles. So it improves play time. Having regrettably never gotten hold of Max Payne, I couldn’t say for certain. But that’s the programmer explanation.

    • Abnaxis says:

      I second the question about 3D preloads. From the sound of it, the feature should improve performance, not make load times longer. Unless it actually makes performance at runtime better? Like, loading objects into the video buffer before you start the level? Or something?

    • Nentuaby says:

      Well, I don’t know the exact details, but the basic implication of the name is pretty clear. Preloading means grabbing all the information about X into memory, and possibly doing processing on it, before you start trying to use it.

      So the idea would have been to make things faster at run time, at the cost of doing extra work at load time.

      Nine years on, odds are that whatever run-time performance bottleneck (maybe a memory bandwidth thing, or a video memory shortage they needed to make a cache in regular memory for?) they were trying to fix with their preloading technique has been solved by FUTURE HARDWARE, but hard drives haven’t got all that much better, so the preloading’s as slow as ever.

      • Pickly says:

        Related questions: how would someone guess to do it? (and know that the function existed in the game.)

        (Yes, I am quite unfamiliar with this sort of computer stuff.)

        • Jabor says:

          Typically you’d read over the documentation for the game in question. Quite often, there’ll be a list of all command-line arguments and their function somewhere.

          If not, you could reverse-engineer the first part of the program itself to figure out what options it recognizes, and then use trial-and-error to figure out what they do.

          • Galad says:

            Good point. I reinstalled my copy, checked out the readme and saw this:

            “-disable3dpreloads: If the system runs out of texture memory while loading a level, this option may prevent the game from crashing due to a driver error.”

            I’m somewhat tipsy right now but it doesn’t sound to me like it should normally affect loading times?

      • Jabor says:

        If I had to guess:

        – 3D models are stored on disk in a compacted format, to save hard drive space
        – In 2001-era machines, uncompressing the models takes quite some time and would typically cause a stutter if you had to do it in the middle of the game
        – Longer loading times are typically better than stuttering every now and then

        Uncompressing and caching the models is hence preferable when you don’t have the clock cycles to spare on doing it in the middle of the game, but now that processors are fast enough to handle it just fine, all it does is increase load times (which are disk-access-bound) for little-to-no measurable gain.

  3. Meredith says:

    The game description in panel 3 is brilliant. The sad thing is, I would probably play it just out of curiosity.

  4. Kdansky says:

    Good one. I also wanted to play through Max Payne (I’ve never done so), but it does not really look decent on a 16×9 screen. Either you have a tiny window in the middle, or everything is stretched into oblivion. Oh, and I could not get the sound to work either…

    • MintSkittle says:

      EDIT: I misread your post. Ignore me.

    • Michael says:

      You couldn’t get the system to scale properly? I know my graphics card features a fixed aspect ratio scaling option. I know because I’ve been playing Spellforce 2, which doesn’t support wide screen in 1600×1200 on my 1920×1200 monitor, and getting black bands on either side of the screen.

      No idea on the sound.

  5. eri says:

    Oh my god… the writing… it’s so bad, yet so good. You get major bonus points, Shamus.

    • Hal says:

      Speaking of writing, I followed the link you posted in there and read your savaging of Fable 2 (again). Is anybody going to be “honored” with the Golden Riter award this year?

  6. Tom says:

    Have you seen this guy’s Twitter? I missed the fact that it’s a parody the first time I saw it … and it’s completely believable, sadly enough.

  7. rofltehcat says:

    Haha, I absolutely love Peter Molyneux and how he promises all those great new features to then just release a (good but now as awesome) game with about 3% of those features implemented and only 1% working :D

  8. Nathon says:

    I don’t know if you’re allowed to change history, but “it’s a trip to Italy.”

    • AnZsDad says:

      Mis-used contraction or not, that line was the highlight reel from this comic. I have grown wise enough not to drink at my computer while reading Shamus’s work… :D

  9. Hugo Sanchez says:

    Still running XP, eh Shamus? How will you ever enjoy the amazing that is Just Cause 2?

    • Nick Bell says:

      That’s good to know. I’ve been thinking about getting it. Glad to have this information now, rather than after I bought an nonreturnable game.

      Why would someone make a game that wasn’t supported by XP? As far as I know, it is still by far the most common version of Windows. Seems like a poor business decision. Anyone know what advantage you’d get by abandoning that platform?

      • Gandaug says:

        XP does not have DirectX10. Just Cause 2 requires DirectX10. Unfortunately this will eventually be true of all games released. XP is still a great operating system, I still use it myself, but it is now getting a bit long in the tooth. It’s just a simple fact of the evolution of technology leaving it behind.

        • Nick Bell says:

          Thanks. I knew there was something that I couldn’t think of, but was obvious enough that I should have.

          The weird thing is that Just Cause 2 is that it is also an Xbox 360 game. The 360 can only run DirectX 9, thus they already went through the trouble of making the game run on it. To me, it’d make sense to make the PC run on Directx 9 as well.

          But I know nothing about video game development, as pointed out by my lack of Vista/Directx 10 knowledge.

          • Hugo Sanchez says:

            It’s because Avalanche studios cares about the platform. Instead of making a shitty port. They made an awesome one. Theoretically speaking they didn’t have to restrict it to DX 10. Though, that probably would have required lots of extra work on their part.

            It’s totally worth it though. I’ve fallen in love with Win 7 since i participated in the beta. But even if i hadn’t, I’d switch for this. It’s some of the most fun i’ve had in a LOOOOONG time.

  10. Froody says:

    One of the best Stolen Pixels in a while. That type of humor reminds me of the Tracer Bullet strips from Calvin & Hobbes, which were pure genius.

  11. Gavin says:

    …who would sell you a can of ravioli by telling you it’s a trip to Italy.

    I laughed — open-mouthed — out loud. :D
    Thanks!

  12. DaveMc says:

    “The noose around my neck was tied in a Gordian knot” — Beautiful!

  13. SatansBestBuddy says:

    Quick question; couldn’t you rewrite and repost the first strip to make it past tense?

    I mean, this is the internet, and I know webcomic artists out there who redo their older comics from time to time, some just to replace spelling errors (), while others go as far as retconing certain names and events (, ), hell, a couple even go so far as to remake everything so that their first couple of years worth of comics might as well have never existed (), so the prospect rewriting a single comic from present tense to past tense doesn’t sound like all that big of a deal to me…

  14. SatansBestBuddy says:

    Okay, this is weird…

    I posted a comment earlier, but I can’t see it, but I know it’s been posted because my attempts to post it keep sending me an error page saying I’ve already posted it… I think…

    Whatever, point is, I can’t see my previously posted comment, and as a HUGE narcissist, that disturbs me somewhat.

    • SatansBestBuddy says:

      GAH, NO, STOP!

      Now I can see it, but the HTML code is all screwy, so I tried to reply so I could edit the code so it works right, but now I can’t see my reply!

      Bah, this is hard, I’m just gonna go to bed now…

      EDIT: The fact that I can see my complaints, and the fact that the old message has Your comment is awaiting moderation on it, suggests that whatever’s screwing up my posts has something to do with manually checking for spam… I guess?

  15. hevis says:

    I’m interested, is there same kind of issue with Max Payne 2? Or did they fix the problem by then.

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

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>