I’ve been in the game industry for a few years now. I’ve been on the receiving end (getting interviewed) and on the attacking end (the interrogator). Most game industry interviews focus on knowledge of C and C++ however it is still helpful to know how to deal with Number Ranges, Vectors (Cross, Dot product), and good ole fashioned problem solving.
The link below is really good it contains many questions you might get asked:
Off hand, I want to say at every single interview I’ve been asked at least one Bit Manipulation question, one question from the link above, perhaps a pointer question, smart pointers, and Big O notation which is explained in detail here and a more brief but very nice description can be found here. Know the complexity of array O(1), linear search O(N), hash table best- O(1) worst O(N), and binary search.
Others asked about preincrement operators and how they differ from post increment operators, Palindromes, detecting a corrupt node in a Linked List, differences between C and C++, recursive functions, bit operators, multiply a number by 8 without using mult/divide, etc. All of this is pretty much covered by the link above. Soon in the future I’ll give my own solutions for fun
Coding Horror has some good articles on phone interview questions (those aren’t game industry specific however). Keep in mind most game companies stick to C / C++.
Another pretty good subject is called ‘Bit Twiddling Hacks’. If you Goggle for this topic all sorts of interesting links will popup. These questions tend to be stuff I’d probably never ask a candidate but still they are probably very handy to know. I’d prioritize this as tricky, fringe stuff though thats just like handy to know. I’d prioritze the questions covered at the link above much higher (like Palindromes, etc)
Here is one interesting link for example:
Here’s a good example:
Determining if an integer is a power of 2
unsigned int v; // we want to see if v is a power of 2
bool f; // the result goes here
f = (v & (v - 1)) == 0;
Design Patterns is something that is asked at almost every interview too. This link provides a very nice list.
Programmer Math Questions
Some standard math questions usually deal with Dot products so you’ll want to know them backwards & forwards. The key is realizing that two vectors that are in the same directions is greater than 0 (dot product == 1 when they are perfectly parallel). Two vectors that are perpendicular will equal 0. Two vectors that face opposite directions will be less than zero. You can take dot product of vectors to get a scalar that allows us to measure distance + get the angle between two vectors using arccos / atan2. For practice, I’d highly recommend just playing around with basic unit vectors on paper. Such as taking the dot product of [1,0,0] DOT [1,0,0] (parallel) and [1,0,0] DOT [0,1,0] (othogonal) and [1,0,0] DOT [-1,0,0] (opposite). By that same token, you really want to know bout Cross Product and how you can take inverse sin to solve for theta as described here.
More advanced tests may concern the distance from a point to the plane + ray vs plane + ray vs sphere intersection
Object Oriented Questions
Difference between pre-increment and post-increment
Cast operators such as static_cast, dynamic_cast, const_cast, & reinterpret_cast
Good info about testing for Google (applicable to almost anywhere!)
Some developers like to ask “Brain Teasers”. Most of your AAA (triple A) game developers will not due to barely having enough time to cover the stuff covered above (3d math, C++ knowledge, etc). This is more common to business industry. One question I’ve been asked before is this about the City of Truth/Lies as discussed here.