dahquan / rattlesnake

An Open Source Slither.io Client Framework
MIT License
27 stars 16 forks source link

What type of packet uses this client? #92

Open SrNicolas opened 8 years ago

SrNicolas commented 8 years ago

In the slither.IO protocol there is two types like "g" and "G", what does this client use?

CupidStunts commented 8 years ago

its g

'use strict';

// Position Message // https://github.com/ClitherProject/Slither.io-Protocol/blob/master/Protocol.md#type_g_detail

// deflate the message

Object.defineProperty(exports, "__esModule", { value: true }); exports.deflate = deflate; function deflate(packet) { var id = packet.readInt16(); var x = packet.readInt16(); var y = packet.readInt16();

return { id: id, x: x, y: y }; }

its in dist/messages/ position.js

SrNicolas commented 8 years ago

Thanks!

SrNicolas commented 8 years ago

so it would be like this "var buffer = new Buffer(g)"; ???