{"id":1841,"date":"2008-08-26T11:00:26","date_gmt":"2008-08-26T16:00:26","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=1841"},"modified":"2008-08-26T06:51:32","modified_gmt":"2008-08-26T11:51:32","slug":"gtasapc-strangeness","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=1841","title":{"rendered":"GTA:SA:PC: Strangeness"},"content":{"rendered":"<p>I&#8217;ve said before that if game developers would back off from the bleeding edge, they could do more with less, and GTA is the perfect example of this in action.  If you&#8217;ve been reading this site for any length of time you&#8217;ve heard this rant before. My big plan over the weekend was to do a video review \/ commentary thing for Grand Theft Auto: San Andreas on the PC, to illustrate what I&#8217;m talking about.<\/p>\n<p>It didn&#8217;t work out. I&#8217;m still not sure why.<\/p>\n<p><!--more--><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='right'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/gta_error.jpg' class='insetimage'   alt='250' title='250'\/><\/td><\/tr><\/table>To the right I have a series of images from a test movie.  These are taken from a 5 second sequence where I exit a vehicle after a crash.  I&#8217;m sure you&#8217;ll notice that in two of the four frames, about half the stuff in the scene is missing.  <\/p>\n<p>A very simplified explanation of current rendering technology is this:  The software has two &#8220;buffers&#8221;, which can hold a bunch of pixels.  The game will draw the scene into one of the buffers, adding a sky, a volcano, some space marines, a girl in a titanium bikini, some explosions, TIE fighters, dinosaurs, or whatever this particular game calls for.  Once it&#8217;s done drawing, it then presents you with its latest masterpiece by showing you the buffer.  This means the <em>other<\/em> buffer is now free. You&#8217;re no longer looking at it, and so the game starts drawing into that one.  It repeats this process for every frame &#8211; usually <em>at least<\/em> twenty times a second.  You can think of this like a painter with two canvases:  While you&#8217;re looking at one painting, he paints on the other, and the moment he&#8217;s finished he trades you, so that <em>you&#8217;re always looking at a finished painting and you never see the work in progress.<\/em> <\/p>\n<p>For video capture, I&#8217;m using <a href=\"http:\/\/camstudio.org\/\">Cam Studio<\/a>, an open source all-purpose desktop capture program.  It&#8217;s what I&#8217;ve used in the past to make <a href=\"?p=1434\">my Half-Life 2 movie<\/a>.  I&#8217;ve tried a lot of video capture programs, and Cam Studio has been the most sensible and reliable so far.  But for whatever reason it can&#8217;t capture San Andreas.  It&#8217;s almost as if it&#8217;s filming the back buffer (where the drawing takes place) instead of the completed image.  Now, when I&#8217;m playing the game, everything is fine.  The game looks right and runs smooth.  But if I film the game in action, the movie ends up with the images you see:  A bunch of half-drawn crap with parts of the scene missing.<\/p>\n<p>I don&#8217;t even know if I should blame GTA or Cam Studio. Cam Studio is, in theory, just grabbing the raw pixels off my desktop &#8211; which clearly isn&#8217;t the case, since what I was seeing is different from what the movie contains.  But maybe GTA, being a console port, is doing something goofy in the background that&#8217;s messing Cam Studio up.  I just don&#8217;t know.  <\/p>\n<p>I don&#8217;t even know how this is <em>possible.<\/em>   If you <em>asked<\/em> me to film what was going on in the back buffer of another application I&#8217;d give you a deer-in-the-headlights look while I pondered how in the hell something like that could be attempted. I would then make every effort to unload the project onto someone I hated.  <\/p>\n<p>What&#8217;s even more inexplicable is how it only happens sometimes. I&#8217;d sort of understand if <em>half<\/em> the frames were messed up, but that&#8217;s not what I&#8217;m seeing. As I step through the movie, I&#8217;ll have ten normal frames, and then one of these half-drawn frames, then another string of fully-drawn frames, then a couple of unfinished ones.  It really is baffling.  <\/p>\n<p>More to the point, I sunk most of my post-writing time into this failure this weekend, and this is all I have to show for it.<\/p>\n<p>So, uh&#8230; enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve said before that if game developers would back off from the bleeding edge, they could do more with less, and GTA is the perfect example of this in action. If you&#8217;ve been reading this site for any length of time you&#8217;ve heard this rant before. My big plan over the weekend was to do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[39],"class_list":["post-1841","post","type-post","status-publish","format-standard","hentry","category-projects","tag-gta"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/1841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1841"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/1841\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}