Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Eric Wu

Member Since 28 Mar 2012
Offline Last Active Jul 17 2014 10:02 PM

Posts I've Made

In Topic: A "What's Next" Networking Question

22 October 2012 - 09:23 PM

There is an easy way, you can post your server IP in BBS or your blog, users can access the website and get server IP for login.
No need to change your codes except inputting the server IP in client login UI.

In Topic: A 2D online game design

25 September 2012 - 09:04 PM

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.

PARTNERS