issy123 / agario-protocol

Protocol for agar.io version 2.1.5
8 stars 2 forks source link

Protocol 18 - Battle Royale #20

Open Barbosik opened 6 years ago

Barbosik commented 6 years ago

sv_protocol 18 sv_secret 0x00007539 sv_versionClient 3.0.9 sv_versionProto 9.0.2 Server 20.0.3

Almost all is the same, but there are some new messages were introduced. Primarily related to the new BattleRoyale game mode. Here it is:

F2 - SERVER TIME

B0 - BATTLE TIMER

B1 - BATTLE START

B2 - BATTLE AREA

B3 - BATTLE EVENT

B4 - BATTLE RESULT

If you have any info about these messages, please let me know

Barbosik commented 6 years ago

Here is some details for a new messages

B4 = BATTLE RESULT

Offset Size Description
0 byte =0xB4
1 uint32 finalPosition
5 uint32 playersEaten
9 uint16 record count
11 string player 1 utf8 zero terminated name
x uint32 player 1 position
x string player 2 utf8 zero terminated name
x uint32 player 2 position
... ... ...
Barbosik commented 6 years ago

B2 = BATTLE AREA

Offset Size Description
0 byte =0xB2
1 uint16 playerCount (alive player count)
3 uint16 area count?
5 byte Flags? (present if area count >0)
6 int32 Area 1 X position
10 int32 Area 1 Y position
14 uint32 Area 1 Radius
18 uint32 ?Area 1 Color? (zero when area count=1)
22 int32 Area 2 X position
26 int32 Area 2 Y position
30 uint32 Area 2 Radius

I catch the following possible Flags values: 0, 1, 2, 3, 4. some fields of this message should be clarified...

Barbosik commented 6 years ago

B3 = BATTLE EVENT

Offset Size Description
0 byte =0xB3
1 byte event type
2 string prey name (utf8 zero terminated string)
x string hunter name (utf8 zero terminated string)
Type Description
0 [hunter] ate [prey]
1 [prey] jumped in a virus
2 [prey] never saw it coming (destroyed by unsafe area)
3 [prey] is no more (last player destroyed by unsafe area)
Barbosik commented 6 years ago

B0 = BATTLE TIMER

Offset Size Description
0 byte =0xB0
1 uint32 battle will be started at this server second
Barbosik commented 6 years ago

B1 = BATTLE START

Offset Size Description
0 byte =0xB1
Barbosik commented 6 years ago

F2 = SERVER TIME

Offset Size Description
0 byte =0xF2
1 uint32 current server time (unix epoch time)

Server sends this message just at begin of connection. It was added on 22 May 2018 with server version 20.0.0.

Elitis commented 6 years ago

Thanks for the share, btw, I was wondering if whether you do any freelance (paid) development?

Barbosik commented 5 years ago

it's just a hobby. I'm playing it with a custom client and don't get any profit from it. It's not a problem to share it. But it can be used by stupid mass botters to develop a new bots. I don't want to help stupid mass-botters, so this is the reason why I didn't shared it.

SuperOP535 commented 5 years ago

But you shared it? Or did you mean the client 🤔

Barbosik commented 5 years ago

I mean the client

m-byte918 commented 5 years ago

Barbosik, you're a saint!

agarian-2 commented 5 years ago

I dare Barbosik to re-create diep.io, agar.io is dead. This is the current "best" diep.io private server: https://github.com/nepphhh/arrasio Also hosted at http://arras.surge.sh/