• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當自強而不息

            Getting Online with Multiplayer Gaming(7)

             

            Looking at Clients

            Once connected, clients just need to collect local player control information and
            send it up to the server. Between the updates received from the server, the clients
            guess (using dead reckoning) how to handle all the game characters based on their
            last known state.

            For example, all characters that were walking at the last update keep walking until
            the server signals them to stop. In this way, the game-play appears smooth, and with
            a good network connection, server updates are received fast enough for the game
            to stay entirely in sync.

            As illustrated in Figure 19.8, whenever a client makes a change in action (such as
            walking in a different direction than in the last known state), that change in state is
            immediately relayed to the server, which immediately sends that action to all connected
            clients. In that way, synchronization is much better.

            Speaking of changes in player actions, exactly what actions can a player perform?
            Navigation for one. As players walk around the map, their direction of travel is sent
            up to the server. Notice that only the direction of travel is sent.

            If you allow clients to specify their coordinates when they move, you’re inviting
            cheaters to mess with the values. Instead, the server will modify the coordinates of
            the player and send those coordinates back to the clients (at which time, it doesn’t
            matter whether cheaters modify the values, because the server can’t be affected).

            For specific actions, such as walking, clients are allowed to change their own states.
            As a result, players can move between server updates. For actions such as attacking,
            only the state change is sent to the server, which in turn processes the attack and
            sends out the appropriate state changes to all clients.

            Players can be updated only every 33ms. The updates are time-limited in order to
            make sure the clients don’t flood the server with thousands of actions. By keeping
            actions to a minimum, the server can process things more quickly, and the gameplay
            stays smooth.

            Whenever the server does send those crucial updates to the client, the client will
            immediately change the state of the characters (or characters) in question (no
            need for a message queue here). This update can also include the local player, so
            as you’re moving around, some jumps in the action can occur due to the client synchronizing
            to the server.

            Well, enough of the explanations; let’s get on to making an actual network game!

            posted on 2007-12-18 18:52 lovedday 閱讀(140) 評論(0)  編輯 收藏 引用

            公告

            導航

            統計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            88久久精品无码一区二区毛片 | 久久精品亚洲精品国产欧美| 九九99精品久久久久久| 久久免费视频观看| 久久中文精品无码中文字幕| 久久久久精品国产亚洲AV无码 | 国产精品成人99久久久久91gav| 精品99久久aaa一级毛片| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 亚洲AV无码成人网站久久精品大| 久久亚洲精品无码AV红樱桃| 久久精品国产黑森林| 久久w5ww成w人免费| 欧美日韩久久中文字幕| 久久福利青草精品资源站| 国产色综合久久无码有码| 久久久久18| 国产99久久久国产精品~~牛 | 性做久久久久久免费观看| 久久狠狠高潮亚洲精品| 伊人久久综合无码成人网| 久久精品国产第一区二区| 91秦先生久久久久久久| AV狠狠色丁香婷婷综合久久| 国产成年无码久久久免费| 午夜精品久久影院蜜桃| 91秦先生久久久久久久| 亚洲综合精品香蕉久久网97| 久久99精品久久只有精品| 久久久久亚洲Av无码专| 国产精品女同久久久久电影院| 久久成人国产精品免费软件| 久久人人爽人人爽人人av东京热| 久久午夜福利电影| 欧美粉嫩小泬久久久久久久| 日本精品久久久久久久久免费| 日本精品一区二区久久久| 久久只这里是精品66| 亚洲中文久久精品无码ww16| 久久婷婷五月综合97色一本一本| 久久水蜜桃亚洲av无码精品麻豆 |