Elfocrash Posted May 26, 2017 Share Posted May 26, 2017 So i've been diving into the code during my lunch break and i noticed several things but only one made me curious. Â Why are you using a Long as your packets opcode and not a byte? Is there any weird black magic i am not aware of? Â Thanks. Â Link to comment Share on other sites More sharing options...
0 panda Posted May 26, 2017 Share Posted May 26, 2017 2 hours ago, Elfocrash said: I have no intention to study it, i've written networking for multiple gameservers.  I am curious about why that came to be.  2 hours ago, Kibbelz said: Considering @SPQR Panda is rewriting networking for the next release i would't bother studying it. It's a moot point why it came to be, and I doubt JC remembers why. It will likely be a short or a byte once I'm done with it, but probably for the sake of future-proofing it will be a short.  Link to comment Share on other sites More sharing options...
0 Kibbelz Posted May 26, 2017 Share Posted May 26, 2017 Considering @SPQR Panda is rewriting networking for the next release i would't bother studying it. Link to comment Share on other sites More sharing options...
0 Elfocrash Posted May 26, 2017 Author Share Posted May 26, 2017 Just now, Kibbelz said: Considering @SPQR Panda is rewriting networking for the next release i would't bother studying it. I have no intention to study it, i've written networking for multiple gameservers.  I am curious about why that came to be. Link to comment Share on other sites More sharing options...
0 Guest SherwiN Posted May 26, 2017 Share Posted May 26, 2017 You guys release the source? @Kibbelz Link to comment Share on other sites More sharing options...
0 Elfocrash Posted May 26, 2017 Author Share Posted May 26, 2017 Just now, SherwiN said: You guys release the source? @Kibbelz Nah, decompiled it Link to comment Share on other sites More sharing options...
0 Guest SherwiN Posted May 26, 2017 Share Posted May 26, 2017 Just now, Elfocrash said: Nah, decompiled it  Thought so Link to comment Share on other sites More sharing options...
0 Elfocrash Posted May 26, 2017 Author Share Posted May 26, 2017 Yeah makes more sense. Â I personally like going for the group up choice of double byte for similar context (if you ever have more than 128 different packets for the default behavior), which removed the minor overhead and adds the needed depth, but straight short makes sense too. Link to comment Share on other sites More sharing options...
0 Damian666 Posted May 26, 2017 Share Posted May 26, 2017 k, answered. closing Link to comment Share on other sites More sharing options...
Question
Elfocrash
So i've been diving into the code during my lunch break and i noticed several things but only one made me curious.
Â
Why are you using a Long as your packets opcode and not a byte?
Is there any weird black magic i am not aware of?
Â
Thanks.
Â
Link to comment
Share on other sites
8 answers to this question
Recommended Posts