Elfocrash Posted May 26, 2017 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. Â
0 panda Posted May 26, 2017 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. Â
0 Kibbelz Posted May 26, 2017 Posted May 26, 2017 Considering @SPQR Panda is rewriting networking for the next release i would't bother studying it.
0 Elfocrash Posted May 26, 2017 Author 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.
0 Elfocrash Posted May 26, 2017 Author Posted May 26, 2017 Just now, SherwiN said: You guys release the source? @Kibbelz Nah, decompiled it
0 Guest SherwiN Posted May 26, 2017 Posted May 26, 2017 Just now, Elfocrash said: Nah, decompiled it  Thought so
0 Elfocrash Posted May 26, 2017 Author 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.
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.
Â
8 answers to this question
Recommended Posts