procedural platformer in javascript