Slither.io-bot: Visual collision circle does not correspond to the snake's actual collision radius

Created on 8 May 2016  路  4Comments  路  Source: ErmiyaEskandary/Slither.io-bot

I've noticed the bot will dodge snakes that appear outside the drawn circle.

Also the circle does not scale correctly with zoom. If you zoom out it shrinks too fast; if you zoom in it grows too large.

low bug

Most helpful comment

Yay, this is our 100th issue!

All 4 comments

Yay, this is our 100th issue!

:)

fixed here https://github.com/ErmiyaEskandary/Slither.io-bot/pull/109

Collision circles are created using canvas.getScale(), they were basically being scaled twice...

  // Draw a dot on the canvas.
        drawDot: function(x, y, radius, colour, fill) {
            var context = window.mc.getContext('2d');
            context.beginPath();
            context.strokeStyle = '#00FF00';
            context.arc(x, y, radius * canvas.getScale(), 0, Math.PI * 2);
            context.closePath();
            if (fill) {
                context.fillStyle = ('green red white yellow black cyan blue'.indexOf(colour) < 0) ? 'white' : colour;
                context.fill();
            }
            context.fillStyle = 'black';
            context.strokeStyle = '#000000';
        },

Fixed..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EatSnakes picture EatSnakes  路  3Comments

bernardojedi picture bernardojedi  路  4Comments

TheFlyingPlatypus picture TheFlyingPlatypus  路  6Comments

phrokton picture phrokton  路  9Comments

ghost picture ghost  路  10Comments