Basic Game Engine From Scratch