• <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>

            天行健 君子當(dāng)自強(qiáng)而不息

            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) 評(píng)論(0)  編輯 收藏 引用


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關(guān)鏈接

            搜索

            最新評(píng)論

            中文字幕久久亚洲一区| 久久er99热精品一区二区| 久久精品国产亚洲AV不卡| 久久综合色老色| 91亚洲国产成人久久精品| 久久婷婷色香五月综合激情| 97精品久久天干天天天按摩| 久久夜色精品国产亚洲av| 精品国产一区二区三区久久久狼| 亚洲国产成人久久精品动漫| 久久久久国产精品嫩草影院| 国产福利电影一区二区三区久久老子无码午夜伦不 | 波多野结衣中文字幕久久| 精品久久久久久无码中文野结衣 | 久久九九久精品国产免费直播| 精品国产91久久久久久久| 中文字幕精品无码久久久久久3D日动漫| 国产精品久久久久久久久免费| 久久久久亚洲av综合波多野结衣| 99久久精品这里只有精品| 久久精品国产亚洲AV高清热 | 欧美午夜精品久久久久久浪潮| 久久99精品国产麻豆宅宅 | 久久伊人亚洲AV无码网站| 亚洲国产精品久久久久婷婷老年| 久久精品国产亚洲AV无码娇色 | 久久精品国产一区| 99精品国产在热久久无毒不卡| 综合久久国产九一剧情麻豆| 亚洲精品国产第一综合99久久| 日本精品一区二区久久久| 久久久久久亚洲精品不卡| 国产日韩欧美久久| 久久久久亚洲精品中文字幕| 久久99亚洲综合精品首页| 久久精品成人| 久久久久久国产a免费观看黄色大片| 一本大道久久东京热无码AV| 2021最新久久久视精品爱| 精品久久久无码人妻中文字幕| 性做久久久久久久|