C++ tip 6: Have assignment operators return a reference to *this

C++ tip 6: Have assignment operators return a reference to *this

If you are using any assignment operators in your classes, which I'm sure you are, make sure to return a reference to "*this".

Game Engine Update- Why I chose the GJK over the SAT algorithm

As of 7/15 I have been working on Collision Detection between 3D objects. Initially I was using the SAT (Separation Axis Test) algorithm to detect collision between objects but decided that it would be better to use the GJK (Gilbert-Johnson-Keerthi) + EPA (Expanding Polytope Algorithm) instead.

C++ tip 5: Never call a virtual function during construction or destruction

C++ tip 5: Never call a virtual function during construction or destruction

Never call a virtual method inside a constructor or destructor in C++. If you do, you will get unintended errors. 

C++ tip 4: Use const whenever possible

C++ tip 4: Use const whenever possible

What does *const* mean? it simply informs the compiler and other programmers that a variable should not be modified. Reading Efficient C++, I came across a nice tip that I have been trying to implement in my game engine: Use const whenever possible.

C++ tip 3: Always initialize C++ objects before you use them.

C++ tip 3: Always initialize C++ objects before you use them.

It turns out that in C++, it is a good idea to always initialize objects of built-in type, because C++ only sometimes initializes them itself. Read on to learn more.