Thursday, November 25, 2010

AAA Stereo 3D in Crysis 2 – Talk at 3D In Your Face

I finally got the uncut, uncensored, untainted footage of my talk at 3D In Your Face in Bradford last month. About three hundred people (!!) were attending, it was great fun and quite scary for the first couple of minutes. Luckily the first couple of minutes are missing, but you get thrown in the mix at no cost a full five minutes of Crysis 2 in game!

Enjoy the show.

3D In Your Face - AAA Stereo in Crysis 2 from Francesco Carucci

And don’t miss the slides from the talk.

Special thanks go to Nicolas Schulz from RnD who wrote the slides on Reprojection and implemented the actual algorithm and the Crysis 2 team for the amazing game. Big kudos go to my partner in crime, Jens Schobel (yes, I will never write your name correct, ever!) for writing the slides together and giving the same talk together in Cologne and Barcelona. I missed you man!

Comments on how to improve my l337 presenting skillz0r are greatly welcome.

Tuesday, November 16, 2010

No comment

while (IsStarted())
{
    // Wait until there is work to do.
    Wait();

Oh well, I guess so…

Tuesday, November 2, 2010

Crunch… crunch… crunch... #2

 

Old and very well known article, but it’s worth a refresh cause it seems to be overlooked:
http://archives.igda.org/articles/erobinson_crunch.php

In most times, places, and industries over the past century, managers who worked their employees this way would have been tagged as incompetent — not just because of the threat they pose to good worker relations, but also because of the risk their mismanagement poses to the company's productivity and assets. A hundred years of industrial research has proven beyond question that exhausted workers create errors that blow schedules, destroy equipment, create cost overruns, erode product quality, and threaten the bottom line. They are a danger to their projects, their managers, their employers, each other, and themselves.

Tuesday, October 12, 2010

NEM 2010 Barcelona – Stereo 3D Talk

NEM 2010I’m going to NEM 2010 in Barcelona in a couple of days to talk about our work on Stereo 3D that is going to be used in the upcoming Crysis 2.

It’s the same talk we gave at GDC Europe in Cologne but with revised slides and some new info.

That’s going to be good fun.

Wednesday, September 15, 2010

“Video Games Lead to Faster Decisions That Are No Less Accurate”

 

http://www.sciencedaily.com/releases/2010/09/100913121656.htm?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+sciencedaily+(ScienceDaily:+Latest+Science+News)

starcraft2-hell-its-about-time[1]ScienceDaily (Sep. 13, 2010) — Cognitive scientists from the University of Rochester have discovered that playing action video games trains people to make the right decisions faster. The researchers found that video game players develop a heightened sensitivity to what is going on around them, and this benefit doesn't just make them better at playing video games, but improves a wide variety of general skills that can help with everyday activities like multitasking, driving, reading small print, keeping track of friends in a crowd, and navigating around town.

Enuf’ said. Now I can play Starcraft II for as much as I like claiming it’s for my own good.

Saturday, September 11, 2010

Off Topic: Scaloppine Magiche

I’m seriously thinking about turning this blog into a cooking blog. Programming is a creative endeavor after all, isn’t it?

 

 

 

 

 

 

 

To create Scaloppine Magiche:

  • get thin beef (or veil) filets
  • cover the filets with flour on both sides
  • heat up olive oil (olive oil!)
  • when the meat is half cooked, poor red wine
  • serve with roasted vegetables, and the same red wine to drink

 

Squeezing a lemon instead of pouring red wine works equally well.

Enjoy!

Friday, September 10, 2010

Crunch… crunch… crunch…

http://www.estherderby.com/weblog/archive/2006_03_01_archive.html#114167242943470460

Extended periods of overtime are more likely to SLOW DOWN work than speed up work.

Rather than demand overtime,

  • Look at the universe of work for the department, not just individual work loads
  • Decide what to do and *what not to do* based on the mission of the group
  • Prioritize the work the group needs to do
  • Determine the level of quality required for work – what “done” means and what “good enough” means
  • Collect data on how people spend their time at work – not to beat people over the head, but to look at patterns that may be lowering productivity
    (Typical time-robbing culprits are: Multi-tasking, fragmentation, frequent interruptions, meaningless meetings, non-value adding corporate activities.)
  • Thursday, September 9, 2010

    The 'premature optimization is evil' myth

    In Bluebyte’s blog, Joe Duffy writes an extremely interesting essay about premature optimization, where his conclusions are:

    What I do advocate is thoughtful and intentional performance tradeoffs being made as every line of code is written. Always understand the order of magnitude that matters, why it matters, and where it matters. And measure regularly! I am a big believer in statistics, so if a programmer sitting in his or her office writing code thinks just a little bit more about the performance implications of every line of code that is written, he or she will save an entire team that time and then some down the road.

    Original link:
    http://www.bluebytesoftware.com/blog/2010/09/06/ThePrematureOptimizationIsEvilMyth.aspx.

    It’s a very good read over all, and very well reasoned, but I disagree with the approach entirely. I prefer simplicity first, making it work and making it simple, and then, where necessary, making it fast.


    This approach fails to recognise that even in low level programming, the scarcest resource is in the vast majority of the cases neither CPU time nor memory, but programmer's time. That's what we need to optimize for: making careful consideration of the performance characteristics of every line of code might optimize CPU time, but wastes programmer's time on a task that is totally irrelevant for 90% of the code. On the other hand I agree on: “Given the choice between two ways of writing a line of code, both with similar readability, writability, and maintainability properties, and yet interestingly different performance profiles”. No reason to make something slower for the sake of it, everything else being equal, right? Right, but very rare.


    The example with LINQ is emblematic: I will choose the LINQ version any day, because it's simpler to write, simpler to read and clearer. If the profiler says it doesn't meet the performance requirements, then and only then I will kill every single cycle I can from that code. In my experience this approach resulted in faster and simpler low level code.

    Wednesday, August 25, 2010

    Mum, I’m going to be a TV star

    Aka 3D-Gaming in der Entwicklung about our work on Stereoscopic 3D in Crytek. Minute 00:00:36s. If you understand german it might even be interesting: I don’t know, my german is not that good.

    Tuesday, August 24, 2010

    AAA Stereo-3D in CryENGINE 3

    newspic-gdceurope-2010_0[1]

    Me, Jens and Nicolas gave this talk about Stereoscopic 3D at GDC Europe, 2010 in Cologne.

    To provide designers with tools to produce the highest Stereo-3D quality that can be achieved: Crytek (or “CryEngine in 3D”) is following up the hype created by recent big Stereo-3D movies to produce an experience that is both enjoyable and engaging, with minimal cost in performance. We’ll reveal for the first time our new Stereo-3D rendering technique and how we found a zero-compromise, real-time Stereo-3D solution for CryENGINE®3. We’ll also show the tools that make workflow smooth and intuitive and can be used not only to create Stereo-3D videogames, but also movies in the same integrated real-time environment.

    Part 1.
    Part 2.

    Tuesday, August 10, 2010

    Test Driven Development and IPhone

    Yes, we can:
    http://developer.apple.com/tools/unittest.html

    Here's a common development scenario: You've just finished building your application. You're confident that it works. You've put it through the paces, exercising every feature and checking every output. You're proud to say that it's stable, at least for the moment. But when you think about the next feature you need to add, you can't deny that low-priority thread of fear running in the back of your mind: “If I change the code, what might break?” You could certainly try to manually test out all the features of your application after each change, but after the second time doing this you're sure to become bored and make a mistake. Ironically, you feel like you don't have time to test.

    If that scenario is familiar to you, here's the good news: Your computer has the cycles to keep that low-priority fear thread in check. If you supplement your visual inspection with automated tests, the computer will happily check the results for you, as often as you like. It's understood that it isn't always easy to write an automated test, but the effort you spend is a one-time investment that just keeps paying you back every time the test is run. And if that's not enough, writing the test might reveal opportunities for a better design.

    And incidentally one of the best explanations of why writing unit tests actually saves time.

    Monday, August 2, 2010

    “AAA Stereo-3D in CryEngine 3” at GDC Europe 2010 in Cologne

    https://www.cmpevents.com/GDCE10/a.asp?option=C&V=11&SessID=11572

    Session Description
    To provide designers with tools to produce the highest Stereo-3D quality that can be achieved: Crytek (or “CryEngine in 3D”) is following up the hype created by recent big Stereo-3D movies to produce an experience that is both enjoyable and engaging, while feeling natural to consume by the public: we’ll present findings in our effort to create a pleasing Stereo 3D experience based on our in-house engine, with great emphasis on the tools that make workflow smooth and intuitive, tools that can be used not only to create Stereo-3D videogames, but also movies in the same integrated real-time environment.

    Just announced. Come and say hi if you are at GDCE this year.

    Tuesday, July 27, 2010

    More on Continuous Deployment

    This time is the turn of Digg, the popular bookmaring website. Thanks to Jens for finding it out.

    http://about.digg.com/blog/continuous-deployment-code-review-and-pre-tested-commits-digg4

    No change is going to make it onto our internal site without passing a full battery of unit tests. And nothing is going to go on from our internal site to production without passing an additional set of Selenium tests. Does this mean we're never going to introduce bugs to our live site? Of course not - but we're going to keep the number of bugs to hit the live site to a minimum, and we've made it easy and fast to get bug fixes live as well.

    Friday, July 23, 2010

    “A New Version Of Google Chrome Now Due Every Six Weeks”

    google_chrome spinning  http://techcrunch.com/2010/07/22/google-chrome-versions/

    With their Chrome web browser, Google has always been obsessed with speed. And now they’re speeding up another aspect of it: how often stable builds are released. The goal now is to release a new stable version of the browser every six weeks […]

    This is not directly related to game development, but nevertheless very very interesting: to reliably release stable (not beta or dev) build to millions of users every six weeks, the Chrome team needs water tight automated testing, very good and consistent code quality and extremely honed agile processes: also the cost of making a change has to be small, while debugging relatively predictable. There is no room for long check-in queues, deep branch hierarchies, check-in rights, locked branches and long crunching months to meet a deadline. I can imagine that Continuous Integration and Release Branches are keys to meet this ambitious goal.

    On a smaller but still interesting scale, Wordpress is on the same page:
    http://toni.org/2010/05/19/in-praise-of-continuous-deployment-the-wordpress-com-story/

    Launching products is one of the hardest things companies do. Most companies pour months of work into making sure everything goes right at a launch – the features are right, the marketing is ready, the press is primed, the product is solid, etc. But a new breed of companies are doing things very differently. Instead of optimizing product launches to go as perfectly as possible, they optimize to have them go as quickly as possible.

    That’s where the Game Industry has lots to learn: the concept of being always in a state to be able to produce a stable build while keeping development up and running in a sustainable environment will prove to be the next Big Thing in Game Development to give some companies the competitive edge to release good games in time. A dream? What’s your opinion?

    Tuesday, July 6, 2010

    Festering code bases and budding code bases

    A truly excellent read:
    http://michaelfeathers.typepad.com/michael_feathers_blog/2010/06/festering-code-bases-and-budding-code-bases.html

    Especially the concept that at the time of change, just adding code to an existing method, and not refactoring to a better structure, is perceived as more cost effective, but it’s just accumulate technical debts, that over time cost money in the form of interests. Same concept can be applied to write unit tested code: it seems to cost more at the time of change, but costs less in the long term, by flattening the curve of cost-of-change.

    Wednesday, June 30, 2010

    Crysis 2 Stereo-3D performance

    What I’ve been working on the last months:
    http://www.videogamer.com/news/
    crytek_magic_prevents_crysis_2_3d_performance_issues.html

    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.

    Introduction

    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.

    Enjoy!