• <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 閱讀(137) 評論(0)  編輯 收藏 引用

            公告

            導航

            統(tǒng)計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            色综合久久中文色婷婷| 亚洲国产二区三区久久| 久久无码AV中文出轨人妻| 久久这里只精品99re66| 香蕉久久夜色精品升级完成| 久久AV高清无码| 九九久久精品国产| 国内高清久久久久久| 91精品国产高清91久久久久久 | 国产精品免费看久久久| 中文字幕久久欲求不满| 久久99亚洲综合精品首页| 无码人妻精品一区二区三区久久 | 久久精品视频网| 久久人人超碰精品CAOPOREN| 久久精品中文字幕一区| 久久国产一片免费观看| 久久综合噜噜激激的五月天| 久久精品国产一区二区三区不卡| 波多野结衣AV无码久久一区| 精品久久久久久国产三级| 久久永久免费人妻精品下载| 蜜桃麻豆www久久国产精品| 久久国产高清字幕中文| 亚洲精品美女久久久久99| 国内精品久久久久久久影视麻豆 | 久久久无码精品亚洲日韩蜜臀浪潮| 国产午夜精品久久久久九九| 97久久久精品综合88久久| 欧美日韩精品久久久久| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 精品熟女少妇AV免费久久| 99精品久久久久久久婷婷| 久久人人超碰精品CAOPOREN| 热re99久久精品国产99热| av无码久久久久不卡免费网站 | 久久久国产99久久国产一| 久久高潮一级毛片免费| 国产精品久久久久久久午夜片| 狠狠色婷婷久久一区二区三区| 亚洲中文字幕久久精品无码APP|