• <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游戲編程相關鏈接

            搜索

            最新評論

            欧美日韩久久中文字幕| 久久久人妻精品无码一区| 久久免费的精品国产V∧| 麻豆AV一区二区三区久久| 国产午夜电影久久| 久久九九久精品国产免费直播| 久久人人爽人人人人爽AV| 久久久久香蕉视频| A级毛片无码久久精品免费| 97精品伊人久久大香线蕉| 久久Av无码精品人妻系列 | 无码任你躁久久久久久老妇App| 97香蕉久久夜色精品国产| 久久777国产线看观看精品| 亚洲熟妇无码另类久久久| AA级片免费看视频久久| 欧美熟妇另类久久久久久不卡| 国产精品美女久久久久AV福利| 亚洲国产精品久久久天堂| 亚洲中文精品久久久久久不卡| 97久久精品国产精品青草| 久久美女人爽女人爽| 欧美精品一本久久男人的天堂| 国产精品久久久久蜜芽| 国产真实乱对白精彩久久| 国产精品久久久久久一区二区三区| 久久久久亚洲AV成人网人人网站| 久久男人中文字幕资源站| 91超碰碰碰碰久久久久久综合| 国产精品成人无码久久久久久 | 亚洲国产成人久久综合一区77| 九九热久久免费视频| 久久精品国产福利国产秒| 精品久久久久久成人AV| 午夜久久久久久禁播电影| 香蕉久久av一区二区三区| 99精品久久精品一区二区| 婷婷五月深深久久精品| 久久婷婷五月综合色高清| 日产精品久久久久久久性色| 亚洲AV乱码久久精品蜜桃|