One of the more recent trends in engine development is to think of a game frame, not as an image, but instead as the data representing that image. Such a data oriented design allows us to sneak in some extra multithreading where you least expect it.
To implement this concept, start by creating a Frame class in Frame.h/cpp found in EngineCore/Frame/.
Also create the files FrameManager.h/cpp with a namespace FrameManager and a nested detail namespace. The detail namespace should have one variable Frame currentFrame.
Once the foundation is created, add a Step function to the FrameManager namespace which increments a member variable of currentFrameframeCount by one. frameCount should obviously be initialized to 0 when the object is created.
One of the more recent trends in engine development is to think of a game frame, not as an image, but instead as the data representing that image. Such a data oriented design allows us to sneak in some extra multithreading where you least expect it.
To implement this concept, start by creating a Frame class in
Frame.h/cpp
found inEngineCore/Frame/
. Also create the filesFrameManager.h/cpp
with a namespaceFrameManager
and a nesteddetail
namespace. Thedetail
namespace should have one variableFrame currentFrame
.Once the foundation is created, add a
Step
function to theFrameManager
namespace which increments a member variable ofcurrentFrame
frameCount
by one.frameCount
should obviously be initialized to 0 when the object is created.