C++ 11 final

I’ve been doing some micro-optimizations recently. One of the things I’ve been trying is eliminating virtual method calls in ‘leaf’ types. Consider the following snippet (simplified): 1struct Bar 2{ 3 virtual bool Func1() { return false; } 4}; 5struct Foo : public Bar 6{ 7 virtual bool Func1() 8 { 9 return true; 10 } 11 virtual void Func2() 12 { 13 if (Func1()) 14 printf("Hello"); 15 } 16}; 17 18void DoSomething(Foo& f) 19{ 20 f.

Patching binaries

There may come a time in game programmer’s life when he has to fix a bug in a library he doesn’t have the source code for. It doesn’t happen often, it might never happen, but it’s good to be prepared. If I remember correctly, I had to do it only two times, one was fairly recently. We were getting quite a few crash reports and were assured that fix in the third-party library was coming, but I decided to see if it’s possible to do anything about it in the meantime.

MemTracer 64

It’s been a long time coming, but I finally found time to update MemTracer C# to support 64-bit applications (so 64-bit memory pointers + callstack addresses).


Today I was contacted by Syama Pedersen and asked about participation in an indie game project called Junkers. I don’t really have too much spare time these days, so it’s not possible, but I thought I’d at least help spreading the word, perhaps someone would be interested in joining their team. Demo reel can be found here, contact Syama if you’d like to help. Old comments Pawel W 2013-01-16 08:29:21 Pretty cool anims for ones done “by hand”.

GDC 2012/Mexico

Usually, around this time, I publish my collection of links to GDC presentations. This year however haven’t been really paying too much attention, took a week off and went to Mexico. I’ve only started to catch up… Do not despair, though, Jare has done a great job and you can find links at his blog. The trip itself was fun, although very different from our previous adventures as it was the first time we took our 10 months old daughter with us.

Hard Reset

My buddies at Flying Wild Hog have announced their first project recently. It’s a dynamic cyberpunk FPS with character progression elements. Make sure to check out the teaser: Been a long time since I’ve been to Poland so had no chance to play it, but after talking with people who did and knowing the team behind it – I expect good stuff. Old comments Branimir Karadzic 2011-07-19 18:47:27 It looks pretty cool!

GDC 2011

Not sure if it has much sense in the era of Twitter (everyone who’s interested can easily find links there), but let’s try. Some of GDC2k11 proceedings: Networking for Physics Programmers 2011, Glenn Fiedler (SCEA). PDF version here. Crash Analysis and Forensic Debugging, Elan Ruskin (Valve). Normal Offset Shadows, Daniel Holbert (High Moon Studios). Thanks, Ignacio! NVIDIA Game Technology Theater videos + some slides. Found by Guille.

Retro Pinball

As you might know, our CEO is the author of the classic Epic Pinball (coded 100% in assembler, obviously :). I’ve spent long hours playing the original, especially the Deep Sea table. Recently, our company in cooperation with Big Blue Bubble, created an Iphone/Ipad version of this game. I don’t have an Iphone, but played it a little bit at the office and it’s just as entertaining as it was, especially the ‘table feeling’ is really well preserved.

Some more benchmarks

Gave tr1::unordered_map a try, it seems to do perfectly average, nothing spectacular, nothing awful, except for predict_grow with 4 byte objects, where it’s almost 10x slower than the next implementation (that’s not an anomaly, it happens every time). I also found a bug in RDE where I overoptimized it a little bit - could result in a crash when searching for item that’s just been removed. It slowed fetch by about 3%, however later I found a way to remove some branches and sped it up by ~6% again, so final version is even faster.

EA STL released, updated benchmarks

Big weekend news were EA releasing some of their codebase source, including parts of EASTL. Given that the original EASTL document has been the main inspiration for my RDE STL experiment, I was very interested in finally seeing the code itself. First impression - it’s still big. It is leaner than STL, but it is a big library. That’s quite understandable if you remember it’s not a local, one studio thing, it’s used by the whole organization.

Process Explorer & 64-bit OS

Few years ago I mentioned a nice little program by SysInternals - Process Explorer (task manager replacement). I install it everywhere I go. Recently, I ran into weird problem, however. My work machine runs Windows 7 64-bit. PE works perfectly, the only problem is that I couldn’t make it to replace standard Task Manager. There is a menu option that should do just that, but running it didn’t change nothing.

Clash of the Thread Pools

Recently, I’ve been experimenting a little bit with different kinds of MT-safe containers. I wanted to compare a performance of various kinds of containers I’ve had lieing around. It turned out it’s more tricky than I expected, as under Windows, results vary wildly from one run to another. I’m not even speaking about container performance, just running same task can be many times slower (see this note for example). Include similar problems with managing the threads themselves (sometimes they wake up too late or not at all) and you should get the picture.

GDC update

As I mentioned - I’m flying for a quick vacations tomorrow, so I will not be able to update the GDC links. This post is mainly to trigger RSS readers, as I’ve added some new stuff during last week. Feel free to add new links in the comments, I will move them to the post when I get back. In the meantime people can just dig them out from the comments section.

GDC 2010 proceedings

I’ll keep updating this post with links as I find them. Pål-Kristian Engstad (Naughty Dog) - Introduction to SPU Optimizations, part1 & part2 (not sure if those are official GDC2k10 papers, but have been just released and are great), Glenn Fiedler (Sony Santa Monica), Networking for Physics Programmers (slides + demo), Havok demovideos, Kent Hudson (2K) - The AI of BioShock 2: Methods for Iteration & Innovation (slides, keep an eye on Kent’s GDC page, versions with annotions to come),

Sleepwalker Games

Another Polish gamedev company. Founded by ex-CDPR employees, some of main forces behind The Witcher (including Lead Gameplay Designer & one of Lead Programmers). Keep an eye on those guys, you can count on interesting stuff coming from them. Good luck! Old comments Mateusz Loskot 2009-10-13 08:30:59 Hmm, it’s interesting. I’m wondering what has happened these guys moved out from CDPR. Anyway, good luck! admin 2009-10-13 08:55:04 Well, if you read some latest press news carefully/trace Linkedin etc you can probably figure it out :)

