Learning the ins and outs of an isometric game in JavaScript