Category Archives: C++

References For The Win


I love single character code changes that generate massive performance improvements. Unreal has had static code analysis passes not too long ago. It’s surprising that SA didn’t identify this issue. It’s also unlikely that programmer code reviews would have detected something as tiny as a … Continue reading

Posted in C++, Computers and Internet, Game Programming, Unreal | Leave a comment

Package Perfect


Recently I needed to package up an Unreal build for distribution. You can do this from the Unreal Editor v4.6 by selecting File->Package Project. However, I wanted to automatically create packages on a build machine without human intervention. That meant I … Continue reading

Posted in C++, Computers and Internet, Game Programming | Leave a comment

Random Fail


One of my common software interview questions involves the creation of a game board. Part of the problem includes the generation of random numbers. If the candidate is writing in C/C++, the typical code I see looks something like this: srand(seed); // one time … Continue reading

Posted in C++, Computers and Internet, Game Programming | 1 Comment

Git’n Bashed and Objective, See?


At Microsoft, the tools for my daily work included things like C++, PowerShell, and Visual Studio. I also used many internal tools with names like Source Depot and Razzle. And naturally I used the Windows platform. It’s both a pleasure and … Continue reading

Posted in C++, Computers and Internet | 1 Comment

Fun with Powers of Two


Recently I needed to know the maximum number of decimal digits in a 64-bit unsigned integer. I put together this handy table as a reference. Value Decimal Decimal Digits 2^8 256 3 2^16 65,536 5 2^32 4,294,967,296 10 2^64 1.8 … Continue reading

Posted in C++, Computers and Internet | Leave a comment

Auto Pilot


I was recently working on a small programming project, and decided to fully embrace the new C++11 keyword auto. Auto allows the compiler to deduce types. The canonical example is: // before C++11 for( vector::const_iterator i = begin(c); i != end(c); ++i … Continue reading

Posted in C++ | 4 Comments

Move Construction, part IV


In my previous post, we discussed std::move(), a new function which is actually just a cast and has no performance overhead. It’s good to recall the problem we’re trying to solve. v.push_back( Texture(…) ); // copy from a temporary In … Continue reading

Posted in C++ | 3 Comments