Changed game ticks to setTimeout, prevent cpu leak