Slashdot Mirror


The Art of PS3 Programming

The Guardian Gamesblog has a longish piece talking with Volatile Games, developers of the title Possession for the PS3, about what it's like to make a game for Sony's next-gen console. From the article: "At the end of the day it's just a multi-processor architecture. If you can get something running on eight threads of a PC CPU, you can get it running on eight processors on a PS3 - it's not massively different. There is a small 'gotcha' in there though. The main processor can access all the machine's video memory, but each of the seven SPE chips has access only to its own 256k of onboard memory - so if you have, say, a big mesh to process, it'll be necessary to stream it through a small amount of memory - you'd have to DMA it up to your cell chip and then process a little chunk, then DMA the next chunk, so you won't be able to jump around the memory as easily, which I guess you will be able to do on the Xbox 360."

99 comments

  1. It uses OpenGL by AKAImBatman · · Score: 5, Informative

    Apparently, the machine's use of Open GL as its graphics API means that anyone who's ever written games for the PC will be intimately familiar with the set-up.

    As a programmer, I can attest to OpenGL being a God-send. Not only are programmers intimately familiar with the technology, but it was designed from the beginning with portability in mind. Direct3D, OTOH, tends to follow Microsoft's practices of hiding what's really going on behind the scenes. It's been a little while since I've bothered with Direct3D, but one of Microsoft's biggest features used to be their own SceneGraph known as "Retained Mode". For some reason, Microsoft believed that everyone would want to use their Scenegraph only and damn technological progress. Most programmers who were in the know immediately bypassed this ridiculousness and went straight for the "Immediate Mode" APIs, which weren't as well documented. (Thanks Microsoft)

    Wikipedia has a comparison of Direct3D vs. OpenGL here: http://en.wikipedia.org/wiki/Direct3D_vs._OpenGL

    Other than that, a computer is a computer, and game programming has always required a strong knowledge of how computers operate. So it's not too surprising that it would be "just like any other programming +/- a few gotchas".

    1. Re:It uses OpenGL by HeavyMS · · Score: 2, Informative

      "It's been a little while since I've bothered with Direct3D"
      We can tell Immediate Mode/Retained Mode is ancient history..

    2. Re:It uses OpenGL by amliebsch · · Score: 4, Informative

      Thee article you cite to doesn't really support your conclusion of OpenGL being a "god-send." Instead, the article seems to conclude that at this stage, for all intents and purposes, the two APIs are functionally equivalent.

      --
      If you don't know where you are going, you will wind up somewhere else.
    3. Re:It uses OpenGL by AKAImBatman · · Score: 0, Flamebait

      We can tell Immediate Mode/Retained Mode is ancient history.

      Thank God. It was stupid to begin with, yet Microsoft kept pushing it version after version. I know it was still there at least as high as DirectX 5.0.

      With OpenGL having been ported to just about every platform in existence, it just doesn't make that much sense to bother with DirectX unless you really have to. (Which thanks to Microsoft's interference, does happen to professional developers. Poor bastards.)

    4. Re:It uses OpenGL by AKAImBatman · · Score: 3, Informative

      Thee article you cite to doesn't really support your conclusion of OpenGL being a "god-send."

      OpenGL is a God-send for a couple of reasons, IMHO:

      1) The API is well known by developers, and has remained stable from version to version. This reduces the amount of R&D and training that need to be done for a game.

      2) Use of OpenGL allows for portable code. While you can't completely get away with writing the same code between a PC version and a Console version, much of the rendering engine at least has a chance of getting reused.

      3) Carmack says so. ;-)

      4) New features actually go through a standards process, meaning that they get more documentation than just "whatever Microsoft feels like telling you".

      5) DirectX is a non-portable skill. It ties you to Windows and the X-Box(s). OpenGL "ties" you to the Gamecube, Windows, PS2, PS3, Linux, Macintosh, etc.

      That's my opinion, for what it's worth. That and 50 cents will get you a cup of coffee, so take it as you will.

    5. Re:It uses OpenGL by jinzumkei · · Score: 5, Insightful

      1) The API is well known by developers, and has remained stable from version to version. This reduces the amount of R&D and training that need to be done for a game.
      Uh most games nowadays use D3D.

      2) Use of OpenGL allows for portable code. While you can't completely get away with writing the same code between a PC version and a Console version, much of the rendering engine at least has a chance of getting reused.
      If you write a flexible enough rendering engine this wont matter so much.

      3) Carmack says so. ;-)
      yeah, ok. good reason

      4) New features actually go through a standards process, meaning that they get more documentation than just "whatever Microsoft feels like telling you".
      Which also means it takes long YEARS for a new version to come out, how long have we been waiting on OpenGL 2.0? Some cool things have come out since and OpenGL is always playing catch now.

      5) DirectX is a non-portable skill. It ties you to Windows and the X-Box(s). OpenGL "ties" you to the Gamecube, Windows, PS2, PS3, Linux, Macintosh, etc.
      Graphics Programming is a portable skill, I've never met a good graphics programmer who couldnt switch between the two on the fly. Honestly if you can only do graphics in 1 or the other that's pretty worthless.

      I'm sorry the whole DX vs OGL war is really old and really lame, Neither are a "god-send". They are both tools, use the one that is best for the job.

    6. Re:It uses OpenGL by AKAImBatman · · Score: 1

      Uh most games nowadays use D3D.

      Most games for windows use D3D. Consoles are still a big business, and OpenGL rules the day on those. Also, major engines like Doom III and UnrealEngine 3 have Direct3D and OpenGL modes to help with portability.

      3) Carmack says so. ;-)
      yeah, ok. good reason


      That's a joke. Smile. :-)

      Which also means it takes long YEARS for a new version to come out, how long have we been waiting on OpenGL 2.0?

      I believe you mean, "how long were we waiting on OpenGL 2.0?" And you're right. Quite awhile. But in the meantime, extensions were making up for the slack while things got worked out. OpenGL 2.0 ended up being released in time to be highly competitive.

      Graphics Programming is a portable skill, I've never met a good graphics programmer who couldnt switch between the two on the fly. Honestly if you can only do graphics in 1 or the other that's pretty worthless.

      I agree, Graphics Programming is portable. That doesn't mean that the time to learn Microsoft's latest reorg of DirectX is zero. Even OpenGL's latest stuff takes time to learn, but at least most programmers can keep up on it before the newest version becomes available. Microsoft wants you to become a partner or somesuch nonsense to get access to all the info you need.

      They are both tools, use the one that is best for the job.

      Indeed. :-)

    7. Re:It uses OpenGL by drinkypoo · · Score: 0, Flamebait

      OTOH every 3d graphics card manufacturer provides an OpenGL library. There's really no reason you have to be tied to Direct3D. There are however good reasons to use other parts of DirectX, specifically DirectInput. I hear SDL has something like DirectInput now, but I haven't looked at it yet. SDL definitely provides a layer over audio that will pipe stuff to DirectAudio, though, and you can use OpenGL for cross-platform graphics, which is pretty much the method that I think makes sense.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    8. Re:It uses OpenGL by Haeleth · · Score: 4, Insightful

      [Retained Mode] was stupid to begin with, yet Microsoft kept pushing it version after version. I know it was still there at least as high as DirectX 5.0.

      Look, you're welcome to hate Microsoft if you choose, but your memory is rather inaccurate.

      Get this: Retained mode was not meant for games. Microsoft never "pushed" it for games. Immediate mode was always there for games to use. Games were always supposed to use immediate mode.

      It's been a while since I read the documentation for ancient DirectX versions, but IIRC it actually said, right there, quite explicitly, in the documentation, that retained mode was not meant for high-performance graphics and that games should use immediate mode.

      The idea of retained mode was that it provided a much simpler interface. It was intended for use by multimedia applications that did not require the power and flexiblity of immediate mode, but just wanted to throw a few 3D meshes on screen and move them about a bit, without all the hassle of coding all the data structures and transformations by hand. It didn't catch on, and it eventually died, but it wasn't stupid by any means, and something very similar will be making a comeback in Windows Vista.

      At least, I say it wasn't stupid. Maybe it was stupid. I don't see how providing a simplified API for simple applications, and a complex API for complex applications, is "stupid", but then I use Microsoft software out of choice, so clearly I don't hate Microsoft badly enough yet for me to be able to judge their decisions objectively.

    9. Re:It uses OpenGL by Trinn · · Score: 2, Informative

      As someone who has done a lot of programming in SDL, yes it has an input layer that is fairly good, integrated into the main SDL event loop. The major missing piece as far as myself and my fellow developers are concerned is a library for mapping SDL input events to some sort of internal game events (control customization). Eventually we plan to write one, but we are...lazy.

    10. Re:It uses OpenGL by ivoras · · Score: 1

      Immediate mode was not even available in DX until version 5.

      --
      -- Sig down
    11. Re:It uses OpenGL by Anonymous Coward · · Score: 0

      As a programmer, I can attest to OpenGL being a God-send.

      It's a graphics API.

      Not only are programmers intimately familiar with the technology

      I've not written a DirectX driver. I've not written an OpenGL driver either. I'm still somehow intimately familiar with bits of both APIs.

      Direct3D, OTOH, tends to follow Microsoft's practices of hiding what's really going on behind the scenes.

      Yeah, it would be a shame if they wrote some exhaustive documentation about it and had some support newsgroups that helped programmers with any problems.

      It's been a little while since I've bothered with Direct3D

      Congratulations for having a strong opinion about a technology that you do not use.

    12. Re:It uses OpenGL by nobodyman · · Score: 1
      If you write a flexible enough rendering engine this wont matter so much.

      True, but part of the reason why you use a graphics API is to spare programmers the work of rolling their own rendering engine in the first place, right? A wrapper layer shields the layers above (maybe), but somebody's still gonna have to write the layers under it. Far from trivial.
    13. Re:It uses OpenGL by Keeper · · Score: 1

      So? 3D hardware wasn't supported AT ALL until DX5. DirectX was 2d only until '97. Back in the day Microsoft was planning on using OpenGL for 3d games, but the standards body moved at such a glacial pace (and had such a snobbish "opengl is for high end graphics only" attitude) that they said "screw it" and did their own thing.

    14. Re:It uses OpenGL by andi75 · · Score: 1

      I can't believe this got modded to +5. Direct3D retained mode was generally frowned upon and completely ignored even in the days of DirectX 3. At least since version 6, Direct3D is a perfectly usable API and the TextureStageState setup as introduced in DirectX 7 just beats the crap out of OpenGLs glTexEnv mess.

      Too bad it's not cross platform

    15. Re:It uses OpenGL by SuiteSisterMary · · Score: 1

      Correct me if I'm wrong, but I seem to recall, for example, Doom 3 having several different OpenGL 'paths;' straight-OpenGL, Geforce, Geforce 3+, ATI, and something-or-other else, mainly due to propriatry extensions.

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    16. Re:It uses OpenGL by xtieburn · · Score: 1

      No offense but I think this is deceptive about how informative it is.

      They didnt choose OpenGL as opposed to Direct3D They chose it as opposed to a proprietry API. Thats quite different.

      There are plenty of arguments for Direct3D being just as capable as OpenGL a good quantity of people believe its better. This, however, is largely irrelevant to Sony, who are in direct opposition to the people who make Direct3D.

      So instead of choosing OpenGL as a wise development move its far more likely they chose it because the only other easy development API would have ment being in MS's pocket. Direct3D really was never an option.

      Still always nice to have a Direct3D vs OpenGL show down.

    17. Re:It uses OpenGL by Breakfast+Pants · · Score: 1

      They would have had to do the same thing if they used Direct X.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    18. Re:It uses OpenGL by NutscrapeSucks · · Score: 1

      3) Carmack says so. ;-)

      Read anything from Carmack in the last year or so? He's big into pimping XNA, which means he's presumably gone all the way over to DirectX.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
  2. Re:Halo by RoadDoggFL · · Score: 1, Offtopic

    No, but it'll run Linux.

    --
    "This is considered plagiarism."
  3. Re:Yet another reason by Dogers · · Score: 1, Insightful

    Because it's unproven, not *actually* available now and there's no laptop/low power version even planned??

    --
    I am a viral sig. Please copy me and help me spread. Thank you.
  4. Re:Yet another reason by BillBrasky · · Score: 3, Informative

    Keep in mind that all the "extra" cores are special-purpose cores that can only execute code specifically written for them. They are not general-purpose cores so you can run 16 applications simultaneously. Also consider that the CPUs for the new consoles are targeted at consoles and not multitasking operating systems with lots of context switching. There's also the roadmap issue. Sure, this one processor will be available, but what about speed bumps and future generations?

  5. 8 Threads? by Kent+Simon · · Score: 2, Informative

    I'm still baffled into how you can efficiently break up a game into 8 threads.

    ok controller input on one..
    graphics on another..
    physics on a third .... woops problem...need critical sections for this to operate with the graphics thread.
    networking on a fourth .... woops problem, need ritical sections for this to operate with the physics thread..
    sound... ok no problems here, thats 5.


    See, even dividing it up into 5 threads causes problems, you need to make sure that you are allowed to do something on one processor and if not you must wait on another processor to finish. critical sections are something that can ultimately cause your code to run slower than if it was not multithreaded in the first place.

    More info on critical sections, and other issues involved with programming multithreaded apps can be found here

    --
    Kent Simon Multitheft Auto
    1. Re:8 Threads? by Dr.+Manhattan · · Score: 4, Informative
      I'm still baffled into how you can efficiently break up a game into 8 threads.

      TFA says they are contemplating a job-queue organization, with cores taking jobs as they become available. Provided the size of the 'jobs' are limited so they fit comfortably within the overall time it takes to calculate a frame, it should work fairly well. A lot of physical-simulation problems are close to 'embarassingly parallel', anyway.

      --
      PHEM - party like it's 1997-2003!
    2. Re:8 Threads? by hobbit · · Score: 3, Funny


      6) Monsters
      7) Aliens
      8) Baddies

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
    3. Re:8 Threads? by karnal · · Score: 4, Informative

      One thing to think about though, regarding threading.

      Just because you have critical sections in one thread that may have to hang out waiting for another thread, doesn't mean that at some point in time the two threads can't execute simultaneously while not needing data from one another. At times like that, you get speedup (especially since you have seperate cores/processing units/whatever)

      --
      Karnal
    4. Re:8 Threads? by AKAImBatman · · Score: 2, Informative

      I can think of a few ways off the top of my head, but none I'd actually like to try coding. For example, you can divy up the collision detection process across different threads to have each processor test a given percentage of objects. Similarly, you can assign the physics handling for different objects across different processors.

      The article suggests that this be done by having a single "controller" processor rapid fire the tasks to the other processors. While this would work, it's also less efficient than a true parallel scheme. The article also mentions this, and comments that the scheme could result in poor utilization of the system's processors. But if a true parallel scheme is used, then it's difficult to reassign the processors in case a sudden jump in processing ability is required for, say, graphics over physics.

      So it would seem that there's still some question as to how useful the multi-processors concept actually is in games. At least until new methodolgies emerge. :-)

    5. Re:8 Threads? by AuMatar · · Score: 2, Interesting

      Its worse than that.

      Controlers- no reason to have a thread, you use interrupts and wake up once a second when an input changes. No thread needed.

      Sound- unless you're doing heavy duty software mixing (not hardware mixing or channels), you don't need a thread, its all interrupt driven.

      Network IO- a thread probably isn't the best way to do it for the client. Just poll for IO once a frame. Or use select to sleep if you have no other processing to do

      AI- this one makes more sense, a smart AI can try and predict moves and counters ahead of time.

      I really don't see most games making use of 8 threads. Most games now are still single threaded.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    6. Re:8 Threads? by drgould · · Score: 1

      I'm still baffled into how you can efficiently break up a game into 8 threads.

      You don't simply break up a game into 8 threads. Remember 7 of those 8 processors are not really general-purpose CPUs, but SPEs, more like vector processors. Moreover, the SPEs don't have direct access to main memory, they have to be spoon fed from the main processor or some sort of DMA controller.

      So the main CPU would have to set up the SPEs and then handle all of the networking and I/O and stuff, while the SPEs would handle the computationally intensive stuff like the physics, sound, AI, etc.

      Sounds like a bitch to program to me.

    7. Re:8 Threads? by astromog · · Score: 5, Insightful

      What I find interesting about the question of "What can I do with 8 threads?" is that most people seem to assume that you can only have one graphics thread. Why not have 2? Or 3? Or 6? The Emotion Engine's core design is based around having two parallel programmable units handling graphics at the same time, for example one animates the surface of a lake while the other makes the pretty refracted light patterns on the bottom. Yes, it's nastier to program than standard single-thread-for-each-task programming, but it makes for a very powerful architecture when used properly. Similar things can be done with other parts of a game, and if you design your data layout and flow correctly you minimise the need for synchronisation. You could draw your frame with 7 parallel threads, then flip all the SPEs over to handle the physics, input, etc update for the next frame. It's all just a matter of thinking about how you design your game.

    8. Re:8 Threads? by MikeFM · · Score: 1

      Really not to hard. A lot of the time you can break any logic of game objects down to run in their own threads so it shouldn't be to hard to schedule the engine to run as many game objects as you can while still processing physics and and graphics and such. Not as easy as a linear program but not so hard either and it allows you to get more done in a given slice of time.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    9. Re:8 Threads? by stonecypher · · Score: 0

      1) cut the screen down the middle
      2) cut the screen horizontally 3 times
      3) ???
      4) profit from 8 cores

      --
      StoneCypher is Full of BS
    10. Re:8 Threads? by w1ll0w · · Score: 1

      Most games are not still single threaded. If you use direct play you automatically have multiple threads. Pc games use threads all the time. There a lot more uses on the pc than a console, eg. mouse, ai, streaming. The developers will figure out a way to use them efficiently. In fact I don't think I've worked on one single threaded game.

    11. Re:8 Threads? by Anonymous Coward · · Score: 0

      Wow... that's the lowest UID I've seen here quite in a while. While we're on the subject, go level up noob.

    12. Re:8 Threads? by AuMatar · · Score: 1

      Mouse? That alone proves you don't know what the hell you're talking about- why would the mouse need a thread? The mouse is interrupt driven. So is the keyboard. There's 0 point in using a thread to control an interrupt IO system- immediate processing happens on the interrupt, delayed processing is handled by the main thread when it reaches the check for input phase of its work.

      Streaming? Thats the very definition of what DMA is meant for. No need for a thread to stream content- you decode it to memory and DMA the memory. The only time that might be valid would be on a console with low memory.

      As I said- most games are single threaded. Its very easy to check- load a game and see how many threads are running in your system. I just tried 3 or 4 games, and exactly one of them had 2 threads. Looks like it was using it for AI.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    13. Re:8 Threads? by w1ll0w · · Score: 1

      Actually the graphics on the mouse, the pretty little cursor you see in pc games, usually has it's own thread. This is so that when the game slows down the user isn't frustrated with the mouse being really jerky. Windows is message based, so if your not processing the messages nothing happens. Carmack is pretty keen on keeping his engines single threaded because he doesn't believe the overhead is worth it. So i'm not sure what games you talking about unless they are old dos games or something based on id's tech. I can't think of a single modern engine that is single threaded. Also, which games have you worked on? Just curious because you talk as if you know what your talking about. Because if you handle interrupts directly than you probably worked on games 10+ years ago when everybody was making games for dos and you needed to.

    14. Re:8 Threads? by bain · · Score: 1

      Us oldies just watch now .. to much newbie noise ;P

      --
      Sanity is a majority vote.
    15. Re:8 Threads? by IntergalacticWalrus · · Score: 1

      No, games usually use a second thread for sound. There's not much point in threading AI.

    16. Re:8 Threads? by mnmn · · Score: 1

      "I really don't see most games making use of 8 threads. Most games now are still single threaded"

      Thats exactly the problem the industry is trying to fix. The move to more than one threads to make things efficient.

      Take a look at it this way. Processors are made on 65nm processes, which will go down to 45nm processes. We're reaching the limits of moore's law. Their overclockability will increase as dies are stacked like PCBs, but that will reach an end too. Next step really is a break from the traditional single core, because what that single core really does is switch between multiple tasks. This has already been accomplished with the use of the GPU and the increasing use of sound and network processors (also high end scsi cards).

      Next step is parallelizing general processes, the 'ps -e' list across cores or CPUs. Thanks to solaris and linux, such technology is already doing quite well in some markets. Only this is now going down to more advanced applications and cheaper computers. Thats the natural progression isnt it? Starting from mainframes and going down to game consoles.

      I can see specialized game SDKs focusing on the seperate parts of a game, efficiently scheduling them to talk to one another etc to be able to linearly use as many cores as the game can be split into. Among other things I can think of the AI of various bots processing on different cores or dynamic worlds being generated by some cores for others. 8 is quite a good number of cores to start out. Dual cores are almost a given, most new desktop cpus are dual-core, which plus the GPU form 3 cores in the current market. Would it take a lot to go from 3 to 8?

      --
      "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    17. Re:8 Threads? by dreemernj · · Score: 1

      What games? I only have a few, Doom 3, Half Life 2, UT2K4, they're all multithreaded.

      But, I was under the impression, and I'm not some expert, that the benchmarks showed games like these running better on processors that don't necessarily have better threading capabilities, which leaves me with the impression that while these games are multithreaded the bulk of the work still relies on only a handful or even one thread. Again, no expert so I could be totally wrong.

      I know personally I love threading because I am a n00b programmer and probably will be for life since I never spend time on it, and I just started using the Allegro library to throw together something quick with graphics, and threading is insanely simple to program in that, I assume far simpler then actually implementing it on my own. On the simple stuff I do, often running multiple math functions at once on tons of data, the multi threading helps with performance a bit. I would guess better programmers would get better results and that professionals could probably turn the multiple cores or whatever of the PS3 into something pretty powerful.

      --
      1 (short ton / firkin) = 89.1432354 slugs / keg
    18. Re:8 Threads? by Hard_Rock_2 · · Score: 1

      Thats great and all, except the cell chip isnt responsible for the graphics, that would be why they stuck an nvidia chip in there. (the original plan was to use the cell chip to render the graphics as well, however they found that the cell chip was not quit up to the task).

    19. Re:8 Threads? by robson · · Score: 1

      6) Monsters
      7) Aliens
      8) Baddies

      So obviously, any PS3 game that is lacking one or more of these elements is not harnessing the full power of the console. ;)

    20. Re:8 Threads? by astromog · · Score: 1

      The nvidia chip is responsible for drawing the graphics, not controlling and generating the geometry. The Emotion Engine used the same system and it works very well.

    21. Re:8 Threads? by doctrbl · · Score: 1

      You do know the difference between a thread and a process, right?

    22. Re:8 Threads? by Anonymous Coward · · Score: 0

      The original plan was to use a second Cell processor to draw the graphics. I'm not sure if they abandoned the design because the Cell wasn't up for the job or because doing that would have placed too much of a burden on the developers.

    23. Re:8 Threads? by xtieburn · · Score: 1

      In theory it is easier than it sounds just like the article says.

      For instance take a simple pool simulator with 4 or 5 balls. You hit the cue ball in to the triangle of pool balls. Collision detection isnt utilized until after the balls have been moved so you simply give each ball and SPE to work out where its moved to and you are processing them all at once. Not to hard.
      The process can be used for testing actual collisions as well so that can be done for each ball on each SPE as well.

      Thing is there are some hefty inefficiencies here. It certainly isnt using the threading to its maximum potential. Optimization is a little more complicated. For instance, you have all the balls new positions now do you a) use an SPE to start on the graphics side of things (which as any good programmer knows should be entirely disconnected from the system.) at the same time as the balls are being checked for collisions. or b) Wait and waste processing time as the remaining SPE's complete there task.

      b) is nice and linear you setup one list of jobs nock em down setup the next but at the cost of efficiency.

      a) is different, given that most balls in an average game of pool arnt going to be bouncing off each other all over the place its probably more efficient in the long run. However, for those balls that have collided youve then got to utilise threads to calculate their effects and redraw them. Makes things more complicated. (Remember if your using this method that the graphics will be trying to move on to the next process after placing the geometry at the same time as youve just discovered some balls require repositioning and fresh geometry to be drawn up.)

      It gets more complicated when you think that that is just one test and one transition. From collision detection to drawing the graphics. In reality youd have collision detection include a routine to find out if the balls have passed through each other and you would need to ensure the paths of the balls were accurate with runge kutta or some such.* Youd also have to co-ordinate drawing the geometry with this new step and with the more advanced graphical things that need to happen after youve got the basic shapes and positions down.

      When you also consider that this is one of the simplest physics examples you could have running you can see how in practice threaded programming can fast get out of control. Im certain there are much higher levels of parrellel processing that would increase efficiency and complexity even further.

      So in response to the article. I think they are correct in saying that it isnt as hard as it has been made out to be, but then ive heard people claim the PS3 will be no more powerful than a PS2 on launch so thats not hard.
      On the other hand I think the article downplays the serious complexity that multi threaded processing will ultimately require to get the full power out of it.

      I also think the PC comparison is daft. An 8 threaded brand new CPU without cache is nothing like a 2 threaded traditional AMD/Intel CPU. An AMD or Intel could do the inefficient method of processing and not lose much ability because its already a really powerful chip. If the Cell didnt utilise any threaded processing it would be much worse than most desktop computers. It has much more potential to go horribly wrong.

      This isnt an 'end of the day thing.' This is a 'whole new day of really complicated designs and ideas' thing, but then, thats not necasarily a bad thing at all.

      Oh and please note I wasnt the greatest of games programmers even when I was programming games, so take this with a pinch of salt or even better throw in some corrections.

      *In case your wondering if, when detecting collisions you basically test whether a ball is inside another ball. If it is they must have collided with each other and you back them up do some jiggery pokery with their forces and send them on there way. If they are moving too fast then the time period youve taken to get their new positions might be sufficiently large to allo

    24. Re:8 Threads? by BungMunky · · Score: 1

      I am NOT a programmer at all, but conceptually, why would you not have everything running round robin style on each processor, or allocate whatever was needed processor wise as a trffic router, then say 6 for all functions, 2 for traffic? Please don't flame me. Just link me out to a FAQ that explains it better, but in my mind, that would make max use fo the style of engine it had.

    25. Re:8 Threads? by Anonymous Coward · · Score: 0

      Yeah, no one ever said it was just impossible, or something. But realisitically, it's going to take a lot of time writing systems to handle the "gotchas" of the PS3, all of which sound like a bitch and a half to any developer that's dealt with such things before. Not really the kind of thing you want to have to deal with when you're trying to get a game out on an insanely limited schedule. So, IMO, there will likely be a lot of games that won't take advantage of the Cell properly.

    26. Re:8 Threads? by roju · · Score: 1

      I assumed that you'd parallelize smaller jobs. For instance, suppose you're decoding mpeg. Mpeg is broken up into macroblocks. You could get a theoretical 8x performance boost by dividing up the work across all the processors. Don't think in terms of big threads, think about little, task specific threads.

    27. Re:8 Threads? by try_anything · · Score: 1

      I'm a little late here, but TFA contains a very good suggestion that I've used: job queues. That guarantees that you don't have physics resources idling while graphics jobs are waiting to be done, and vice-versa. A perk of the jobs and job queues model is that it's simple to understand (as multithreaded models go), and there tends to be a much simpler relationship between the software design and the dependency/deadlock analysis than with other models. In general, job queues give you more rigor with less thinking.

  6. Pipeline them or divy up loops by sunbeam60 · · Score: 2, Informative

    There are other ways to divy up work.

    If your intention is to put independent tasks out to different processors, you will run into huge issues like the ones you describe.

    Instead, consider the beginning of each logical step in the game loop as a "constriction/delegation" point: You constrict, meaning that only one thread is running right now. Then, say, it's time for particles. You now wake up your eight particle worker threads, divy up the gargantuan 2000 particle emitter loop into 250 emitters each. You then instruct each particle thread to work through the 250 emitters and wait for them all to finish.

    Naturally your real performance won't be as if you only had to process 250 emitters, but let's say you lose 50% due to internal synchronization, you've still processed all your particles in 25% of the time.

    Another way is to pipeline the tasks: You know that all your game gizmos have to first do this, then that and then the other. You create three task threads, one that does "this", one that does "that" and one that does "the other". You feed the first gizmo to the "this" thread. When it is done, it will feed the gizmo on towards the "that"-thread. When the "that"-thread is done, it will in lastly feed the gizmo on the "the other"-thread.

    But once the first thread (the "this" task) is done, it can accept a new gizmo while the "that"-thread munches on the first.

    Advantage to this scheme is better memory locality (which seems like it is more important on PS3 that, say, PC) that the divide'n'conquer approach described first. Of course, individual game gizmos may have dependencies in between them, so you need a proper dependency graph to feed gizmos off the right order.

    It's doable, as long as you don't think 8 threads have to independently work on completely different tasks at the same time.

  7. SPE overhead by ClamIAm · · Score: 4, Insightful
    As game developers use the 7 SPE chips more, I wonder how much of the main CPU's time will be taken up by things like managing threads and packing up work for the SPEs. It's almost similar to an operating system, where the main CPU would almost be like a kernel, managing memory and allowing different threads to talk to each other.

    (If the OS analogy is flawed, sorry).

    1. Re:SPE overhead by AKAImBatman · · Score: 1

      No, your analogy is pretty much on target. Video games are a form of Real-Time system. Real Time Operating Systems are the origin of our modern, pre-emptable, multi-tasking environments. The only difference between game programming and most RTOSes is that game programmers tend to prefer to manage the task splits in a manual, calculated-time-to-execute fashion rather than a pre-emptable fashion as games don't lend themselves well to being pre-empted.

    2. Re:SPE overhead by ivoras · · Score: 1
      The correct issue here is that it seems the Cell is not a SMP http://en.wikipedia.org/wiki/Symmetric_multiproces sing processor, but an asymmetric or at least NUMA one.

      So, you don't just get to create 8 threads all of which can do arbitrary jobs, but you must explicitely split and divide the jobs and assigned them to specific processors (and do this from the thread that runs on the master processor). In a SMP system, the OS can move threads across processors freely, but not so here, and because of that programming would be harder than usual.

      I think 1+7 CPUs deal like that would be ideal for huge batch processing jobs, such as encoding/decoding and mass calculations on similar data: just divide input into chunks, and process 7 or 8 chunks at a time. The need to constantly copy chunks of memory between individual processors would require either a very clever OS, or much hard work for the programmer. Also, it would probably be pessimal to make this kind of division of work: lets make cpus #1-#5 do monsters, cpu #6 process input, and cpu #7 sound, because at the end all processing results must be integrated into one single thing: the screen. Unless memory copies are remarkably fast and thread synchronisation routines very optimised, performance will suffer.

      Note: I'm not an expert and don't know actual architecture of PS3 or Cell, so at best this is an educated guess. :) On the other hand, the "256k of onboard memory per processor" thing could also mean the author of the article is somehow confused about L2 cache :)

      --
      -- Sig down
    3. Re:SPE overhead by ClamIAm · · Score: 1
      So, you don't just get to create 8 threads all of which can do arbitrary jobs, but you must explicitely split and divide the jobs and assigned them to specific processors (and do this from the thread that runs on the master processor).

      Er, I wasn't trying to make it sound different than this. Sorry if I did.

      The need to constantly copy chunks of memory between individual processors would require either a very clever OS, or much hard work for the programmer.

      Yeah, it'll be interesting to see what tricks people come up with to make this beast run real-time AI, physics, graphics and so on all simultaneously. I get the impression that it'll have to be some very smart code. Hopefully we'll get some articles that are a bit more in-depth.

    4. Re:SPE overhead by ivoras · · Score: 1
      Er, I wasn't trying to make it sound different than this. Sorry if I did.
      I'm tired - I probably need to apologize because I didn't pay attention :)
      --
      -- Sig down
  8. "i guess"? by CDPatten · · Score: 0, Flamebait

    "...you'd have to DMA it up to your cell chip and then process a little chunk, then DMA the next chunk, so you won't be able to jump around the memory as easily, which I guess you will be able to do on the Xbox 360."

    "I guess"? Thats a HUGE deal. In essence you cripple all of the other cores. Not to mention we have seen articles posted on slashdot before that point out you can't use all 8 cores for a game, but "I guess" that is another topic all together.

    "I guess" what I'm getting at is that this guy is obviously bias and doing a fluff piece/ damage control. His choice of words is very telling, and the attempt to downplay a HUGE gotcha makes me skeptical of everything he says.

    I can't speak to PS3 development (yet), because none of my clients are working with it... but I look forward to having the opportunity... but this article makes me believe that it really is as bad as others have said.

    1. Re:"i guess"? by mabinogi · · Score: 1

      There is no "gotcha" because no one should have been under the impression that you could use all 8 cores just like a regular general purpose CPU core in the first place.
      Anyone that did have that impression, and was supposed to be developing for the PS3, should be out of a job.

      When it comes down to it, any speculation or flaming about how difficult or easy it is to write code for the PS3 is idiotic. It doesn't change the reality of it - difficult or not - and in the end, the games are the only thing that matters.

      --
      Advanced users are users too!
    2. Re:"i guess"? by Kjella · · Score: 1

      When it comes down to it, any speculation or flaming about how difficult or easy it is to write code for the PS3 is idiotic. It doesn't change the reality of it - difficult or not - and in the end, the games are the only thing that matters.

      If you don't think it matters, try writing a game - any game - in assembler. You'll soon realize that how much time you spend dicking around with a stupid interface (API would be too much of a compliment) translates real well to how good your game will be.

      --
      Live today, because you never know what tomorrow brings
    3. Re:"i guess"? by Samurai+Crow · · Score: 1

      You seem to also be forgetting that linked structures can be prefetched by the DMA in ways that even a lock-in cache cannot. If you have a mesh stored as an array (as most are) then you run into trouble. If you are dealing with something stored in a linked tree structure or a linked list, the SPE will outperform a general purpose CPU.

    4. Re:"i guess"? by kai.chan · · Score: 1

      Tell me, at what point does one send a big mesh to the processor when there is a GPU? What kind of real-time process are you running that requires so much computing power that you cannot parallelize the process? Video and Audio? No, they are highly parallelizable. AI and Physics? No, they are not computation intensive relative to multimedia. 3D graphics? Taken care of by the GPU.

    5. Re:"i guess"? by mabinogi · · Score: 1

      Of course it _matters_.
      All I'm saying is that spouting off about it on slashdot doesn't change how hard it is, and in the end, even if it is hard - if we still get good games, what does it matter us as end users?

      Of course, if we don't get good games because it's too hard, then it does matter, but bitching about it on slashdot still won't fix it.

      --
      Advanced users are users too!
    6. Re:"i guess"? by Anonymous Coward · · Score: 0

      You can write SPE code in C, no need to use assembler unless you want to.

    7. Re:"i guess"? by Anonymous Coward · · Score: 0

      It's better to think of the SPUs as 'DSPs with memory controlers'. Tasks like audio processing are of course well suited for SPUs, and I've seen the results to prove it. Breakup for more complex 'pairing' operations like collision resolution just have to be rethought out. You have to ensure contiguous memory due to the DMA -> cache -> process cycle, but mirco management of your heap isn't anything new.

      Also SCEA has a job control subsystem in place to make task management easy and extensible, which has the added benefit of allowing middleware hooking into SPUs easier to use across games. I don't get why people want to bad mouth something they don't understand.

      Anonamoose!

  9. One Word. by Anonymous Coward · · Score: 0

    Artificial Intelligence.

  10. Re:Yet another reason by Anonymous Coward · · Score: 0

    You are wrong. While the SPEs are highly optimised to specific types of tasks, they are certianly capable of general purpose computing.

  11. Missing the point. by Anonymous Coward · · Score: 5, Informative

    A lot of people seem to be approaching the concept of the Cell processor improperly. The chip itself is not designed for the "Design a game in 8 threads" approach people seem to be thinking of. It's designed based on a forman/worker metaphore. The main chip handles the work of figuring out what comes next, the SPE's do the heavy lifting.

    Don't think
    Processor 1 = AI
    Processor 2 = Physics
    Processor 3 = ...
    etc.

    Instead picture the main CPU going through a normal game loop (simplified here)
    Step 1: Update positions
    Step 2: Check for collisions
    Step 3: Perform motion caluclations
    Step 4: AI

    At the beginning of each step the main CPU farms out the work to the SPE's. So, you have a burst of activity in the SPE's for each step, thun a lull as the main core figures out what to do next.

    1. Re:Missing the point. by Anonymous Coward · · Score: 0

      Wow. Giving out NDA'd information only two days after DevCon. Good job sir!

    2. Re:Missing the point. by Anonymous Coward · · Score: 0

      Huh?

    3. Re:Missing the point. by DigitalBubblebath · · Score: 1

      But is that a behaviour the programmer would have to explicitly define? Shouldn't something like the foreman/worker behaviour be built-in to the main chip already?

    4. Re:Missing the point. by SporkLand · · Score: 1
      I hadn't really thought of designing in terms of foreman/worker for the PS3 and I seem to like it, but you get to this statement:
      At the beginning of each step the main CPU farms out the work to the SPE's. So, you have a burst of activity in the SPE's for each step, thun a lull as the main core figures out what to do next.
      Unless I completely mis-understood all of my processor architecture / optimizing compiler classes, to get the best usage of a processor's resources you want all of those resources to be utilized at the same time. So the model I'd be thinking about in my head would be: T1: Foreman working on step1 Workers doing nothing T2: Foreman working on step2 Workers processing instructions from step1 ... So then you have all of your elements engaged at all times. It will be interesting to see how tolerant of branches this whole set-up would be. Anyway, thanks for changing my perspective on how you'd go about programming on the ps3.
  12. Re:8 Threads? To fix what I hate most by MBCook · · Score: 0
    The thing I'm hoping those 8 cores will be used for is to fix those things I hate most. If you have that much extra power, spend some of it on the little things.

    You can make good ripples on water, and do other geometry things. Make the trees have REAL leaves (like that great Cell demo). Make more individual blades of grass and such. Just little things that act correct so the world looks more "real" and less "here is a random bush so you don't notice there are no bushes".

    Hair, clothes, weapons. Make them act more realistically when walking, etc. Why is it every game seems to have a walk cycle or some such where parts of a character's model (weapon, hair, clothes, etc) move in and out of another part (intersecting). With your free CPU time, you can test this and make sure the weapon doesn't SLICE MY CHARACTER'S THIGH as I walk.

    Other little things like this. Add more rabbits, ants, birds, squirrels, whatever around the world. Make more NPCs who walk around town. Whatever. Just make things more alive.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  13. At the end of day... by Anonymous Coward · · Score: 3, Funny

    At the end of the day, people who say "at the end of the day" just REALLY need to stop saying "at the end of the day".

  14. Unlike PC !!! by Alban · · Score: 1

    The ps3 will surely have way more bus contention issues than a PC. While the high level issues of concurrent programming will be comparable to any multi-processor architecture, once you get into the low level details, the similarities will end.

  15. Wouldn't surprise me by Anonymous Coward · · Score: 0

    The PS2 was the same way. Sony provided a decently powerful graphics subsystem but they crippled it by only providing 4MB of RAM. But hey, they can put "eight cores" in the marketing brochures can't they?

    1. Re:Wouldn't surprise me by Anonymous Coward · · Score: 0

      When the PS2 was first designed/built, 4MB was about the maximum amount of embedded RAM you could have. More video memory would have meant it would have had to be a lot slower, and Sony decided to design the whole machine around streaming data at high speeds. As all engineering, it's about tradeoffs.

  16. What bus contention? by Anonymous Coward · · Score: 1, Insightful

    The ps3 will surely have way more bus contention issues than a PC

    You do realize that the memory in each SPE is *local* memory, right? The 7 SPEs can all run flat out without creating any bus contention whatsoever on memory access.

    And as for the DMA hardware and interconnect buses, those have immense bandwidth. I really wouldn't be concerned about contention on DMA to main memory.

    The more likely problem is DMA latency, since small DMA requests may get delayed by longer ones. However, even that is unlikely unless the designers have chopped up the tasking extremely finely and thus made communication time significant compared to processing time, which is never a good idea.

  17. Lockout chips by tepples · · Score: 1

    Most games for windows use D3D. Consoles are still a big business

    And most independent games are for Windows.

    1. Re:Lockout chips by el_womble · · Score: 1

      Why do independant gamers do this to themselves?

      Why not code in OpenGL?

      OpenGL drivers are freely available on evey major platform, just as C compilers are. Why limit yourself to a single market when you can target them all?

      --
      Scared of flying, pointy things snce 1979!
    2. Re:Lockout chips by Keeper · · Score: 1

      For the same reason cross platform developers don't all use Java. You end up having to tweak things for every platform anyway. Just because something compiles doesn't mean it works right.

  18. I mostly agree, but... by nobodyman · · Score: 1

    I agree for the most part, but just a couple points

    -There's the joke that goes "Don't buy anything from microsoft until at least the third version.". Direct3D definitely fits into that stigma. The early versions of directx were apparently garbage I think Direct3D v3.0 was the version that Carmack blasted when he opted to use OpenGL. I've read that nowadays he is much happier with the API, and he's even working on an Xbox360 game - which is noteable considering that the PS3 uses OpenGL.

    DirectX is a non-portable skill. It ties you to Windows and the X-Box(s). OpenGL "ties" you to the Gamecube, Windows, PS2, PS3, Linux, Macintosh, etc.

    -The PS2 and Gamecube have proprietary api's (though Gamecube's GX api is very similar). However, you're point is correct - the reason why Quake 3 was able to target Linux, Windows, and Mac was because 90% of the codebase was ANSI C and OpenGL.

    So, OpenGL is still very good, but DX9 is much better than when you grew to hate it(you mentioned retained mode, which is gone as of dx8 I think), and Microsoft has ended up stealing-er, embracing- so many of the OpenGL concepts that learning one at least partially prepares you for the other.

  19. "General purpose computing" by Anonymous Coward · · Score: 0

    ... with a 256K working set.

    Yeah, right.

    Good going, Sony. You did a heckuva job on this CPU.

  20. controller input on one??? by renoX · · Score: 1

    I'd bet that controller input won't use much more than 10% of a CPU, so you still have to find other things to do for this CPU..

  21. DMA? by OK+PC · · Score: 1
    "...you'd have to DMA it up to your cell chip..."

    I think you misspelled DRM

    --
    Did you get that thing I sent ya?
  22. Re:Yet another reason by Anonymous Coward · · Score: 0

    I don't get it. Why do you stress over it?
    Cell is not god. it's not supposed to be able to do anything that's thrown to them.
    Just put some more code in and more optimisation, voila, you got a faster, running game.
    And that's not even a big deal. Programming isn't even the biggest part of game(or program) development cycle.

    I mean, you don't see Hideo Kojima Whining over it, do you?
    Even at Revolution Controllers, While eastern developers are full of excitement, western developers are full of doubt or criticism.

    Is the western developing community geared towards getting jobs done, in opposition to Eastern's creatively programming?

  23. Re:Yet another reason by easychord · · Score: 1

    Do eastern games programmers get a voice at all or are they all mushrooms? I'm sure that Kojima is too busy writing bad spy fiction or doing interviews and junkets with the gaming press to write any code.

  24. 20mins hd in 4.7gig? by Anonymous Coward · · Score: 0

    20 minutes of HD-TV footage takes up around 4.7GB, so an Xbox 360 game would quickly run out of space.

    That must be a bit inaccurate, 1080i mpeg2 of The Incredibles is only nearly 7gig or something- considering video on a game disc will probably be cg too, and they could use mpeg4 and without interlacing, they are gona be able to fit a lot more on an dual sided ~8-9gig dvd that 20minutes

  25. The PS3 creams the Xbox 360. (Not a troll) by ulatekh · · Score: 3, Insightful

    The limiting factor on computing speed in the last several years has not been processor design or clock speed, but memory speed. Normal architectures feature two levels of fast SRAM to insulate the processor from the latencies inherent with accessing DRAM over a shared bus. That doesn't get rid of multi-cycle delays, it just tries to reduce their likelihood. Data cache misses are expensive, but instruction cache misses are even more expensive -- all the pipelining that modern processors use to handle large workloads efficiently will break down every time the processor stalls loading instructions from main memory.

    The PS3's Cell processor offers a different solution to the problem -- sub-processors with fast local memory, and an explicitly programmed way to copy memory areas between processors (the "DMA" that the article mentions). The SPEs allow significant chunks of the batch-processing-style parts of a game to run on a processor that has no memory latencies, for data or instructions. Since memory-stall delays can run into the double digits, you can expect the performance increase from fast memory to be in the double digit range too. I've seen a public demo of some medical-imaging software that ran ~50x faster when rewritten for Cell. (The private demos I've seen are similarly impressive, but I can't describe those in detail. :-)

    A traditional multi-processing architecture, like the 3 dual-core chips in the X360, has no such escape from the memory latencies. All coordination of memory state between processors (i.e. through the level 2 cache) is done on demand, when a processor suddenly finds it has a need for it. Prefetching is of course possible, but the minor efficiency gains to be made from prefetching (when they can be found at all) is vastly outweighed by the inherent efficiency of explicitly-programmed DMA transfers. Multi-buffering the DMA transfers allows the SPEs to run uninterrupted, without having to wait for the next batch of data to arrive -- something that isn't really possible with a traditional level-2-cache in a traditional multiprocessing system.

    In short, the very nontraditional setup of the PS3's Cell chip is capable of vastly outpowering the traditional multiprocessor setup of the X360, mostly due to successfully eliminating memory latency.

    Yes, writing code that can run like this is a major freaking pain in the ass. But so what? The biggest reason most code is hard to run on such an architecture is that the code was poorly thought out, poorly designed, and not documented. Any decently-written application can be re-factored to run like this. Besides, this is the future: Cell really does seem to solve the memory latency problem that's crippling traditional computing architectures, and the performance difference is astounding. If you can't rise to the level of code written for such a complex architecture, then your job is in danger of getting outsourced to Third World nations for $5 an hour...as it should be. So quit your whining.

    (First post in ten months. Feels good!)

    --
    "Once we've identified and embraced our sickness, we'll have strength...and that's when we get dangerous." - John Waters
    1. Re:The PS3 creams the Xbox 360. (Not a troll) by Zantetsuken · · Score: 1

      the funny thing is, last I checked, IBM also made/making the 360 and Revolution procs, and from the way Cell seems to be coming along, IBM seems to care about it a helluva lot more than the others - mostly because Cell will be usable for more than just gaming (contrary to most peoples opinions that "its just another gaming proc" - ya, a gaming proc thatll be used (somewhere the clusters) for rendering MRIs, simulating nuclear explosions, realtime weather and geological simulations - damn near everything in supercomputing and servers which fars I know is IBMs passion)

    2. Re:The PS3 creams the Xbox 360. (Not a troll) by Zibara · · Score: 1

      Memory latency is a huge issue on desktop gaming, apparantly. I spoke with someone from Blizzard about it, who said that it's one of the main performance factors of why World of Warcraft runs signifigantly faster on some PCs.

  26. Re:Yet another reason by Zantetsuken · · Score: 1

    actually, they have supposedly planned (at least planned, how many other companies would just say "nope, aint gonna happen") "scaled down" versions for cell phones and such, and scaled up versions for servers and supercomputers...

  27. Re:The PS3 creams the Xbox 360 (yes it is a troll) by Anonymous Coward · · Score: 0

    Allow me to state the obvious:

    (1) The PS3 has not shipped yet.
    (2) There is no final PS3 hardware that runs at full speed yet.

    Normal architectures feature two levels of fast SRAM to insulate the processor from the latencies inherent with accessing DRAM over a shared bus.

    Yeah, my current CPU has 1MB of L2 cache (a several year old hyperthreading Pentium 4). 2MB is starting to become fairly common in the new models.

    The PS3's Cell processor offers a different solution to the problem -- sub-processors with fast local memory

    Err.. each sub-processor has 256k. I really don't see how that's an advantage, especially when those sub-processors are functionally crippled.

    the very nontraditional setup of the PS3's Cell chip is capable of vastly outpowering the traditional multiprocessor setup of the X360, mostly due to successfully eliminating memory latency.

    O RLY. Operation phrase: "is capable of". Congratulations doing finite element analysis, non-interactive scientific computing - and rendering animations. But it'll suck for running complicated logic - particularly if that logic has to interact with the logic running on other subprocessors.

    Be prepared for another round of Sony games that look absolutely amazing in the cutscenes.. but then your character will only be able to walk left, walk right, shoot - and trigger another cutscene. Joy.

    Cell really does seem to solve the memory latency problem that's crippling traditional computing architectures

    The Gamecube had SRAM main memory with a latency of 1 to 2 cycles (about 5 nanoseconds). It only had 24MB of it, but any speed problems you may encounter were not a result of memory latency. This is also why even the 1st generation Gamecube games ran with silky smooth framerates.

  28. Re:The PS3 creams the Xbox 360 by News+for+nerds · · Score: 1

    >The Gamecube had SRAM main memory with a latency of 1 to 2
    >cycles (about 5 nanoseconds). It only had 24MB of it, but any
    >speed problems you may encounter were not a result of memory
    >latency. This is also why even the 1st generation Gamecube games
    >ran with silky smooth framerates.

    Bullshit. How can you compare cycles for GC (485Mhz) with those of Cell (3.2Ghz)? Besides on this official specsheet (http://www.nintendo.co.jp/ngc/specific/) the access speed of 1T-SRAM is 10ns, not 5ns.

  29. Game Dev Conf: Go Multithreaded by AHumbleOpinion · · Score: 1

    Most games now are still single threaded.

    At last years game developer conference both Intel and AMD were saying that games should go multithreaded, that future CPU performance improvements were largely going to come from multiple cores not clock rate. Intel and AMD were both demonstrating current games taking advantage of threading. I forget what the game was but one racing game uses a second thread for optional effects. When running a single thread you get a small amount of dust, smoke, flames, etc. However when running with multiple threads the particle system will use HT or DC to generate additional effects, more/better smoke, dust, etc. The game makes the decision to go single or multi after evaluating the CPU.

  30. The PS3 creams the Xbox 360 (nice try Mr. Gates) by ulatekh · · Score: 2, Insightful

    Allow me to state the obvious:

    (1) The PS3 has not shipped yet.
    (2) There is no final PS3 hardware that runs at full speed yet.

    The Cell has been available for programming for a while now. I think reference platforms (i.e. other than PS3 prototypes) might even be available. Cell is being used for far more than the PS3. Also, sure the PS3 might run faster than 3.2 GHz, but you make that sound like a bad thing!

    The PS3's Cell processor offers a different solution to the problem -- sub-processors with fast local memory

    Err.. each sub-processor has 256k. I really don't see how that's an advantage, especially when those sub-processors are functionally crippled.

    Between them, they have 2 MB of high-speed memory, which (as you say) is becoming fairly common for L2 cache sizes, plus it's got a traditional L2 cache. So I'm not sure what you mean by "crippled". There are plenty of computing problems (including video game development) that can fit into this sort of sub-processor/DMA-communication model. Anyone that's programmed a PS2 knows this (and you sound like a video game programmer). The Cell just pushes it further.

    the very nontraditional setup of the PS3's Cell chip is capable of vastly outpowering the traditional multiprocessor setup of the X360, mostly due to successfully eliminating memory latency.

    O RLY. Operation phrase: "is capable of". Congratulations doing finite element analysis, non-interactive scientific computing - and rendering animations. But it'll suck for running complicated logic - particularly if that logic has to interact with the logic running on other subprocessors.

    There are plenty of tasks that can be run independently with double-buffered batches of data, and not just scientific computing, but the sorts of tasks that are bound to be prevalent in next-generation video games. Physics simulation, whether for gameplay or weather/cloth/fur/etc. effects, can be made parallel & batchable after broadphase collision. Graphics transformation can be, as it is on the PS2.

    "Complicated logic" can communicate between processors using ring buffers and short DMA messages. But that's only if the logic is truly complicated...this doesn't apply if the code is complicated because it's the usual not-designed, poorly-thought-out, uncommented, global/singleton-happy, spaghetti code, which is the real problem most of the time. The only thing that's going to hold up the software industry taking advantage of the Cell processor's capabilities is our own collective lameness.

    --
    "Once we've identified and embraced our sickness, we'll have strength...and that's when we get dangerous." - John Waters
  31. Re:The PS3 creams the Xbox 360 (nice try Mr. Gates by brain1 · · Score: 1

    You, sir, have hit the main problem square on the head with your last paragraph.

    I deal with that type of software on an almost daily basis. Not necessarily with games programming, but in embedded applications I design the hardware for. It seems that no matter how powerful I design the platform, some bonehead seems to cripple it with crap code exactly like you describe.

    Thank you!

    -dh