Battle.net R&D > Diablo 3

Proto library, client, and server

(1/1)

Fr0stbyte:
I'm not going to pretend this is anything special. It's not. I haven't even scratched the surface of converting the known packets. And I'm tired as fuck. So if anyone out there is planning on coding a protobuf game library/client/server in CoffeeScript (bakes down to JavaScript) then you may or may not find this useful. It's an abstraction for Google Protobuf that does not rely upon Battle.net or Diablo 3, though they are used as quick examples. That's the goal, and it needs a lot of work.

All this does is pass a few packets between a client and server right now, nothing else. It's the start of an event-driven pluggable framework (built on a language that is not only great for asynchronous scripting, which simplifies the library, but also low-level cross-compatible C/C++ modules - I want to write so much more but all I can say is proper (SS)JS implementations rock). Anyone who wants to contribute please fork, and I may add you as a collab so we can do this :)

https://github.com/codeweaver/proto-game
https://github.com/codeweaver/proto-client
https://github.com/codeweaver/proto-server


--- Code: ---Codeweaver:bnet codeweaver$ coffee bnet.coffee

Starting game server (port: 1119)...
Started game server.
Connection from 127.0.0.1
Received:  <Buffer 0a 09 08 90 4e 10 fb de a4 e0 06> Type:  1  Length:  11
Sending:  <SlowBuffer 01 03 00 00 00 16 0a 09 08 90 4e 10 8a df a4 e0 06 12 09 08 90 4e 10 8a df a4 e0 06>  Type:  1  Method:  3  Length:  22
--- End code ---


--- Code: ---Codeweaver:d3 codeweaver$ coffee d3.coffee

Sending:  <SlowBuffer 01 01 00 00 00 0b 0a 09 08 90 4e 10 fb de a4 e0 06>  Type:  1  Method:  1  Length:  11
Receiving:  <Buffer 0a 09 08 90 4e 10 8a df a4 e0 06 12 09 08 90 4e 10 8a df a4 e0 06>  Service:  1 Method:  3 Length:  22
--- End code ---

Fr0stbyte:
A bit further, but still a few days behind..


--- Code: ---Codeweaver:bnet codeweaver$ coffee bnet.coffee
Starting game server (port: 1119)...
Started game server.
Connection from 127.0.0.1
Received [raw]: Length:  6 <Buffer 00 01 00 00 00 00>
Trying to find service (0).
Received:  Method:  1  Length:  0 Message:  <Buffer >
Sending [fake]: Length:  31 <SlowBuffer fe 00 00 00 1a 0a 0c 08 dd e9 8e bb 0e 10 d9 b9 ac f3 04 12 0a 08 9f 8e 05 10 a1 b5 b5 f3 04>
Received [raw]: Length:  25 <Buffer 00 02 01 00 00 13 0a 08 32 db 32 b7 ff 91 07 fa 12 07 0d 94 80 8c bf 10 1c>
Trying to find service (0).
Received:  Method:  2  Length:  19 Message:  <Buffer 0a 08 32 db 32 b7 ff 96 07 fa 12 07 0d 94 80 8c bf 10 1c>
Sending [fake]: Length:  9 <SlowBuffer fe 00 01 00 04 0a 02 04 03>
Received [raw]: Length:  21 <Buffer 00 02 02 00 00 0f 0a 04 01 fc ec 0a 12 07 0d 35 0e 24 71 10 1d>
Trying to find service (0).
Received:  Method:  2  Length:  15 Message:  <Buffer 0a 04 01 fc ec 0d 12 07 0d 35 0e 24 71 10 1d>
Sending [fake]: Length:  8 <SlowBuffer fe 00 02 00 03 0a 01 01>
Received [raw]: Length:  101 <Buffer 01 01 03 00 00 5f 0a 02 44 33 12 03 57 69 6e 1a 04 65 6e 55 53 22 17 73 61 6b 6c 6a 64 73 61 6c 6a 6c 6b 40 73 61 64 6b 64 61 73 6c 6a 6b 28 15 32 33 41 75 72 6f 78 61 20 33 39 36 62 38 36 33 32 61 37 5f 70 75 62 6c 69 63 2f 31 38 38 20 28 41 75 67 20 33 31 20 32 30 31 31 20 32 30 3a 32 35 3a 30 37 29>
Trying to find service (1).
Received:  Method:  1  Length:  95 Message:  <Buffer 0a 02 44 33 12 03 57 69 6e 1a 04 65 6e 55 53 22 17 73 61 6b 6c 6a 64 73 61 6c 6a 6c 6b 40 73 61 64 6b 64 61 73 6c 6a 6b 28 15 32 33 41 15 72 6f 72 61 20 33 39 36 62 38 36 33 32 61 37 5f 70 75 62 6c 69 63 2f 31 38 38 20 28 41 75 67 20 33 31 20 32 30 31 31 20 32 30 3a 32 35 3a 30 37 29>
{ name: 'network.authentication.logon_request',
  program: 'D3',
  platform: 'Win',
  locale: 'enUS',
  email: 'sakljdsaljlk@sadkdasljk',
  listener_id: 21,
  version: 'Aurora 396b8632a7_public/188 (Aug 31 2011 20:25:07)' }