Random links, 31/08/2009

Some interesting links: Recast & Detour libraries. Recast is library that automatically generates navigation meshes from level geometry, Detour is a pathfinding library. Both created by Mikko Mononen. Demosceners may remember his Demopajaa tool (demo authoring tool) or Moppi Productions demos. Pierre Terdiman uses Recast in his Konoko Payne project, you can read about his experiences at his blog. Konoko Payne is a one-man project, Oni-meets-Max Payne game.

Assembly 2009

First, there was a NoooN (Ra only, hoped for Karl coding)+Excess+Andromeda invitation… Now, results & releases are available. So far I’ve only seen a winning demo. It’s nice, with some cool ideas and impressive fluid/smoke simulation, but I must admit I expected more from CNCD/Orange/Fairlight cooperation (then again, no Wili/Tsunami/Hoplite participated). Still worth checking out, obviously.

Siggraph 2009

You know the drill, will keep adding links here: Beyond Programmable Shading 2009, NVIDIA papers, SG 2009 paper list by Ke-Sen Huang, (both links courtesy of gamedev.pl folks), Light Propagation Volumes in CryEngine 3 (A. Kaplanyan/Crytek), Inferred Lighting: Fast dynamic lighting and shadows for opaque and transluscent objects (S. Kircher, A. Lawrance/Volition Inc.) Old comments Link Mini-Dump 08/17Jeremy Shopf 2013-08-06 02:25:30 […] Maciej Siniloâ?

Netflix company culture

Pretty interesting internal presentation on Netflix company culture. I’ve only heard about them because of their Netflix Prize contest and now I’m trying to find some more info. A company that treats its employees as grown ups, shocker. There are some pretty slogans at the beginning (company values etc… hard part is to actually obey them, not to chisel them in marble), but then it becomes rather interesting (I especially like slides 27-28 and salary review system).

