Game Engine Design and Implementation