PlayStation.Blog
PS3-TLOU Left Behind

A Programmer’s Look Inside BioShock

Steve Sinclair's Avatar + Posted by Steve Sinclair on Oct 08, 2008 // Project Lead, Digital Extremes

I’m Steve Sinclair and I work at Digital Extremes. I’m scrawny with dry skin and male pattern baldness. Despite all that – I’m still smiling because I got to peek up BioShock’s skirt!

By skirt I mean the source code. For a programmer there is great joy in understanding. Every time the Great Carmack open sources an id engine, I rush to the Interwebs and fill my brain with the glory. I remember being astonished that they were using Huffman compression on their network stream for Quake 3. If I recall correctly, they’d just capture a bunch of traffic and build the table out of it. It was like profile-guided optimization for packets. That’s sublime right there.

Well, it was a bit odd, being the way I am, that the first thing I did when we got the BioShock build was … check the other ending. Like a coward, I could never bring myself to harvest. What kind of demented person can do that? Sure, I laugh when I light a Splicer on fire and she runs away screaming and then I shoot her in the head and beat her corpse with a wrench … but in my mind the freak deserved it. The point I’ve failed to make is this: learning more about the world of BioShock overwhelmed that programmer’s impulse.

crashsite

How about I say something on topic? BioShock on the PlayStation 3! My first task was to optimize the character ‘skinning’. For Bioshock, a lot of resources go into the character animation – here ‘skinning’ refers to the process of taking the various animated joints (spine, elbows, knees, wrists, etc) and deforming the rendered character to match that animation.


Skinning was coded for PS3 in two phases: first I made it work on the main CPU (actually Sony calls their CPU a PPU) using their specialized math instruction set (much faster than straight up C/C++). That was about four times faster, but the PS3 still had more love. That love was the final step, take that code and run it entirely on a SPU, freeing up the PPU for other tasks. The SPU processors run along side the PPU, chewing data while the PPU worries about something else. The idea being, if you have spare SPU time, your skinning is essentially ‘free’ (done before the rendering system even asks for it).

After that was working, I helped out with profiling and memory optimization. Things you want to do when you change memory architectures, like adding a second straw to your milkshake. In this amazing analogy the two straws would be the collision system and the rendering system. The ‘milkshake’ (chocolate) would be the objects in the world that need to be drawn but, just as importantly, shot, knocked over and generally interacted with. By dividing the data describing the objects between the two dedicated areas of memory I eliminated the need to make a second copy of the object while giving both systems full-speed access to the parts they needed.

As we wrapped, I was slogging on TRC issues (not fun) and crashes (quite fun actually). Such are the tasks of taking it the last mile … as usual it comes down to some nuanced and hard to nail down issues.

Well, enough of my technical jargon for now – thanks for reading. I hope you enjoy BioShock on PlayStation 3. It was an honor to be able to contribute to it.

//Add Your Own

121 Comments

PAGE 1 2 3

101

+ Davenb on October 9th, 2008 at 12:33 pm said:

game looks amazing


102

+ ThomasAnthony on October 9th, 2008 at 12:56 pm said:

I played it on PC but I’m glad my PS3 friends get to play this good game. Its a shame idiots believe whatever they read on the internet. I played the demo and it looked fine.


103

+ Ajora on October 9th, 2008 at 1:16 pm said:

I have no idea what you were talking about…
but Bioshock is cool and I’m getting that creepy game fo sho!

cheers


104

+ moe24 on October 9th, 2008 at 2:27 pm said:

No offence but bioshock sucks!


105

+ babybluedb on October 9th, 2008 at 2:29 pm said:

Can wait to (HARVEST) those trophies pun intended

but on a serious not ive been wait for this game to hit the PS3 ever since since my friend played it on the (360)………..that was hard to type. ive also heard that there are new plasma or the weapons the you shot out your hand


106

+ Rhez on October 9th, 2008 at 3:47 pm said:

Nice….very nice

I must have missed the prerelease event. I don’t know how all these people can judge a game before it comes out.

Great BTS post. Definitely going to buy Bioshock probably the day it comes out along with a certain Sackboy. When I was deciding between a PS3 and XB360 Bioshock was the only game on that system that I wished I could have. $59.99 is a reasonable price for any top game on PS3. It’s cheaper than buying a XB360 or upgrades for my PC just so I could play it. So I’m definitely going to shell out the cash without reservation.

