Hack of the day: Alternating among two values
December 31, 2010
During game development you often need a variable that switches between two values with each call/loop/frame. » more
During game development you often need a variable that switches between two values with each call/loop/frame. » more
Here are my top 10 funny developer quotes:
» more
With the following for-loop you can decrement x until it reaches zero: » more
You often need conditions that reset variables during programming. » more
If you want to access an array in c/c++ it’s very common to use the following code: » more
The Humble Indie Bundle #2 reached over $500’000 at the first day. This is really impressive. » more
A very cool trick I recently found in the gameswithin blog is to put enums into seperated namespaces. » more
In C++ booleans will be implicitly converted to integers when required. You can use this behaviour to create short and readable code. » more
From time to time you will need the singleton pattern in games programming. A singleton restricts the instantiation of a class to one object. » more
The following code snippet (in c++) shows how to get the prime factors of any integer: » more