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

            Getting Online with Multiplayer Gaming(19)      摘要: Whereas the local player’s input is processed in the cApp::frame function, the
            update_players (which you saw in the code in the previous section) processes the
            players according to their respective states.  
             
            Getting Online with Multiplayer Gaming(18)      摘要: Between updates from the server, the clients need to update all players to keep the
            game running smoothly. The client application limits updates to every 33ms (30 times
            a second), which matches the server update rate. Between these player updates, the
            client is allowed to collect input from the player who is used to change their actions. 
             
            Getting Online with Multiplayer Gaming(17)      摘要: The client application uses the same message structures as the server, but the client
            has no need for queuing messages. As Figure 19.16 demonstrates, incoming messages
            are immediately parsed by the client.  
             
            Getting Online with Multiplayer Gaming(16)      摘要: To use a client component, you have to derive a class from it and, in that derived
            class, override the necessary functions. Those functions are few and are needed
            only to convey when a connection to the server is achieved or to receive incoming
            game messages. 
             
            Getting Online with Multiplayer Gaming(15)      摘要: The client application (referred to as the client) is the conduit between the gaming
            server and the player. The client accepts the user’s input and forwards it to the server.
            Between updates from the server, the client updates itself based on what little information
            it has—the player’s movement, other players’ movements, NPC actions, and so on.  
             
            Getting Online with Multiplayer Gaming(14)      摘要: In order to synchronize itself with clients, the server needs to maintain a simplified
            version of the game running internally. This version of the game doesn’t include
            graphics, sound, or any other fancy features; it only needs to track player’s actions. 
             
            Getting Online with Multiplayer Gaming(13)      摘要: Just as players join the game, so do players quit, and that’s the purpose of the
            remove_player function. In the remove_player function, the server will scan the list of
            connected players for a match of a DirectPlay identification number (from the disconnecting
            player) and remove that player from the list. After the scan is complete
            and the appropriate player is removed from the list, all clients are notified of the
            disconnecting player, and the server rebuilds a list of exist  
             
            Getting Online with Multiplayer Gaming(12)      摘要: Now that the game messages have made their way into the message queue, the next
            step is to remove the messages at each frame and process them. To keep things
            running quickly, only 64 messages at a time are processed (as defined by the
            MESSAGE_PER_FRAME macro in the server source code).  
             
            Getting Online with Multiplayer Gaming(11)      摘要: The server never deals directly with incoming messages; instead, the server pulls
            messages from the queue. If a message needs to be processed, it must be inserted
            into the queue. Using a queue ensures that the server never gets bogged down with
            processing incoming network data.  
             
            Getting Online with Multiplayer Gaming(10)      摘要: As I’ve mentioned before, the server needs to convert the DirectPlay network messages
            into the game-related messages you’ve just read about. You accomplish this by
            processing incoming player connection, disconnection, and receive data messages from
            DirectPlay and converting those messages into game messages.  
             
            Getting Online with Multiplayer Gaming(9)      摘要: Players in the game are only allowed to move around and swing their weapons (hitting
            other players). The server will want to track every player’s current state (walking,
            standing still, swinging their weapons, or being hurt), the coordinates in the world,
            the direction they are facing, and the speed they are walking (if they are walking).  
             
            Getting Online with Multiplayer Gaming(8)      摘要: You’ve already read about how simple the server can be. To put theory into practice
            (and help you create your multiplayer games), I put together a server application.
            In this section, you discover how to develop the underlying server-network-game
            architecture and create the server application.  
             
             
            Getting Online with Multiplayer Gaming(7)      摘要: 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.  
             
            Getting Online with Multiplayer Gaming(6)      摘要: The game server is a specialized piece of software. It doesn’t need fancy graphics, kicking tunes, or even dedicated input functions. The server merely needs to process the actions received from connected players and, every so often, send updates to the clients.  
             
            Getting Online with Multiplayer Gaming(5)      摘要: A couple of things quickly come to mind when using the type of network communications
            just mentioned. First, because the server is the only system responsible for
            maintaining the game state, all connected clients would have to wait for those periodic
            updates to keep the game flowing.  
             
            Getting Online with Multiplayer Gaming(4)      摘要: When creating your game, if you were to stop mid-stream and try to add multiplayer
            features (features you hadn’t planned on including) chances are you would
            have a hard time making everything work out correctly. Let’s face it—you need to
            be prepared ahead of time, and if your game is going to be multiplayer-compatible,
            you must make sure that you have a solid foundation on which to work. 
             
            Getting Online with Multiplayer Gaming(3)      摘要: The Network Game demonstration program is basic in design. The game has a single large
            level that players are allowed to join and in which they can begin moving and attacking
            each other as they like (although no damage is done and nobody can die). 
             
            Getting Online with Multiplayer Gaming(2)      摘要: Online gaming has given players a whole new way to match up with other human
            players, and as the narrative in the preceding section illustrates, these encounters
            can be fun or a wake-up call to the deftness of other players.  
             
            Getting Online with Multiplayer Gaming(1)      摘要: Although beating down the endless hordes of evil and saving countless worlds is
            interesting enough to rob you of precious sleep, it can get pretty boring after a
            while. No matter how hard we try, game developers just can’t nail down the intrigue
            and challenge of human intelligence that gamers want in virtual opponents.  

            posted on 2007-12-19 17:55 lovedday 閱讀(531) 評(píng)論(0)  編輯 收藏 引用 所屬分類: ■ RPG Program

            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

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

            搜索

            最新評(píng)論

            伊人精品久久久久7777| 精品人妻伦九区久久AAA片69| A级毛片无码久久精品免费| 久久久午夜精品福利内容| 久久精品国产日本波多野结衣 | 久久99国产综合精品免费| 久久久久久久久久久久中文字幕| 久久精品中文无码资源站| 久久精品九九亚洲精品天堂| 午夜精品久久久内射近拍高清| 亚洲αv久久久噜噜噜噜噜| 国产成人精品综合久久久| 99久久99久久精品国产片果冻| 91麻豆精品国产91久久久久久 | 亚洲午夜久久久久妓女影院| 99久久精品午夜一区二区| 中文字幕无码久久人妻| 秋霞久久国产精品电影院| 久久亚洲精品无码aⅴ大香| 久久er国产精品免费观看8| 久久久久亚洲av无码专区喷水| 亚洲国产精品无码久久久久久曰| 久久99国产综合精品女同| 亚洲中文久久精品无码ww16 | 日韩亚洲欧美久久久www综合网| 亚洲精品国产综合久久一线| 91精品国产高清久久久久久91| 国产精品久久久久久五月尺| 久久AAAA片一区二区| av无码久久久久不卡免费网站| 99久久精品国产一区二区 | 精品人妻久久久久久888| 久久久人妻精品无码一区| 国产毛片久久久久久国产毛片| 久久人人妻人人爽人人爽| 中文字幕日本人妻久久久免费| 伊人久久综合精品无码AV专区 | 久久99国产精品久久| 亚洲色大成网站WWW久久九九| 久久人人青草97香蕉| 久久久久久综合网天天|