I think the only people complaining are those who have access to other versions of the game.


107

+ JullePetersson on October 10th, 2008 at 4:05 am said:

It’s called PPE (Power Processor Element) not PPU (Physics processing unit)!

http://en.wikipedia.org/wiki/Cell_(microprocessor)#Power_Processor_Element


108

+ FFObsessed on October 10th, 2008 at 5:31 am said:

Why does it look and run so badly on PS3 then? This seems like damage control after the demo came out.

I’m still buying the game because I want to PLAY it, but I’m not going to buy it until it’s budget priced or if I can get it cheap 2nd hand.


109

+ SenileAssassin on October 10th, 2008 at 7:49 am said:

Hello, Steve!

That’s a very interesting insight into PS3 development! I was wondering, though, as to why the PS3 version of BioShock looks blurry? Would it be antialiasing, compensating for reduced resolution, or is it just something extra added in the PS3 version? Overall, the impression is as if there’s a gaussian-filtered transparent layer put on top of the main image…

Overall, I must confess, I think the 360 version looks a lot sharper and the motion is more fluid. But then again, I’m comparing released version of the game on 360 to a demo on PS3, so by the time the game gets released on PS3 – maybe it will look better…


110

+ dnight on October 10th, 2008 at 8:18 am said:

@108

have heard about ppu-gcc and spu-gcc?

he is not talking about PPU (Physics processing unit), he is obviusly talking about PPU (PowerPC Processor Unit)

read this, it will help you to understand the differences between SPU and SPE, and PPU and PPE:
http://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/9F820A5FFA3ECE8C8725716A0062585F?open&S_TACT=105AGX16&S_CMP=HP

A summary is:

cell = 1 PPE + x*SPE

1 PPE = 1 PPU + 1 PPSS
1 SPE = 1 SPU + 1 MFC

PPSS = PowerPC Processor Storage Subsystem
MFC = Memory Flow Controller

PPU = PowerPC Processor Unit
SPU = Synergistic Processor Unit

PPE = PowerPC Processor Element
SPE = Synergistic Processor Element


111

+ dnight on October 10th, 2008 at 8:30 am said:

Hey Steve,

nice to see a programmer’s post here.

I see you took the skinning code and translated to use SIMD instructions set and then again moved it to run in one SPU.

I would like to know if you did the other stage that is making it be able to run in multiple spu too. Wasn’t it necessary? Or all the others SPU were busy in the game with other things? I ask this because one SPU alone is not as good as another real processor in multicore systems, isn’t it, but using 2,4 or 6 SPE is much better.

cheers


112

+ nxp3 on October 10th, 2008 at 9:00 am said:

With the power of the ps3 it would seem they would be able to do more for bioshock but from the video comparison, it looked exactly the same as the xbox 360 version. I’m not easy to please, there’s been very few games that I think are worth it to be on the ps3. I mean if I want the same game as a 360, I’d buy a 360 because it’s cheaper. No, I buy a ps3 because I know it can do more so do more with it.


113

+ sephiroth_4 on October 11th, 2008 at 3:57 am said:

360 version is, in fact, superior to the PS3 version. But interesting read though, breaking down the technical details for console gamers. Here’s to optimizing for the PS3!!!


114

+ railenmiles on October 11th, 2008 at 5:16 am said:

Why games always look blurry on PS3? No it is not because the Cell architecture can’t support anti-aliasing. Mirror edge was talkin about how great it was for an SPU to do anti-aliasing. Killzone 2 was running multi-sampling anti aliasing on the SPU as well (whatever that means) as part of the engine’s deferred rendering (whatever that means).

My theory IS! Why the 360 version looks sharper is because it has a Unified Architecture (whatever that means) thanks to Radeon, giving the 360 a slight edge on the graphix department.

The RSX is still based on the 6800 Nvida cards. Note RSX is twice more powerful than 6800, and slightly faster than the 7800 gfx card which was released right after the PS3 release.

Modern and faster Nvidia GFX cards now employs a unified architecture. Radeon gives the 360 a slight edge on this one.

2k says, they can’t do anyfing about the slight blurriness. They say it’s just how the hardware happens to run their code.

