Compiling Qt with Visual Studio

So your awesome project that you’re developing with Visual Studio, and you want to use Trolltech’s Qt library? Luckily Trolltech provides an awesome Visual Studio plugin that does almost everything Qt creator does (minus Intellisense support for slots). The bad news is that Trolltech doesn’t directly tell you how to go about doing this: Download…… Continue reading Compiling Qt with Visual Studio

On Randomness

So, here’s an interesting problem that I’ve been thinking about. Most (if not all) games make very heavy use of random values to determine outcomes and results. The interesting thing about this though is the idea of luck, or more specifically runs of bad luck (aka incurring the wrath RNG God) where you consistently do…… Continue reading On Randomness

C++ Template Name Madness

STL vectors can act as typical c-style arrays. To cast from vector<T> to T*, simply take the address of the first element. void myFunction( int* i ) { std::cout << *i << std::endl; }   // Now to pass the vector to the random function from above… std::vector myVector; myFunction( &myVector[0] );