Agar developers made completely new code for game. Now code runs inside virtual machine that I can not reverse-engineer due to lack of knowledge and experience.
Unfortunately its time to say goodbye to agario-client
.
Initial idea of agario-client
was for me to learn websockets, binary protocols, reverse-engineering, github and have fun overall. I believe that I achieved all that.
Thanks to all, it was great time!
Protocol changes:
- Agar changed auth packet, check issue #129
Code changes due to PR #130
client.auth_provider
is not used anymore- Google+ tokens support is unknown at the moment
- Event
client.on.getLogin
added
Code changes:
- Event
client.on.leaderBoardUpdate
arguments changed fromold_leaders_ids, new_leaders_ids
toold_highlights, new_highlights, old_names, new_names
as fix for changed packet ID 49 (fixed by kosak)
Protocol changes:
- Initial key (pakect ID 255) changed key from 2200049715 to 154669603
Protocol changes:
- New packet ID
104
that forces client to callwindow.logout()
to logout from account
Code changes:
- New event
client.on.logoutRequest
for logout packet ID104
Protocol changes:
- New packet ID
18
that commands to delete all known balls from memory.
Code changes:
- New destroy ball reason
server-forced
when server commands to delete all balls.
Now agar.io sends random "virtual" size map as protection from bots.
New sizes are refreshing in client.on.mapSizeLoad
event.
When you re-spawning you should delete old balls from memory because their coordinates will be invalid. Not adding this to client's code because it can be changed by agar any time.
Now agar.io server allows only 3 connections from single IP instead of 5.
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.
Code changes:
client.local_address
added. Local interface to bind to for network connections (IP address of interface)AgarioClient.servers
opt.local_address
added. Local interface to bind to for network connections (IP address of interface)
Code changes:
client.headers
added for customizing WebSocket connection headers.
Code changes:
client.on.packetError(packet, err, preventCrash)
added. Check issue #46
Thanks to DrTheGoat for helping with getting corrupted packet.
agar changes:
- Facebook key is deprecated. Now tokens used.
Code changes:
- Example
examples/auth_token.js
added demonstrating requesting facebook token client.facebook_key
marked as deprecatedclient.auth_token
addedclient.auth_provider
addedAgarioClient.Account
addedAgarioClient.Account.requestFBToken()
added (with Endromede's help)
This update would not been possible without Endromede who reverse-engineered new tokens system.
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