In this generation of consoles, the PS3 is more similar to a PC than the 360. 360 is unique due to the unified architecture designed by Radeon to go with the console’s CPU.

I remember Radeon touting it’s unified architecture back in the days when the first specs of the consoles were released to the public. Nvidia replied that they are confident with what they decided for the PS3.


115

+ railenmiles on October 11th, 2008 at 5:31 am said:

I remember ages ago pondering about what edge could Radeon’s Unified Architecture bring to the 360? And this might be it.

So, we get slight blurriness. While we’ve got Cell’s sheer horsepower, built in HD and blu ray. And free online to boot (don’t even think of changing that sony! You’ll regret it).

Now, we need devs to tap that Cell’s Arse and use Blu-rays storage capacity. Multiplatforms will hamper this tapping of arse.

Of course I could be way wrong . I’m not a programmer. tee hee


116

+ railenmiles on October 11th, 2008 at 5:40 am said:

Just remember guys, we’re not really supposed to sit too close to the TV.


117

+ railenmiles on October 11th, 2008 at 5:45 am said:

And just because we’re not supposed to sit too close to the TV doesn’t give any excuses for devs to be blatantly lazy. Do what you have to DO!

I’m not implying 2k were lazy. They work hard, they deserve to party hard with the full price they’re charging ya fer.


118

+ Ortohinco on October 11th, 2008 at 10:05 am said:

Not only does the game require a 5 gb install, it costs $60, looks worse then the 360 version, and has framerate problems.

No one should support this crap


119

+ iamacn on October 11th, 2008 at 6:11 pm said:

After playing the demo I canceled my pre-order.

Are you guys really charging $60.00 for this imbarrasing port? LOL


120

+ CyberPunk on October 11th, 2008 at 11:22 pm said:

ALL GAMES BASED ON UNREAL ENGINE LOOK CRAPPIER ON THE PS3. And that´s due to the fact that it took Epic year to optimize UE on pc´s. When the 360 came out, they saw a paradise islando to land at, because it is somehow a pc, and Ps3 is a different kind of horse.

With so many great games like Dead Space, LBP, Motorstorm, R2, etc… it is hard to believe that a 1 year sucky old port is going to have retail space.

I also cancelled my preorder after mi BIG DISSAPOINTMENT when I played the demo.

Ps3 players do not deserve leftovers…


121

+ nxp3 on October 13th, 2008 at 5:45 am said:

railenmiles | October 11th, 2008 at 5:16 am

2k says, they can’t do anyfing about the slight blurriness. They say it’s just how the hardware happens to run their code.

In this generation of consoles, the PS3 is more similar to a PC than the 360. 360 is unique due to the unified architecture designed by Radeon to go with the console’s CPU.
————————–
Whatever you say might be quoted by someone else, but the fact that there are great looking games out there for the ps3 would disprove that fact. Look at wipeoutHD, uncharted, resistance, ratchet and clank. All with stunning graphics and play at very good acceptable speed. I can’t beleive how good wipeout looks. Yet all the multiplatfrom games seem to look like crap. The only game that looks decent in my eyes that is multiplatfrom is call of duty 4, and I wouldn’t even say it’s up to ps3 standards even. Those bluriness is put in there on purpose to give you a sense of depth, but you know what, it works in film but does not work in game. I see a trend going on here, all the games that I don’t like seem to be on the unreal engine, I think it must have something to do with it. Oh virtual Fighter 5 was worked on the ps3 first, and that look awesome, I haven’t seen the 360 version so I can’t say how it is. But seems to me, it makes more sense to lead on the PS3 then go to the 360 version.

I will say soemthing here that make a lot of sense. Think of the 360 as a dvd player and the ps3 as a bluray player. You got 2 movies showing, identical movie. Bluray looks great. The 360 plays the dvd, it looks great for the 360 owners, that’s what they’re used to. Now take that dvd and play it on the ps3, guess what, you’re going to say, wow, that look like crap. We know what the ps3 is capable of, we can’t go back to standard definition. And what you take a 360 game and make it into a ps3 game without redoing all the work in hidef, you’ll get a crappy looking game.


PAGE 1 2 3
Comments are closed. We close the comments for posts after 30 days