Sending [fake]: Length:  377 <SlowBuffer 27 01 00 00 25 f2 02 0a 2c 0d 53 55 00 00 15 68 74 75 61 1a 20 8f 52 90 6a 2c 85 b4 16 a5 95 70 22 51 57 0f 96 d3 52 2f 39 23 76 03 11 5f 2f 1a b2 49 62 04 3c 12 c1 02 00 73 cb b9 af 48 b1 22 11 16 6c 7c 6e fb 2c 73 bf 7b eb fd 94 fb 70 ec ec b1 15 6d c6 bb 4e 76 c8 51 cd dd 5b df f9 3e 3c 98 9e 11 41 73 60 bc fd 51 d0 61 30 6b dd ca 38 a5 1d 3b e8 01 e8 31 67 60 c2 2b 1e 29 59 03 0e 4d 97 9b 3e 0a cb cf 3c c8 e1 8e 58 68 71 1c 5d 2b d8 ba 52 85 97 1d d6 46 ad 09 03 a2 5d 02 ca 14 b2 1d 16 67 3d 53 66 e5 a8 c1 76 70 0b 97 a7 69 aa 2a 98 26 ba e4 7e f9 58 87 ef 21 e4 e1 91 e3 17 e8 55 de 53 cc fa 77 a9 8f 04 80 6e 7f 49 4f f8 3f 2c 44 ce da 64 8e 75 7e 0c 94 f1 3e 5e fd 31 dc df f4 7d 24 39 b9 7c 12 4d 5d d2 d2 4f 48 2e fa 52 b4 8e c7 4e 26 f9 9d db e1 a1 5a 5f af 7f 83 f1 12 78 5f b8 12 f4 88 b1 f4 ed 94 dd 08 26 15 58 a6 01 fb a0 ee 40 3e 60 75 aa d7 81 89 6f 38 81 0d b2 4f fa 89 11 ab 0a 6a e6 26 79 48 63 4a 2c b4 a7 e0 74 63 84 3d 9d e3 63 fc 22 ea db 5c 0f 98 e6 75 ab 0f 81 7d 4d 99 ef 4b 68 5e d0 d5 b2 b6 80 4b f5 c7 4b 4a b0 fc 4f 67 2f 7a 21 7e 68 bb 33 a9 da 0d 96 74 8f 54 1e 94 1e 46 a0 9c 52 3d 1a 78 4c>
Received [raw]: Length:  6 <Buffer fe c2 17 00 00 00>
Trying to find service (254).
Received:  Method:  194  Length:  0 Message:  <Buffer >
Cannot find a request handler.
--- End code ---

Fr0stbyte:
Updated. Bit stuck at the hero list. Most is implemented up to char screen, except that the last 2 packets don't want to work. (ExecuteRequest's)

Fr0stbyte:
Update: had time to get it *up to* the char screen, awoohoo.

Navigation

[0] Message Index

It appears that you have not registered with DarkBlizz - Making Battle.net Magic -. To register, please click here...
Go to full version