(a poor) Javascript Game Engine