Original Post
Hi, I am not sure where this question belongs it contains networking system in my game.But I think it is mostly a question about how I should design this 'structure' so I wrote it here. I now have a networking class which can get packets.The first char of packets (as usually) decides what kind of function to be called. And next char's are parameters.btw their types and numbers differs from function to function. So here is my question; Where should I "solve" the packets to parameters.I mean should game engine has an function like this HandlePacket(Packet& newPacket)? Or should game engine have many functions like UpdatePlayer()NewPlayer()FireBullet() and pointers to these functions should be in a list of Networking class.Although I find the second way better, It is harder to do (overloaded functions with boost::bind).So is the first way proper or how should I handle this situation. Any help would be greatly appreciated =). I wrote this quickly, so I hope you can understand.