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
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 Select
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
Code Select
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