The updated auto-ban system checks for illegal values for gravity, drop velocity, initial jump velocity, current speed and obstacle count. Since I wasn't modifying any of those values, I only had to worry about the current speed because as the game progresses, the current speed increases. To avoid tripping the auto-ban system, I only shifted the collision boxes up on the y axis whenever the current speed was less than 25. This is the code that I used:
setInterval(function() {
var yPosition = 1000;
function shiftCollisionBoxes(obstacles, yPosition) {
if (obstacles && yPosition >= 0) {
for (var i = 0; i < obstacles.length; i++){
for (var j = 0; j < obstacles[i].collisionBoxes.length; j++){
obstacles[i].collisionBoxes[j].y = yPosition;
}
}
}
}
if (Runner.instance_.currentSpeed < 25) {
shiftCollisionBoxes(Runner.instance_.horizon.obstacles, yPosition);
shiftCollisionBoxes(Runner.instance_.obstacles, yPosition);
}
},200);
I did pledge to be good. I guess I forgot to mention when. I acknowledge that this solution isn't 100% unique as other solutions already messed around with collision boxes and y axis positioning. However, this solution does demonstrate that checking for the existence of the collision boxes isn't enough. The code must also check that the positioning of the collision boxes wasn't tampered with. This solution also explicitly avoids invoking the updated auto-ban system. If I manage to make it into the hall of fame, this hat is going to match well with my white vans. Happy holidays everyone!
Thanks to this awesome experience and subsequent attempts to silence me, I will not participate in future winter bashes. You can keep your stinkin hat.