designing a simple game engine from the ground up