Professional Documents
Culture Documents
a
Content Table
1st Section: Overview(P1)
Base knowledge of Network Games Design ------ P1
Conclusion(P11)
References(P13)
b
1. Overview
1.1 Base knowledge of Network Based Games Design
In Network Game design, there are two important tools to make Games and
Network connected and collaborating rightly: Architecture and Protocol.
Since architecture is an integrated concept, it contains Topology, Technologies,
Services, Protocols and so on, we will introduce several components of Architecture
first. Further, because there are several network architectures used in Network Games
designing process, and Client-server architecture is a common and effective way to
design network-based games, we will emphasis on Client -server architecture.
Within the architecture, Server is responsible for client synchronization. We will
introduce how it works.
As for protocols, rules for communication between senders and receivers, they play
a core role in collaborating communicators. We will show you some frequently used
protocol types and how they work.
2.Detailed Introduction
2.1 Introduction of Network Architecture
Network architecture refers to the design and structure of a computer network. It
includes the hardware, software, protocols, and technologies used to connect and
communicate between devices on the network. A well-designed network architecture
1
enables efficient data transfer, improved network security, and easy maintenance and
management of the network.
We can assume Architecture as a model which has the functionality of coordinating
the communication between devices.
Introduction
Client-server architecture: Most network-based games use a client-server
architecture, where the game is hosted on a server and players connect to it. The
server is responsible for managing the game state, enforcing the game rules, and
handling player interactions. The clients, on the other hand, are responsible for
rendering the game graphics, playing sounds, and sending player inputs to the server.
Mechanism
In a client-server architecture, players connect to the game server using a client
program, which communicates with the server using the networking protocols. The
server stores the game state, which includes information about the location, status,
and actions of all the players in the game. When a player performs an action, such as
moving their character or attacking an opponent, the client sends this information to
the server, which updates the game state accordingly. The server then sends updates to
all the connected clients, which render the changes on the player's screens.
Introduction
Network protocols are a set of rules and procedures that govern the way data is
3
transmitted and received over a network. They provide a standardized way for
different devices and systems to communicate with each other, regardless of their
hardware or software differences. Network protocols are used to establish and
maintain network connections, control the flow of data, and manage errors that may
occur during data transmission.
TCP
Introduction
Some common network protocols include: Transmission Control
Protocol/Internet Protocol (TCP/IP): TCP/IP is the most widely used network
protocol suite for communicating over the internet. It provides reliable, connection-
oriented communication between devices and is used for transmitting data that
requires accuracy, such as emails, web pages, and file transfers.
Internet Protocol (IP): IP is the protocol responsible for addressing and routing
data packets over the internet. It ensures that data packets are sent to the correct
destination.
Mechanism
The main task of TCP is to collect data from the application layer. It splits the data
into packets(segment), assigns each packet a number, and sends the packets to their
destination.
Likewise, it reassembles packets before sending them to the application layer. Since
TCP is a connection-oriented protocol, this connection will be maintained until the
sender and receiver complete the data exchange.
Head
The length of the TCP header must be at least 20 bytes and no more than 60 bytes.
[5]
4
From here, we see ACK (Acknowledgement Number). It is sent by receivers, once the
sender receives ACK, it continues sending next segment.
UDP
Introduction
In UDP, the receiver does not generate an acknowledgment of a packet, nor does
the sender wait for an acknowledgment of a packet.
UDP does not guarantee ordered delivery of packets. It is stateless and does not
provide any congestion control mechanism.
Head
[5]
Source Port is optional in the IP protocol, this part can be ignored if no reply is
required.
[6]
As for Checksum, it is used for error detection.
Using UDP
Games are switching to UDP for improved packet transmission timeliness,
especially in weak networks. Reliable-UDP is commonly implemented, combining
reliable and unreliable UDP for different types of data.
Buffering Mechanism
In online games, buffering is used to address input jitter caused by network
7
instability. It involves caching frames of data to provide stable input to the game
logic. Balancing buffer size and latency is crucial for a smooth gaming experience.
After the button is pressed, the client immediately plays the forward shake
animation, but waits until the server process ends before notifying the client to fly
out the grenade. It is equivalent to lengthening the front shake on the client side.
Doing so solves the above problems and provides a good user experience:
Players get immediate feedback after pressing a button, so the operating
experience is very good.
The generation of grenades complies with the authority of the server and
prevents strange performances caused by interruptions.
Although there is a delay in the flying of the grenade, the arm at the end of the
animation occupies most of the screen, and the player can barely perceive this delay.
Even if players notice this delay, it won't have much impact.[8]
Solutions
Riot Games, the developer of League of Legends, actively combats scripting by
implementing advanced detection systems and regularly updating their anti-cheat
measures. Players caught using scripts face severe consequences, including permanent
bans from the game.
It is important for players to uphold the spirit of fair play and competitive integrity in
League of Legends, fostering a positive and enjoyable gaming environment for all
participants.
Cheating in CSGO
Cheating in Counter-Strike: Global Offensive (CS:GO) is a prevalent issue that
undermines the competitive integrity of the game. Cheaters employ various methods,
such as aimbots, wallhacks, and recoil scripts, to gain an unfair advantage over
legitimate players.
Aimbots are software programs that automatically aim and shoot at opponents
with incredible accuracy, eliminating the need for skill and precision. Wallhacks
enable cheaters to see through walls, revealing the positions of enemies and providing
an unfair informational advantage. Recoil scripts control weapon recoil, ensuring
perfect spray patterns and reducing the difficulty of controlling weapons.
9
By using these cheats, players can dominate matches, win engagements
effortlessly, and disrupt the balance of fair competition. This not only ruins the
experience for honest players but also damages the credibility of the competitive
CS:GO scene.
Solutions
To combat cheating, Valve, the developer of CS:GO, has implemented anti-cheat
measures like VAC (Valve Anti-Cheat) and Overwatch, a community-driven system
that allows players to review and report suspicious behavior. Valve continuously
updates and improves these systems to detect and ban cheaters, striving to maintain
the integrity of the game.
Cheating in CS:GO is a violation of the game's terms of service and can result in
severe penalties, including permanent bans from online play. It is crucial for players
to uphold fair play, maintain a level playing field, and ensure the integrity of
competitive matches.
By reporting suspected cheaters and actively supporting anti-cheat efforts, the
CS:GO community can work together to create a fair and enjoyable gaming
environment for everyone involved.
Cheating in any game will greatly reduce the game experience of other players,
so both game companies and players are vigorously resisting cheating.
Smart design
Truly effective anti-cheat starts at the first line of game code. Assume your clients
cannot be trusted and design games with authoritative servers. Restrict clients to
receiving only the data they absolutely need. This is the most effective first step to
limit cheating.
Patch prevention
10
Use tools that encrypt and secure critical variables to enable gameplay elements to
resist in-memory attacks. Tools that perform integrity verification of game files can
prevent cheaters from offline tampering with game logic, data, or assets.
Communication protection
To prevent man-in-the-middle attacks and manipulation of player data,
absolutely use data encryption. In this way, you protect client-server communication
protocols.
Process isolation
Use Anti-Hooking, Anti-Debug and process handle hiding techniques to make it
harder for cheats to access the running game process.
Analyze behavior
Statistical analysis of player behavior can identify many cheat techniques such as
scripts, aim bots and trigger bots.
Conclusion
In summary, network-based games present their own set of challenges that need
to be addressed. The characteristics of different types of servers, such as state
synchronization server and the frame synchronization server, offer distinct advantages
and disadvantages. state synchronization servers offer precise consistency and
centralized game logic execution at the cost of high server resource consumption and
11
management pressure. Frame synchronization servers reduce resource consumption
but sacrifice some consistency and centralized control. Each server type has its
advantages and disadvantages, and the choice depends on the specific requirements
and constraints of the game.
When it comes to network protocols, selecting the appropriate one is crucial.
TCP ensures reliable data delivery, but it introduces higher latency, which may not be
ideal for real-time gaming. On the other hand, UDP offers lower latency but lacks
reliability, potentially leading to data loss or out-of-order packets. The choice of
protocol depends on the specific requirements of the game and the desired balance
between reliability and latency.
In network-based games, several common problems exist. These can include
latency issues and cheating in some online games. To address these challenges,
developers can implement various solutions. For latency, addressing latency and lag
in online games involves building a private network, using UDP for faster packet
transmission, implementing buffering mechanisms, hiding lag through client-side
animations, and optimizing gameplay experience. These strategies help minimize the
impact of latency and lag, enhancing the overall gaming experience for players. The
fight against cheating in games involves implementing advanced detection systems,
regularly updating anti-cheat measures, imposing severe consequences on cheaters,
encouraging community reporting, utilizing community-driven systems, and
continuously improving anti-cheat methods. By combining these approaches, game
developers and players can strive for fair play, maintain competitive integrity, and
create enjoyable gaming environments.
In conclusion, when developing network-based games, understanding the
characteristics of different server types, evaluating the pros and cons of network
protocols, and implementing appropriate solutions to address common problems are
vital for creating a smooth and secure gaming experience.
12
References
[1] Chen Daxia. "Zhihu Question: Why do network latency and network jitter become
issues?" Zhihu. Available at: https://www.zhihu.com/question/23508968 . Accessed:
Date 20.06.2023.
[2] Yun Ying. "Zhihu Column Article: Technical issues in network game development
related to network latency." Zhihu Column. Available at:
https://zhuanlan.zhihu.com/p/36884005 . Accessed: Date 20.06.2023.
[3] Luo Jiao. "CSDN Blog Post: The relationship between network latency and
bandwidth." CSDN Blog. Available at 20.06.2023:
https://blog.csdn.net/luojiaoqq/article/details/12949783 . Accessed: Date 20.06.2023.
[4]DannyIdea. "Juejin Article: The impact of latency and network jitter on online
gaming." Juejin. Available at: https://juejin.cn/post/7070871301807669278 .
Accessed: Date 20.06.2023.
[5]Sean Bei. "FreeCodeCamp Article: TCP vs. UDP - Which is faster?"
FreeCodeCamp. Available at: https://www.freecodecamp.org/chinese/news/tcp-vs-
udp-which-is-faster/ . Accessed: Date 20.06.2023.
[6]SAVVY SECURITY. "Blog Post: How UDP works - A look at the User Datagram
Protocol in computer networks." Cheap SSL Security. Available at: 20.06.2023.
https://cheapsslsecurity.com/blog/how-udp-works-a-look-at-the-user-datagram-
protocol-in-computer-networks/ . Accessed: Date 20.06.2023.
[7] Mei Xintong Zha, Ying Zhang. "Paper: Title of the Paper." Available at: chrome-
extension://efaidnbmnnnibpcajpcglclefindmkaj/https://core.ac.uk/download/pdf/2130
02493.pdf . Accessed: Date 20.06.2023.
[8] waltercao. "News Article: Title of the News." Toutiao. Available at:
https://urlzs.com/w68Mw .Accessed: Date 20.06.2023.
[9] Reinhard Blaukovitsch. "Blog Post: Cheating in games - Everything you always
wanted to know about it." Irdeto Blog. Available at: https://blog.irdeto.com/video-
gaming/cheating-in-games-everything-you-always-wanted-to-know-about-it/
Accessed: Date 20.06.2023.
13