Added support for the debug line (added by henopied) Code changes:
on.debugLine(line_x, line_y)
added, the server sometimes sends a line for the client to render from your ball to the point though don't expect to see it.
Example examples/multiple.js
added demonstrating 5 clients connecting to a party server from one script
Protocol changes:
- Initial key (pakect ID 255) changed key from 154669603 (0x9381223) to 2200049715 (0x83221833)
Protocol changes:
- Premium skins/colors added
- Previously reserved byte in packet ID 16 part 2 is now used for some variable of ball and indicator of premium skin/color
New variables/skins info will be added to agario-client later
Code changes:
example.js
moved to./examples/
Thanks to henopied who showed me how to add SOCKS/Proxy support now we have:
AgarioClient.agent
addedAgarioClient.servers
opt.agent
addedAgarioClient.servers
opt.resolve
addedAgarioClient.servers
opt.ip
added./examples/socks.js
added showing how to use SOCKS
Test it using node ./node_modules/agario-client/examples/socks.js
Code changes:
Client.spectateModeToggle()
added (by jashman)
Client changes:
- Facebook key is now stored in
JSON.parse(localStorage.loginCache3).authToken
Code changes:
Protection from coding incidents added. Next functions now can be called before connection established:
client.spawn()
client.spectate()
client.moveTo()
client.split()
client.eject()
They will return false
if packet was not sent and true
on success.
Code changes:
AgarioClient.Ball
added- Added stability to
spawn()
. By default client will try to spawn 25 times before disconnect on.connected
event is now emited without 2sec delay- First
spawn()
after connect is now much faster - Config variable
client.spawn_attempts
added - Config variable
client.spawn_interval
added example.js
updated with custom events/variables example
Code changes:
ball.mass
added
Protocol changes:
- Move packet id
16
coordinates changed fromDoubleLE
toInt32LE
Code changes:
Deprecated on 04.06.2015
functions removed:
- function
Client.off
removed - function
Client.offAll
removed - function
Client.emitEvent
removed
Code changes:
var AgarioClient = require('agario-client');
AgarioClient.servers.getFFAServer
addedAgarioClient.servers.getTeamsServer
addedAgarioClient.servers.getExperimentalServer
addedAgarioClient.servers.getPartyServer
addedAgarioClient.servers.createParty
addedexample.js
is now usingAgarioClient.servers.getFFAServer
Protocol changes:
- Initial packet id
254
sends05
instead04
which forces server to use new protocol - Tick packet id
16
part 2 now usesSInt32LE
for coordinates
Code changes:
Client.facebook_key
added to login with facebook keyClient.on.experienceUpdate(level, current_exp, need_exp)
experience information update (if logined)
Protocol changes:
- Initial packet id 255 changed from
0xFF33189283
to0xFF23123809
- Server will disconnect you if you send old packet
Protocol changes:
- Initial packet id 255 changed from
0xFF29282828
to0xFF33189283
- Server will disconnect you if you send old packet
Today is a bad day Protocol changes:
- Now website sends server and server's key without which you will not be accepted by server
- New packet id 80 that used for sending server's key to server
Code changes:
Client.connect(server)
changed toClient.connect(server, key)
- Initial packet id 255 changed to simulate original code
- Initial packets 254 and 80 added
connected
event is now calling with 2000ms delay otherwise server will ignore spawn packet
Code changes:
Client.spectate()
added (by RouxRC)Client.on.spectateFieldUpdate(cord_x, cord_y, zoom_level)
added
Protocol changes:
- New packet id 240 that moves offset (why, agar? what for?)
Code changes:
- New packet management architecture
- buffer-dataview not used anymore
agario-client
added to NPM
Code changes:
Client.score
added (by GeoffreyFrogeye)Client.on.scoreUpdate(old_score, new_score)
added (by GeoffreyFrogeye)
Code changes:
Ball.color
is now working (fixed by GeoffreyFrogeye)- New events methods (improved by GeoffreyFrogeye)
- Deprecated property
Ball.is_virus
completely removed - Deprecated property
Ball.is_mine
completely removed .off()
marked as deprecated and replaced with.removeListener()
.offAll()
marked as deprecated and replaced with.removeAllListeners()
.emitEvent()
marked as deprecated and replaced with.emit()
Client.server
added
Protocol changes:
ball
coordinates changed from 32bit float to 16bit signed integerball
size changed from 32bit float to 16bit signed integer- packet ID 16 part 3 changed from list of visible balls to list of destroyed balls
- two bits between 2 and 3 part of packet 16 is not sent anymore
Now example.js
will automatically request server and connect to it.
Protocol changes:
ball
coordinates changed from 64bit float to 32bit floatball
size changed from 64bit float to 32bit float- color is now generating on server and sent to client
- new packet 72 that not used in original code
- new packet 50 used for teams scores in teams mode
Code changes:
- color is now stored in
Ball.color
- added empty processor for packet ID 72 (packet not used in original code)
- added
Client.teams_scores
property for teams mode - added
Client.on.teamsScoresUpdate(old_scores, new_scores)
event for teams mode