Flying Wild Hog

New Polish development studio, founded mostly by Painkiller veterans, who later worked with me at CDPR for a while as well. Not much at their site yet, but keep an eye on it, those guys are cooking something really interesting. Also, they seem to be hiring, so if you’re looking for job – go for it, they’re a great, very talented bunch. I don’t think it’s very official yet, but nothing can hide from my detective powers…

Random links, 02/07/2009

Dropbox - wanted to make some weekend experiments, so finally gave it a try and it really is as good as people say. Sharing files between different computers without hassle. It can either work completely in the background or you can treat it as a file server. Great piece of software. Paris Game AI Conference 2009 - report, highlights, presentations. Worth checking out even if you’re not AI programmer.

Random links, 05/04/2009

“Almost perfect…” - story of Word Perfect (competitor of MS Word, for young readers), interesting read, Two-part blog entry from Jeff Vogel, if you’ve ever wondered on indie RPG sales - this one’s for you (Jeff’s owner of Spiderweb Software, probably the most famous indie RPG developer), Superannuation - great source of information about top-secret/canned projects. Usually data-mined from resumes, but not only. People are really careless sometimes…

GDC update

Wow, kudos to GDC folks, they’re really fast this year, many presentations can be found at the official conference site already. Even better, documents have meaningful names for a change, instead of typical s1533262.pdf. I’ve updated original post with some more links. I didn’t put separate entries for new publications that can be found on tutorial/slide page, if you’re interested – see comments, some additional links there. Old comments ed 2009-04-15 18:19:59 They just blocked access to slides.

GDC 2009 proceedings

Let’s start, shall we? I’ll update this post with publications, as they become available: Jeremy Shopf (ATI): “Mixed Resolution Rendering”, Nocturnal - GDC 09 Release (Insomniac), Intel’s GDC materials +Project Offset new videos, Glenn Fiedler (Sony Santa Monica) - Networking for Physics Programmers (slides… sadly, kinda hard to figure them out without audio), Summary of Jeff Kaplan’s (aka Tigole) WOW panel - not your typical GDC stuff, but pretty interesting nonetheless (especially for all of us, (ex)WOW addicts),

Breakpoints in system libraries

