Page 1 of 1

AI miners need to remember information

Posted: Thu Aug 29, 2013 10:07 pm
by zakhennahr
While anyone has line of sight:

Code: Select all

if (enemy BC is visible) {
    this.avoid = new Point(enemy BC x, enemy BC y);
}
While they go mine:

Code: Select all

while (mining) {
    Line line = new Line(this.x, this.y, this.angle);
    if (AI.avoidRadius > distanceBetweenPointAndLine(line, this.avoid)) {
        turnTheFuckAround();
    }
}
Or, in English: The AIs need to be a bit smarted about going to the enemy BC and then coming back to it again and repeating. They collaborate with the enemy team to kill our econ.