For Map: Both Server side and client side should have the basic map info such as map size, camp and where can go or not. But server will not calculate how to find the path from A node to B node. Server side just checks if player can go directly from one node to another, if so player can go, if not the player is cheating. Client has to calculate the path and sends the path to server, like player want to move from A node to B node, client calculate the path is A->D->C->B, server side just checks every adjacent node can go directly without any block, but server side has to check the speed and time to avoid speed gear. About the dynamic object with which player can interact, such as flower which player can collect and make drugs as material, client does not have to load dynamic object, server side is responsible for notifying about adding/deleting.
For Player: The client has to receive the action commands including the player self and other players and executes them. Also client has to do some game logic to let the game to be more nature. Such as server side send two commands to client 1) playerB move from A node to C node. 2) player B at C node attack you with using magic skill 11. The reason why client receives these two command so close is because the bad networking sometimes. Client should have let playerB move faster then normal from A to C, then attack. You can see some actions more faster than before if the network is not so good.
About player move, client can move first, then if server denies, player will be pulled back. but about player skill, client cannot fire the skill until server confirms it. That's why we cannot use skill but can move in bad network situation. Before player use a skill, player has to do some actions like raise the ax, it is a good way in the period client waiting server confirm.
For NPC: very same as Player except the AI part. Server side has to use A star to find the NPC move path sometimes, most of the time the NPC move as the designed path back and forth.
Eric WuMember Since 28 Mar 2012
Offline Last Active Jul 17 2014 10:02 PM
- Group Members
- Active Posts 2
- Profile Views 1,057
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown