Week 4-5 Game Architecture.pdf

Full Transcript

Elective IV Game Networking ENGINEERING MULTIPLAYER INTERNET GAMES Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games , Basic Internet Architecture Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Augmented Reality...

Elective IV Game Networking ENGINEERING MULTIPLAYER INTERNET GAMES Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games , Basic Internet Architecture Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Augmented Reality With Augmented Reality (AR), the users can still interact with the local, physical environment but artificial, computer-generated objects and attributes are used to enhance the local reality. As an example that augments reality even more, consider the original Pacman game that featured the well-known, cookie-shaped disk that game players manoeuvred through maze munching dots. An AR version of the game called Human Pacman depicted in Figure 3.22 [CFG+03] has game players assume the role of the gobbling disk where the physical world is augmented with virtual dots the players see by means of a wearable computer with a head-mounted display. Sensors on the display indicate the direction the player is looking and the GPS provides positional information to generate virtual dots at the appropriate physical locations Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Multiplayer aspects are incorporated by having some players assume the role of the ghosts that chase Pacman. Bluetooth technology provides networking to enable the Pacman player to ‘pickup’ power pills to then chase the ghosts. Human Pacman goes beyond basic Pacman gameplay of one yellow disc against all the ghosts by enabling an additional player to see an overview of the game field on a networked computer, then relaying information about the location of ghosts and power pills to the human Pacman (Figure 3.23). Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco AR provides a means of combining computer gameplay, physical exercise and social interaction. Beyond entertainment, more serious uses include the potential for military or disaster response training, allowing physical training exercises with computer augmenting physical reality with virtual conflicts. Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Basic Internet Architecture. Many design decisions and end-user experiences of multiplayer, networked games derive from the particular nature and characteristics of Internet Protocol (IP) networks. Figure 4.1 attempts to illustrate how end-user applications (such as our favourite networked games) and support services (such as DNS or DHCP, which are rarely exposed to the end user) are layered on top of the basic data transport services provided by an IP network. The Internet Protocol is so named because it hides the many underlying technologies that can make up an IP network (such as optical fibre link Figure 4.1 attempts to illustrate how end-user applications (such as our favourite networked games) and support services (such as DNS or DHCP, which are rarely exposed to the end user) are layered on top of the basic data transport services provided by an IP network. The Internet Protocol is so named because it hides the many underlying technologies that can make up an IP network (such as optical fibre link Internet Architecture Games Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco IP Networks as seen from the Edge IP networks provide few guarantees of timeliness or certainty in packet delivery – usually referred to as best effort service (although it might be more aptly considered a ‘no guarantees’ services). Milliseconds, hundreds of milliseconds, or seconds may elapse between the time a source injects (transmits) a packet into the network cloud, and the destination edge receives that same packet. Sometimes packets simply get lost inside the network and never arrive at all The time it takes for a packet to reach its destination is often referred to as latency. Short-term variation in this latency from one packet to the next is referred to as jitter. Packet loss is often described in terms of a packet loss rate – the probability of an IP packet being lost across a certain part of the IP network. Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Endpoints and Addressing IPv4 endpoints are identified with numerical 32-bit (4 byte) values, conventionally written in dotted- quad form – four decimal numbers (representing each of the four bytes making up the IP address) separated by periods. For example, the 32-bit binary address 1000 0000 0101 0000 1100 0101 0000 0111 is written as 128.80.195.7 in dotted-quad form. In theory, this allows for 232 IPv4 addresses. Later in this chapter we will discuss why significantly fewer than 232 IPv4 addresses are available in practice. Endpoints are also often referred to as hosts, although a host (whether a Personal Computer (PC), game console with network port, or any device capable of attaching to a IP network) may have multiple interfaces to an IP network. A host with multiple interfaces (commonly referred to as a multihomed host) will have unique IP addresses on each of its interfaces to the IP network. Servers (e.g. web sites or game servers) and clients (e.g. someone running a browser on their home computer) are both hosts on the IP network Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Transmission Control Protocol (TCP) Early Internet applications – such as email, file transfer protocols and remote console login services – were sensitive to packet loss but relatively insensitive to timeliness (everything sent had to be received, but delays from tens of milliseconds to a few seconds were tolerable). The common end-to-end transport requirements of such applications (reliable ordered transfer of bytes from one endpoint to another) motivated development of TCP. TCP sits immediately above the IP layer within a host (see Figure 4.3), and creates bidirectional paths (sometimes referred to as TCP connections or TCP sessions) between endpoints. An application’s outbound data is broken up and transmitted inside TCP frames, which are themselves carried inside IP packets across the network to the destination Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco User Datagram Protocol (UDP) UDP is a much simpler sibling of TCP, providing a connectionless, unreliable, datagramoriented transport service for applications that do not require or desire the overhead of TCP’s service. UDP imposes no flow control on packet transmission, and no packet loss detection or recovery. It is essentially a multiplexing layer sitting directly on top of IP’s best effort service. As such an application using UDP will directly experience the latency, jitter and loss characteristics of the underlying IP network Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Multiplexing and Flows Extending the postal service analogy a little further, while the IP address is analogous to a street address both TCP and UDP add the notion of ports – additional identification analogous to an apartment number or hotel room number. Each TCP or UDP frame carries two 16 bit port numbers to identify the source and destination of their frame within the context of a particular source or destination IP host. This allows multiplexing of different traffic streams between different applications residing on the same source and destination IP endpoints Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Unicast, Broadcast and Multicast Sending a packet to a single destination is known as unicast transmission. Sending a packet to all destinations (within some specified region of the network) is known as broadcast transmission. Broadcasting may be implemented as multiple separate unicast transmissions, but this requires the source to actually know the IP addresses of all intended destinations. Usually the network supports broadcast natively – the source sends a single packet into the network with a specific ‘broadcast’ destination address, and the network itself replicates the packet to all attached hosts within a restricted region. Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco A little-used alternative is IP multicast [RFC1112]. A source transmits one packet and the network itself delivers identical copies to multiple destinations (known as a multicast group, identified by special ‘class D’ IP destination addresses). Hosts explicitly inform the network when they wish to join or leave multicast groups. (Broadcast can be considered a special case of multicast, where every endpoint within a specific region of the network is automatically considered to be a group member.) Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco Connectivity and Routing From the game developer’s perspective, it is often not necessary to understand the internal structure of IP networks. It is usually sufficient to comprehend the network’s behaviour 48 Networking and Online Games: Understanding and Engineering Multiplayer Internet Games as seen from the edges. However, it is valuable to reflect on the internal details if you wish to more fully understand the origins of IP addressing schemes, latency, jitter, and packet loss. An IP network is basically an arbitrary topology of interconnected links and routers. These terms are often thrown around casually, so we will define them here as follows: Links provide packet transport between routers. Routers are nodes in the topology, where packets may be forwarded from one link to another Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco https://www.youtube.com/watch?v=77vYKsXC4IE Engineering Multiplayer Internet Games Prepared by : Ms. Roselle R. Bengco

Use Quizgecko on...
Browser
Browser