Tag Archives: C++

Job System and ParallelFor

Some time ago, while profiling our game, I noticed that we have a lot of thread locking and contention resulting from a single mutexed MPMC job queue processing a large amount of tiny jobs. It wasn’t possible to merge work … Continue reading

Posted in Uncategorized | Tagged , | 2 Comments

Visual C++ linker timestamp

Nice trick to get build’s timestamp at runtime (Visual C++ only): It’s not very portable, but it doesn’t require any additional recompilation (as __DATE__ __TIME__ macros do).

Posted in Uncategorized | Tagged , | 1 Comment

PixelJunk Eden data extractor

Recently Q-Games ported one of their games – PixelJunk Eden to Windows. Actually it’s their first Windows release. From tech perspective it’s not as impressive as PixelJunk Shooter series, but still it was quite interesting to poke around this game’s … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Virtual memory on PC

There is an excelent post about virtual memory. It’s written mainly from a perspective of console developer. On consoles most of memory issues are TLB misses and physical memory limit. I’ll try to write more about how (bad) it looks … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Software occlusion culling

Today CPUs are quite fast, so why not use them to draw some triangles? Especially when all the cool kids use it them for software occlusion culling. Time to take back some of CPU time from gameplay programmers and use … Continue reading

Posted in Uncategorized | Tagged , , | 4 Comments

VC++ and multiple inheritance

Today at work we were optimizing memory usage. At some moment we found out that size (on stack) of our basic data structures is x bytes bigger than summed size of their members. Every basic data structure was written following … Continue reading

Posted in Uncategorized | Tagged | 4 Comments

C++ compiler VS human

There is a very nice article about writing fast math library on gamasutra. It shows for example that using operator overloading generates slower code than when using functions. A lot of people believe that compiler will generate better code than a … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Particle data structure

Particles are usually some kind of simple structs stored in an array. Then every frame vertex buffer is filled using that array. You really don’t want to sort them (at least not all particles and sometimes sorted particles don’t look … Continue reading

Posted in Uncategorized | Tagged , | 3 Comments