Games104 Introduction to Modern Game Engines-lecture19 Advanced Architecture of Online Games

1 Three major structures

Unity leans in this direction

insert image description here
Architecture used by Unreal Engine:
insert image description here
insert image description here

course structure:
insert image description here

2 Character movement repication

Synchronization of character displacement

insert image description here

1 interpolation

Interpolation and Extrapolation

insert image description here
Extrapolation: the essence is prediction,

1 interpolated value

insert image description here

insert image description here
Get the status from the server into the buffer,
insert image description here
insert image description here
the problem of interpolation: the two clients are different, there is a 250ms difference between the
red car and the collision, and the gray car does not feel that there is such a problem
insert image description here

2 extrapolation

insert image description here

How to predict the next step;
insert image description here
PVB algorithm is a simple interpolation, you will see a blue curve has been chasing the green line, the green line is the real position, look at the coincidence of the two curves, there are many Small tracker, very interesting, can solve some boundary conditions.
insert image description here
insert image description here
insert image description hereinsert image description here

insert image description here
insert image description here

insert image description here
It is possible that the opponent's game uses an interpolation method, and the physics system gives a great rebound force.

Solve it by the following methods:

insert image description here

A lot of FPS is anti-physics, otherwise very abrupt.
insert image description here

insert image description here

Sometimes interpolation is used, and sometimes extrapolation is used.
Every method is a good method, and it is a good method that can solve the problem.
insert image description here

3 Hit registration

How to hit someone. Hit determination in online games is a difficult problem
insert image description here

1 The question is as follows:

There is currently no perfect solution.
insert image description here
insert image description here
There is no formal solution to hitting someone else.
insert image description here

2 is up to the client to decide

very human feeling
insert image description here

insert image description here
The server will do a verification:
insert image description here

insert image description here
In fact, some anti-cheating methods will be implemented locally,
but it is very unsafe and requires a lot of special processing.

insert image description here

3 to be determined by the server

The most basic question:
insert image description here

Solution: Latency Compensation

I set the clock back on my side, compensating based on algorithmic guesses,
insert image description here

When the server receives the shooting time, it is already far away.
Subtract a series of those times from the current time, and then it will be fine. If the network is stable.

insert image description here
Bunker: Although you dodge, you are still killed.
insert image description here

Those who hide in the bunker and those who rush out have an advantage. There are different advantages and disadvantages.
insert image description here

Other methods:
Can help players buy some time.
insert image description here
Local plus special effects,
insert image description here

4 MMOG NETWork Architecture

insert image description here
Earliest online games:
insert image description here
insert image description here

1 subsystem

insert image description here

2 MMO architecture

insert image description here

1 Link layer

insert image description here
hall:
insert image description here
insert image description here

2 Trading System

insert image description here

3 social system

insert image description here

4 matchmaking system

insert image description here

5 Data storage system

insert image description here

Relational databases
insert image description here
Non-relational databases are faster
insert image description here
In-memory databases:
more and more used,

insert image description here

3 Distributed

insert image description here
insert image description here

1 Challenges

For code security, robustness requirements are high.
insert image description here

2 load balancing

insert image description here

3 Consistent hash algorithm to solve distributed problems

insert image description here
insert image description here
delete a server
insert image description here

When there are few servers, you need to use the following method:
insert image description here

4 Service Management

is a very important thing

insert image description hereinsert image description here
insert image description here

5 Bandwidth Optimization

Bandwidth is very important to reduce operating costs
insert image description here

1 Computational Bandwidth

insert image description here

2 Data Compression

Change floating-point numbers to fixed-point numbers: the actual combat effect is very good.
insert image description here
insert image description here

3 Object correlation

insert image description here

1 static zones

insert image description here

2 AOI

A very broad concept, online games must be done to reduce the bandwidth, saving the computing power of the server!
insert image description here

1 Direct Range-Query

insert image description here

2 Grid

insert image description here
insert image description here
insert image description here

3 cross list method

insert image description here
insert image description here
insert image description here

insert image description here

4 PVS

insert image description here

4 Lower the frequency

insert image description here

6 anti-Cheat

insert image description here
insert image description here

1 check the memory

insert image description here

2 packers

It was breached by others,
memory confusion,
insert image description here
insert image description here

3 Modify local resources

Change the material of the enemy to be transparent or something.
The hash value of the local resource
insert image description here

4 Interception of network packets

Network packets must be encrypted.
insert image description here

1 encryption

Symmetric and asymmetric encryption!

insert image description here
insert image description here

2 software packages

insert image description here

insert image description here
scan memory

5 AI cheat

It's hard to prevent!
insert image description here
insert image description here
Data statistics system to identify.
insert image description here
insert image description here

7 Build a scalable world

Build an open world!

insert image description here

1 zoning

insert image description here
insert image description here
insert image description here
insert image description here

2 copies

insert image description here

3 two to combine

insert image description here

8 videos

Up:
https://www.bilibili.com/video/BV13B4y1L7bZ/?spm_id_from=333.788&vd_source=5c9c50b5a07b211beafdf65d7cc7f8c8

Down:

https://www.bilibili.com/video/BV1RG411t7TP/?spm_id_from=333.788&vd_source=5c9c50b5a07b211beafdf65d7cc7f8c8

Guess you like

Origin blog.csdn.net/qq_41286360/article/details/127253734