PS3 Programming for Possession
Keith Stuary did an article for the Official PlayStation 2 magazine about the development of Possession for the PS3. Now he can talk about what he learned, and it’s quite interesting.
First of all, the PS3 uses OpenGL, an open well known standard. (Even I’ve done some OpenGL programming, and it’s nice.) So anyone who’s done OpenGL, and there are a lot of us, will be familiar with the 3D graphics engine of the PS3. Because there is so much knowledge, books, and tutorials about OpenGL, it makes 3D programming for the PS3 much easier than it was for the PS2.
As well, the RSX chip from nVidia uses the Cg shader language, which is a standard that many people know. It’s not a Sony exclusive thing. And here is someone else saying how great the physics will be – Volatile’s lead PS3 programmer, Lyndon Homewood:
“The graphics capabilities of PS3 will, I think, be slightly above the absolutely top-end graphics cards on the PC, but you’ve got much more processing power in the box so you’re going to see a lot more physics, a lot more generated geometry. With water ripples, for example – they’re pretty much algorithms, you have a flat plane of triangles and you run some sort of mathematical algorithm over it to generate a surface rippling effect – well, you will have the processing power to do these sorts of generated geometry effects On PS3. You could actually put one chip aside just to do that…”
And on the question of how to make the most use of the SPE’s, he had this to say:
“The way we’re thinking of doing it ourselves is via a job queue. We’ll stick the jobs we want to do into a queue on the main processor and then we’ll get the SPEs to pull off a queue entry and process it whenever they’re free. You want to make sure all of your processors are always running. If you give the chips specific jobs, you’ll end up with a lot of them being idle – you won’t get the maximum out of PS3 doing that unless you time everything perfectly, so that the time it takes to do the animation on the first chip is exactly the same amount of time to do the physics on the next chip, which is exactly the same length of time it takes to do all your AI on the next chip – I think that would be extremely problematic.”
It’s nice to hear words from an actual developer’s mouth for once.