52 lines
810 B
Markdown
52 lines
810 B
Markdown
# Perfect World Port Architecture
|
|
|
|
## Overview
|
|
|
|
Project này port client Perfect World từ C++ sang Unity C# và xây dựng server mới bằng .NET.
|
|
|
|
Architecture gồm 3 layer chính:
|
|
|
|
Client Layer
|
|
Unity project chịu trách nhiệm:
|
|
|
|
- UI
|
|
- rendering
|
|
- input
|
|
- local gameplay logic
|
|
- network client
|
|
|
|
Server Layer
|
|
|
|
.NET 8 server sử dụng LiteNetLib.
|
|
|
|
Server chịu trách nhiệm:
|
|
|
|
- authoritative game state
|
|
- player session
|
|
- snapshot replication
|
|
- chat routing
|
|
|
|
Shared Layer
|
|
|
|
Game.Shared chứa:
|
|
|
|
- protocol definitions
|
|
- shared data types
|
|
- serialization logic
|
|
|
|
## Architecture Diagram
|
|
|
|
Unity Client
|
|
↓
|
|
Game.Shared (protocol)
|
|
↓
|
|
LiteNetLib transport
|
|
↓
|
|
Game.Server
|
|
|
|
## Main Goals
|
|
|
|
- giữ gameplay logic từ Perfect World
|
|
- thay engine bằng Unity
|
|
- thay network stack
|
|
- modernize architecture |