A simple 2D javascript game engine