Games104 Introduction to Modern Game Engines-lecture19 Advanced Architecture of Online Games
1 Three major structures
Unity leans in this direction
Architecture used by Unreal Engine:
course structure:
2 Character movement repication
Synchronization of character displacement
1 interpolation
Interpolation and Extrapolation
Extrapolation: the essence is prediction,
1 interpolated value
Get the status from the server into the buffer,
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
2 extrapolation
How to predict the next step;
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.
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:
A lot of FPS is anti-physics, otherwise very abrupt.
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.
3 Hit registration
How to hit someone. Hit determination in online games is a difficult problem
1 The question is as follows:
There is currently no perfect solution.
There is no formal solution to hitting someone else.
2 is up to the client to decide
very human feeling
The server will do a verification:
In fact, some anti-cheating methods will be implemented locally,
but it is very unsafe and requires a lot of special processing.
3 to be determined by the server
The most basic question:
Solution: Latency Compensation
I set the clock back on my side, compensating based on algorithmic guesses,
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.
Bunker: Although you dodge, you are still killed.
Those who hide in the bunker and those who rush out have an advantage. There are different advantages and disadvantages.
Other methods:
Can help players buy some time.
Local plus special effects,
4 MMOG NETWork Architecture
Earliest online games:
1 subsystem
2 MMO architecture
1 Link layer
hall:
2 Trading System
3 social system
4 matchmaking system
5 Data storage system
Relational databases
Non-relational databases are faster
In-memory databases:
more and more used,
3 Distributed
1 Challenges
For code security, robustness requirements are high.
2 load balancing
3 Consistent hash algorithm to solve distributed problems
delete a server
When there are few servers, you need to use the following method:
4 Service Management
is a very important thing
5 Bandwidth Optimization
Bandwidth is very important to reduce operating costs
1 Computational Bandwidth
2 Data Compression
Change floating-point numbers to fixed-point numbers: the actual combat effect is very good.
3 Object correlation
1 static zones
2 AOI
A very broad concept, online games must be done to reduce the bandwidth, saving the computing power of the server!
1 Direct Range-Query
2 Grid
3 cross list method
4 PVS
4 Lower the frequency
6 anti-Cheat
1 check the memory
2 packers
It was breached by others,
memory confusion,
3 Modify local resources
Change the material of the enemy to be transparent or something.
The hash value of the local resource
4 Interception of network packets
Network packets must be encrypted.
1 encryption
Symmetric and asymmetric encryption!
2 software packages
scan memory
5 AI cheat
It's hard to prevent!
Data statistics system to identify.
7 Build a scalable world
Build an open world!
1 zoning
2 copies
3 two to combine
8 videos
Down: