April 2017
Beginner to intermediate
394 pages
9h 16m
English
It is worth noting that even if you choose this approach, you can still have your core engines decoupled from the game object. When writing the graphics engine, for example, instead of passing in a game object as a parameter to a Draw function, we could pass in the members that the graphics engine needs:
void Graphics::SetTexture(int textureID); void Graphics::SetTextureCoords(const float* coordArray); void Graphics::Draw(const M5Mtx44& worldMtx); vs void Graphics::Draw(const Object& obj);
Another argument for creating objects like this is that we know exactly what is in our game object. Compared with other approaches, we never need to cast our object or search for properties within the object. ...
Read now
Unlock full access