Basic Game Engine for JavaScript