Building Game Engine From Scratch