Wednesday, June 30, 2010

Crysis 2 Stereo-3D performance

What I’ve been working on the last months:

Some have suggested that the visuals of 3D-enabled games will suffer as a result of hardware strains.

The perceived wisdom is that to output in 3D, games render frames twice - an affect then translated into 3D by special glasses worn by gamers.

German developer Crytek, however, has achieved its 3D effect for upcoming multiplatform shooter Crysis 2 in a way that hardly impacts on performance.

Thursday, June 17, 2010

Good old times...

This is my graduation thesis, 1999: "3D engine for virtual distributed environments".
The thesis is in italian, but shows some code I used to write at that time.

Tuesday, June 15, 2010

C++ Header files nightmare

Have you ever been hunting that weird compilation error cause by C++ header files hell, where nothing seems compiling anymore if you touch an include directive?
I have, it’s not funny, it’s tedious and annoying.

I “strictly” follow three rules:

  1. One class per header file
  2. No inline method in the header file
  3. Each header file compiles independently

One class per header file.

It promotes a very Java-like style and helps quickly guessing the content of the header file, ehm… the class with the same name.
Exceptions: very small and closely coupled classes or interfaces.

No inline method.

Why do you want to force a method inline? Performance? Give a look at what Herb Sutter says about it.
You can always inline a critical method in an inner loop if the profiler begs for it. No inline method promotes less coupling between header files, faster compilation times, less chances to find your self in Header Files Hell. The compiler will likely inline all methods it finds suitable when Whole Program Optimization is turned on.
Exceptions: pure accessor methods, but I still implement them in the C++.

Each header file compiles independently.

If the header file is the only include directive in a translation unit, does it compile correctly? If not, I include in the header file everything that is necessary in order to compile: I never rely on the correct order of include directives in order to compile correctly. It’s extremely error-prone, cumbersome, hard to control and takes straight to Header Files Hell. Avoid it.

Monday, June 14, 2010

"No files were found to look in.Find was stopped in progress" in Visual Studio 2008

It also deserves a nomination in the problem solving category Spin around on your chair 3 times, clap your hands twice and then press... because the solution is to press Control + Scroll Lock and all is fixed. It works, really.

Friday, June 11, 2010

AAA Automated Testing

My slides on my automated testing experience in Crytek presented at GDC Europe 2009.
Warning: it contains explicit material.


Promise, this is going to be the only deadly boring post I write here, hopefully. I’ve been working in the Game Industry for about ten years, mostly as Graphics Programmer, now moved to Technical Director happily hopping around on anything that is thrown at me. I went through several production cycles, some million lines of C++ code, hundreds and hundreds of bugs, endless crunching months, great talented people and worked on few AAA tiles such as Fable 2.

Enough for an introduction, my mission on this blog is to share my battlefield experience, spread Agile development practices like a good zealot, show best coding practices and have a bit of fun doing it. With a rant or two once in a while thrown in for good measure.