I’ll just put it here, because I’m fed up with forgetting it and experimenting with syntax every time I need it. There are times when you need to put breakpoint in system function, like malloc or OutputDebugString. For example, I use the latter one sometimes, in order to intercept DirectX warnings (couldn’t find a way to make it break on warning, not only on error). Syntax for breakpoint window is (function): {,,kernel32.

Random links, 19/02/09

Some interesting stuff I’ve found recently: Intelligent Brawling - I’ve read it some months ago in Game Developer and it finally is online. Very interesting article about combat in action games. Tom basically analyzes several games, researching enemy behaviors - attack timing, combos, AI, tells and so on. Must read for every gameplay coder/designer. Gustavo Duarte blog - system/hardware articles on this blog are pure gold.

Crash handler/reporter (Win32)

Usually, I try to write about less common programming issues here, this time it may be something less “flashy”, but very useful nonetheless. To be honest, if I had to choose single most crucial feature I coded for The Witcher it would be this crash reporter/handler. It took me few hours of home-coding, but has proven invaluable in later years of development process. If you don’t have similar system in place yet and you develop for Win32 – just stop doing whatever you’re doing and implement it now, you’ll thank me later.


Just a quick note – recently I’ve finally completed my quest for perfect desktop. I’ve found small launcher utility that lets me to execute applications that are not on my quickbar, so I don’t have to use desktop icons or “Start” menu. Instead, I just tap Alt+Space and have all my programs just few keystrokes away. Meet Launchy. It let me to remove all icons and hide taskbar, leaving my desktop totally clean.

Catching up

Few words about what I’ve been up to profesionally for past months. As you may have heard - Geralt is coming to the consoles. There’s PS3/X360 adaptation of ‘The Witcher’ in the works. It’s being developed in close cooperation with French company - Widescreen Games. They’re cool guys, basically mix of best oldschool French sceners (like Patapom/Bomb) and game developers (including Outkast programmers). Before diving head first we had to deal with re-designing many elements of the game like combat and UI.

Know your assembly, part 3

I’ve been playing with radix sort for RDESTL recently and MSVC optimizer surprised me one more time. First of all, it seems to generate much better code if my histogram array is local to function and not member (in the first case it makes better use of registers and keep less stuff in temporary variables). It costs us 4k of stack, but I can live with that. Other than that, generated code is pretty smart, sometimes almost too smart.

Shameless plug

I normally try to put here stuff that’s interesting to all kinds of readers (for carefully chosen definition of reader…) but today I’ll make an exception and post a link to Polish article. To add insult to injury, it’s an interview with myself. It has been conducted by an old demoscene mate of mine - Hollowone, known as Daniel Biesiada IRL, who runs a fairly popular IT/programming/.NET/game blog. Appearently, some of the readers of his site have been interested in finding out more about gamedev, some tales from the trenches and such.

Software Occlusion Culling

When I started my gamedev adventure I wanted to be a rendering/3D programmer. This was where I felt most confident. Just like 90% of demoscene coders, I didn’t have much experience with AI, physics or gameplay, it wasn’t really needed for demos. Later it turned out that other areas are very interesting as well, I ended up doing them all at one point and nowadays I don’t really code much 3D stuff.

RDESTL - changes

Seems like I’m mainly pimping RDESTL recently, but that’s all I’ve time/power to work on when I’m back at hotel. Quick update: latest hash_map included in Attractive Chaos benchmark (+bug fixes). It did quite well. One problem is it consumes memory like crazy, but benchmark works on a really huge set. Anyhow, memory/performance ratio can be controlled via load factor parameter. I’ve added simple stack class (built on top of other generic container, like in STL).

Less painful prototyping in C++

Just a bunch of useful links/ideas that may help you if you need to make a quick prototype in C++ one day. I know, it may sound stupid, but sometimes it really is a good idea, especially if you’ve the engine+ compatible assets ready. Digression: of course, initally, you may try to be a smart ass and have this idea of making your prototype in C#/XNA. After all, it doesnt have to be very fast and it’s 100x more friendly with better turn-around times and so on.

Random links

Just a few interesting links I’ve found recently: Visual Computing blog - a cooperation between Intel and Gamasutra. Links/articles mainly on topics of multicore/rendering, slightly focused on Intel’s technologies (TBB, Thread Profiler, Thread Checker, VTune). Worth checking out, to see what’s going on. They’re obviously people of great taste, too, as they linked to yours truly and that’s how I found about it :) Parallel Rendering with DirectX Command Buffers - Gamefest 2008 paper/source code by Vincent Scheib (of Demoscene Outreach Group fame).

Random thoughts (#1)

Just some random notes, that are too short for their own entry, but still rather interesting: Stack Overflow - new initiative by perhaps two biggest celebrities in the programming blogging community - Jeff Attwood and Joel Spolsky (even if he insists he’s not blogging, just writing essays). In terms of marketing it’s blogging equivalent of Marlon Brando and Jack Nicholson doing movie together. It’s also my first serious contact with podcasts.

Google Tech Talks

I think I’ve already posted links to some videos from Google Tech Talks, but I’ve been catching up recently and found some other interesting movies. They all have a nice, distinct geek spirit… Where else can you find 50 minute presentation about the beauty of quicksort implemention? Three Beautiful Quicksorts (Jon Bentley) - who said sorting is boring? How To Design A Good API And Why It Matters (Joshua Blooch),


Links for today: Geoff Keighley - Behind the Games - every episode feels a little bit like Dreaming in Code, just it’s set in the gamedev industry. My favourite article is about Trilobyte, but all of them are definitelly worth reading. Foxit Reader - PDF reader that basically can do everything that Acrobat can, only it takes 3MB instead of 60 and is like 100x quicker. First thing I do at every new machine is to uninstall Acrobat and get this one.