A simple JavaScript game engine