compatible with old mygame.js