Minimal js/canvas game engine