Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
PlayStation (Games) Graphics Games

The Technical Difficulty In Porting a PS3 Game To the PS4 152

An anonymous reader writes "The Last of Us was one of the last major projects for the PlayStation 3. The code optimization done by development studio Naughty Dog was a real technical achievement — making graphics look modern and impressive on a 7-year-old piece of hardware. Now, they're in the process of porting it to the much more capable PS4, which will end up being a technical accomplishment in its own right. Creative director Neil Druckmann said, 'Just getting an image onscreen, even an inferior one with the shadows broken, lighting broken and with it crashing every 30 seconds that took a long time. These engineers are some of the best in the industry and they optimized the game so much for the PS3's SPUs specifically. It was optimized on a binary level, but after shifting those things over [to PS4] you have to go back to the high level, make sure the [game] systems are intact, and optimize it again. I can't describe how difficult a task that is. And once it's running well, you're running the [versions] side by side to make sure you didn't screw something up in the process, like physics being slightly off, which throws the game off, or lighting being shifted and all of a sudden it's a drastically different look. That's not 'improved' any more; that's different. We want to stay faithful while being better.'"
This discussion has been archived. No new comments can be posted.

The Technical Difficulty In Porting a PS3 Game To the PS4

Comments Filter:
  • I'm super stoked about this game! Never had a os3 so I missed out on it before.
    • by antdude ( 79039 )

      os3? OS/3 after OS/2? :P

      • That runs on an IBM PS/3 :). I have one of those, it costs $10K, the case is made of depleted uranium, hard disk drives are gigantic and the bus is MCA Express (but you won't find cards except for 1TB RAM expansions and gigabit Token Ring)
        Sadly a $500 PC is faster.

  • ... of making the software run correctly first, and only then doing optimizations (down to the assembly level)?

    Sorry, but *yawn*.

    Had they followed the practice, they would have a version of the source code that runs correctly (but slowly) that they could optimize for different target platforms.

    • by Anonymous Coward on Sunday May 18, 2014 @04:41AM (#47030441)

      Is it a good practice for cases like these? I argue not.

      Let's say that we do create a reference version, then optimize. Since we are intending to push the hardware to its maximum, we have to assume that we will hit the occasional performance wall. How do we deal with that? We change the behavior of the program to fit within the limitations. This means that our definition of correct behavior has changed and the reference version is no longer correct. So, we update our reference version to match the version we plan to publish. This involves backporting the changes, then carefully testing to verify that the behavior is exactly the same as in the optimized version.

      We're left with the question: Why do we call it a reference version if it is derived from the version that is supposedly derived from it?

      The optimized version is the real reference version. The "reference" version is really just a port to a hypothetical platform. And, rather than just porting the final version, we are porting every bit of wasted effort along the way.

      We get all the cost of the PS3 to PS4 port, dragged out over the whole path of development, with no target platform to sell it on. Sure, porting "reference" to PS4 will be cheaper than PS3 to PS4; however, PS3 to reference to PS4 will be much more expensive than directly porting PS3 to PS4.

      So, best case, we spend more money to save time porting to a platform we never intended to support. Worst case, we spend a lot of money on a port that doesn't go anywhere. It's a lose-lose.

    • by KliX ( 164895 )

      The optimisations are the program, there is no unoptimised state to work from. Have you ever worked with soft real-time code?

      • by Ihlosi ( 895663 )
        The optimisations are the program, there is no unoptimised state to work from.

        And that is the mistake. You first need something that actually runs correctly, and then optimize it to work with the hardware that is at your disposal.

        Have you ever worked with soft real-time code?

        Part of my work involved hard real-time code, down to twiddling with sub-microsecond timings and of course counting CPU cycles. Still, I usually start with code that runs correctly (i.e. it would fulfill the specifications if ru

        • by west ( 39918 )

          I'd suggest that the PS3 is radically different enough that if your *reference design* wasn't PS3 specific, you've probably already failed.

          You can't "optimize" a bubble sort into a quick sort.

          (One interesting effect of both the PS2 and PS3 was that their design was so bizarre that it took years for programmers to be able to optimize effectively. This meant that games were consistently better every year even without any changes in the hardware. With a more conventional architecture, what you buy in the fir

          • by Ihlosi ( 895663 )
            You can't "optimize" a bubble sort into a quick sort.

            When you're deciding on a sorting algorithm, you're already optimizing. The unoptimized version just needs to run correctly, i.e. deliver the expected result. You pick a search algorithm that's easy to understand for that (so, bubble sort rather than quick sort). Chosing one that is best suited to the target hardware and implementing it optimally on the target hardware is part of the optimization process.

          • > You can't "optimize" a bubble sort into a quick sort.

            At the risk of being rude, you are not really understanding what optimization actually means.

            You need to take a step back from the trees and look at the forest.

            Sorting is defined as:
            * Input: Given a set of unordered data
            * Output: Return a set of ordered data

            Optimization entails both macro and micro efficiency.

            The algorithm determines the high level efficiency.
            The programming language may offer low level efficiency.

            For example you coul

            • by west ( 39918 )

              *sigh*.

              I see my analogy failed.

              If my job is to write a program that does a sort, and I write a bubble sort, then if I really need it to work better, I don't tweak it, I redesign from scratch. Most people won't call that an optimization - they'll call it a redesign. Hence my original comment. (And yes, if we're being pedantic, *if* the sort is part of a larger program, then I would call rewriting the sort an optimization.)

              My point was that if you don't *start* by taking all the strengths and weaknesses of

          • One interesting effect of both the PS2 and PS3 was that their design was so bizarre that it took years for programmers to be able to optimize effectively.

            Can you give a couple of very very high level examples of what is bizarre about them? (..if you know why they were designed that way, even better)

            • by west ( 39918 )

              By bizarre, I mean that it has taken years for PS3 designers to be able to re-architect their games to keep all six SPE's busy because of limitations on the SPEs (as detailed multiple times in postings above by others). In other words, bizarre means "different", not necessarily bad. Essentially, there was not a lot of skills transfer between being able to program most machines out there and effectively programming the PS3.

              Very briefly, the PS3 has one main core and six accessible Synergistic Processing El

              • Also the GPU was relatively weak, with the limitations of the geforce 6/7 architecture while the Xbox had an almost modern one in comparison.
                Devs found ways to "help" the GPU such as doing preliminary geometry work and culling, and doing post-processing on SPE rather than on GPU.

                That allowed to do something with the SPE resources that were still unused, even if they managed to fit other kinds of work on them.

    • by _xeno_ ( 155264 ) on Sunday May 18, 2014 @05:53AM (#47030593) Homepage Journal

      Had they followed the practice, they would have a version of the source code that runs correctly (but slowly) that they could optimize for different target platforms.

      I expect that when they started, they had no intention of porting to other platforms.

      Naughty Dog is Sony these days. They only make games for Sony platforms. So they targeted only the PS3. I'll bet when development started, Sony hadn't finalized PS4 plans.

      Now the PS4 is out and desperate for games (go ahead, name a PS4 exclusive), so Sony is having them port it to PS4. And since the game was never intended for anything other than the PS3, they're running into difficulties.

      I wouldn't blame the programmers for optimizing for the only platform they were told to target, I'd blame the managers for suddenly springing a new platform on them after the game was done.

      • by marsu_k ( 701360 )

        Now the PS4 is out and desperate for games (go ahead, name a PS4 exclusive)

        Easy. Infamous: Second son. Which apparently sold better than Titanfall on Xbone [theverge.com].

        • by _xeno_ ( 155264 )

          Except I've heard of Titanfall, and I though "Infamous: Second Son" was the PS3 sequel to Infamous. Apparently it's in fact the third game in the series, proving just how good Sony is at both marketing and naming things.

          Hilariously, when I Googled it to find that out, the top hit was "How Second Son Really Hurt The inFamous Franchise [onlysp.com]" so I'm not sure that's really a good exclusive to have...

          Plus your own link points out Titanfall sold better than Infamous Second Son, it just did it across more platforms bec

          • by marsu_k ( 701360 )
            I don't know what kind of personalized settings you have on your Google account, but I'm unable to find your link from the first four pages of my results (I never venture any further, usually never past page two even).
      • by Ihlosi ( 895663 )
        I expect that when they started, they had no intention of porting to other platforms.

        Oh, yeah ... that is the other mistake. "No one's ever gonna look at this code again, so it's okay if it's an incomprehensible, unmaintainable mess. Ship it!".

        • Oh, yeah ... that is the other mistake. "No one's ever gonna look at this code again, so it's okay if it's an incomprehensible, unmaintainable mess. Ship it!".

          But that's not what the summary said. It said the code is specific to a particular architecture, and there's considerable effort required to port it to a completely different architecture.

          It doesn't matter how neat your C program might be, moving the computations to OpenCL is still going to be a pain.

          • But that's not what the summary said. It said the code is specific to a particular architecture, and there's considerable effort required to port it to a completely different architecture.

            And that's why many developers (who have often sounded off here on slashdot) hated the PS2 and the PS3. Because it was so different, they made life harder and for what? In the end, most titles developed for both platforms (whether Xbox vs PS2 or Xbox 360 vs PS3) were smoother or had more detail on the Microsoft platform because it was easier to get more out of the machine. Developers don't want platforms that take so much effort to learn. They won't be able to take the skills to the next wacky architecture.

      • by Ihlosi ( 895663 )
        I'd blame the managers for suddenly springing a new platform on them after the game was done.

        This is normal manager behavior. An experienced programmer plans for it, or makes sure he's not the one who has to adapt the old code to the new platform.

      • Now the PS4 is out and desperate for games (go ahead, name a PS4 exclusive)

        Umm wait, I think I can name one..ummm. Resogun? Ummmm Infamous Second Sun? And there's a Brown Shooter or two I can't remember the name of. [looks over at the PS4 sittingmostly idle because of the lack of games in genres I want to play....maybe I should have got a Vita instead. I do play DCUO on it now and again....but that is not exclusive the PS4]

      • > I'll bet when development started, Sony hadn't finalized PS4 plans.

        That's correct. The PS4 was in development for about 4+ years. Naughty Dog's focus wasn't on writing a game for unannounced hardware whose specs were volatile but to finish and ship a game on a known platform. (Disclaimer: I used to work for SCEA.)

        > I'd blame the managers for suddenly springing a new platform on them after the game was done.

        That's exactly right. Short-term Profits vs Long-Term thinking.

        Someone needs to mod your p

    • Correct First, Clever Later is my core philosophy. There is nothing I don't abstract via portability layer.

      I wrote a "hobby" OS kernel from scratch, starting only with a bootable hex editor on x86. The FIRST thing I did was create a simple bytecode VM to call into a function table to give me ASM level abstraction, before I even switched out of realmode to protected mode. THEN I created the bootloader, a simple text editor, assembler, disassembler, a crappy starter file system, and that was enough to boot

      • by tepples ( 727027 )
        Your hobby OS sounds interesting, and your arguments that it's often more complicated than it may appear at first are compelling.

        THEN I created the bootloader, a simple text editor, assembler, disassembler, a crappy starter file system, and that was enough to bootstrap into a a full OS completely free from the Ken Thompson's Unix Compiler Hack.

        That's one way to defeat Trusting Trust. The other relies on having multiple implementations of a particular programming language, such as Visual C++ vs. GCC vs. Intel vs. Clang. David A. Wheeler pointed out in 2009 [dwheeler.com] that if you bootstrap a compiler with a bunch of independently developed compilers, the binaries will converge unless a Ken Thompson attack is in progress.

        All programs on my OS (yes even Java or C code) compiles into bytecode

        Interesting.

  • Why didn't Sony make the PS4 hardware more like that of the PS3? Then less effort would be needed to ensure PS3 games are portable to the newer system.
    • Because the PS3's hardware was stupid. It never paid out the kind of performance dividends they claimed it would, and to even approach them took insane amounts of effort.

    • by Lisias ( 447563 )

      Because IBM didn't improve the PowerPC processor line since them, while Intel, AMD et all spent a lot of money on the x86_64 architecture.

      In the end, it's not what the architecture did in the past - what matters is what the architecture will do in the future. Now, x86_64 is far more capable than the CELL architecture. So, if you want to build a top performance machine today, you will go with x86_64.

    • > Why didn't Sony make the PS4 hardware more like that of the PS3?

      There are 2 parts to the answer: hardware + software.

      SCEA, the games division of Sony, is NOT in the hardware business -- they are in the entertainment business. SAY WHAT?! But you ask "They designed all the hardware for the PS1, PS2, and PS3. What changed??"

      Designing and Developing custom hardware is incredibly expensive. Sony was in the RED for about 4 years due to paying an expensive development cost on the PS3. The PS2 GPU - the GS

  • Last consoles I owned was Atari 2600 & original Nintendo.
    I've been a PC gamer since.

    Plating Ghostbusters & Chuck Yeager's Flight Simulator with joystick on a Tandy 1000 EX was fun, and all the free games in basic that came in the old magazine "Home and Office Computing" which became Family Computing (http://en.wikipedia.org/wiki/Family_Computing)

    Anyhow I've never been a fan of consoles and while that might make me in the minority I still wished they'd ported to PC.

    Someone posted the entire last of

    • and all the free games in basic that came in the old magazine "Home and Office Computing" which became Family Computing (http://en.wikipedia.org/wiki/Family_Computing)

      You got that backwards, it was Family Computing first with the basic listings and game reviews and "full home computer coverage, not just covering x86 only"...and then later became Family and Home office computing, adding more articles for the "wannabe home-office entrepreneur" and then becoming "Home office computing" and dumping anything not home-office and IBM PC related.

      • by Cito ( 1725214 )

        Yes I just remember it was that magazine that taught me basic programming.

        After typing in hundreds of game code line by line they had as their "centerfold" it seemed, hundreds of games, modding them and I got pretty perfect at it. Even won first place in 8th grade FBLA state programming competition with a program you did your taxes on, then roll the 1040/ez form into an okidata printer and it would print the form, do the math and only thing to do was sign it is what won first in 8th grade, I was only one in

  • and brains and talent and resources... for a fucking video game. I wonder if people a hundred years from now will laugh at us or hate us for the squandered resources?

You are always doing something marginal when the boss drops by your desk.

Working...