28 Jul 2009

Brain Rot

I think working on the PS3 is slowly destroying my higher brain functions. All I can think of at the moment are cycle counts, cache misses, memory latency, compiler intrinsics and synchronization issues. It’s becoming harder and harder to communicate with humans, let alone formulate a proper blog post. On one hand I welcome this fallback into nerd-dom, reminds me of the time when I learned programming by hacking hex-code into the 256 bytes of RAM of the LC-80. On the other hand it’s incredibly frustrating because everything takes so fucking long. Working for 3 days on a small problem which doesn’t even exist on other platforms isn’t fun. But ultimately the PS3 port will be incredibly good for Nebula3 because it forces me to think very hard about the data layout and data flows in the engine, and the PS3-port is now laying the foundation to scale beyond 2..3 cores on all future platforms.

So, quick status update before I turn into a zombie:

  • We’ll support FMOD in the future, integration into Nebula3 is currently underway. Only sensible way to do sound in multiplatform projects IMHO.
  • I have implemented Wolfgang Engel’s light pre-pass renderer in the PS3 port. I think we’ll use this also for the other platforms (well, except the Wii of course). Very cool stuff and solves a lot of problems on the fragment-shader level (jeez, I meant pixel-shader). I’ll write a bit more about this later.
  • I’m currently implementing a job system for Nebula3, designed around PS3 SPURS jobs. On other platforms, jobs will run in a thread-pool on the CPU. It will not be completely multiplatform, but it will be easy to create and maintain jobs for multiplatform projects (the only thing not multiplatform will be the actual job function, but this is usually just a few (maybe a few dozen) lines of code). Once I have profiling results I’ll write a blog post about the design and usage of the job system (it’s a bit different then what I described here).
  • The multiplayer component of N3 is currently being rewritten and ported to Xbox360 (and later PS3). The PC version (and probably PS3 version too) is based on RakNet, on the 360 we’re using an API from the XDK.
  • I have completely rewritten the whole StringAtom system for performance and memory footprint and have dropped the generalized Atom<> and Proxy<> classes (which the old StringAtom system was built on). The new system is hardwired for strings and nothing else.
  • Call Of Juarez BiB totally caught me by surprise. Best game so far this year on the 360 IMHO, and much more streamlined then the original.

That’s all for now. It will be very good to eventually crawl out of the cave into the sunlight and develop back into a normal human being again :)

7 comments:

jack said...

Seems pretty reasonable to me!

RT
www.anon-web-tools.us.tc

WadeMealing said...

Jack/Donald/Arnold/Frederick/May/Janie/Jenny/Andy, you're a douche. You bloody anon-web tk/tc spammers are everywhere.

Mark him up as spam please.

Samir Ben Abid said...

I enjoy your blog posts very much and this is by far the best one

Michael said...

You think the PS3 is hard to program, try the Atari 2600. Same shit but with 4096 bytes.

Steven 'lazalong' Gay said...

Greetings,

After checking this google code repository http://code.google.com/p/nebula3/
I was wondering if this was officially supported by Radeon.
The last commit is from nov 08 even if you mention on your blog a lot more work.

Is there a relation between your work on the google code one?
Is it merely a "copy-paste" of one of your previous release?
If not do you have a public repository or should we wait on your occasional sdk ? :D


On a separate note.

Would you mind if someone made an editor (wxWidget based) for Nebula3?
Or... kuff... would you pay someone to do it ;)

Regards,
Steven

Dmitry said...
This comment has been removed by the author.
Floh said...

The Google stuff is not officially supported by Radon Labs for lack of time, I'm doing an occasional code drop and provide a download link in the blog. It's best to wait for the next code drop I think.