Jump to content
  • Advertisement

newbprofi

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

102 Neutral

About newbprofi

  • Rank
    Newbie
  1. exactly. I dont know even 1 MMO game which have public server code inside client. Anyways, question is not about "Splitting vs Not splitting at all", question about "How to" split server/client code: 1) Create different Classes for Server and Client OR 2) Create same classes, but with splitted Fields and Methods. Well ok, i decided to continue use (1) option.
  2. More interesting for me is TERA, because there is as i know fully non-target system. Thats easy to detect: when you play TERA just watch your firewall and detect what exactly TERA uses (inside game, not launcher or smth): 1) Only TCP 2) TCP and also UDP 3) Only UDP (reliable UDP)
  3. I didnt play any of new non-targetting MMORPG's, and even dont have any to test. So i wonder. What exactly protocol they use ? Reliable UDP or pure TCP ? Because i know that for example many targetting MMORPGs used pure TCP: for example WoW and Lineage 2, so what new games (for example TERA) use for NON-targetting networking model ?
  4. What do i think about it: 1) Well, first of all, its not necessarily to hide "Variables" on client, i think "Null" value for them is enaugh, and also "Null/Dummy" types for that variables. 2) Hiding functions is only necessary or critical. 3) Using NON-splitted single classes is handy, because we dont have to write also separate containers/managers for Client and Server objects. 4) NON-splitted classes still need to split much functions into Client and Server. 5) NON-splitted classes are very dirty and ambiguous, because of #if/#endif everywhere. Though in C++ its not a big problem, we can use macros, but for C# its kind a problem. The main option here (3) for benefit of single NON-splitted classes. But again and again i come back to "Splitted classes", because its: 1) Cleaner. You dont have to write #if/#endif every where. 2) It shows you clean Server and clean Client logic, without any mixing. 3) Easier to create and maintain. Also have minuses: 1) The same objects need to be implemented twice. Ofcource, many game engines use "NON-splitted objects", they just have flag "IsServer" or something like that. But they all support only "Client-side-Server", they dont have to "Hide" any server code or logic, every player may create/host own game. But i am creating Master Server, players cant create own server or host games, they have to connect to remote server for playing. Like in MMOG. I know the main rule for writing networking applications is: "Separate Server and Client code", thats what i am doing actually.
  5. Hello, i am creating: 1) Client application which suppose to connect to remote secure dedicated server 2) Secure dedicated server I am hiding server logic, so i need to hide server code too. So what do i do for that ? For example i have single object type: Player, i split this class into two classes: ServerPlayer, ClientPlayer and writing them totally from scratch, but it is totally the same objects, semanticly, so i think i am doing something wrong, because this objects have much "Common" fields, but again most of that fields also splitted into: Client and Server types, so i think i cant just combine this classes with inheritense. How do you writing server and client code, when you need to hide much server logic ? I am thinking about combining ServerPlayer and ClientPlayer into one Player class, and other similar classes also, but dont know how to do it better (C# or C++), and should i do this at all ? may i should use splitted classes ? I think i could combine these classes into one Player with #if/#endif: // now i have for example: class ServerPlayer { int ID; void HandleMessageFromClient(){} } class ClientPlayer { int ID; PlayerModel Model; void SendMessageToServer(){} } // and want combine into: class Player { int ID; #if CLIENT PlayerModel Model; // some fields Server do not need also #endif // need to hide server functions from client #if SERVER void HandleMessageFromClient(){} #endif // dont need to hide client functions from server void SendMessageToServer(){} } so what should i do ? continue using splitted classes and split everything into Server/Client prefix, or use single Objects, because they are semanticly the same ?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!