Group 2
B07901028 黃靖傑
B07901122 王譽凱
B07901133 顏子鈞
ICN Final Project
Outline
Game server
- IP address
- port
request4
request1
request3
request2
ID 1, time = 5 min
ID 2, time = 4:50
ID 3, time = 4:45
ID 4, time = 3:00
Server’s job
In game action
In game action
In game action
In game action
Game information
Game information
Game information
Game information
UDP
TCP
Data that can’t tolerate latency: UDP
Data that can tolerate latency: TCP
Game Client
TCP/UDP
Press B to bomb people -->
application received input 🡪
encode packet --->
send to server
Server send all game logic
CHANGED in the previous frame
�player’s self logic & other player’s logic
when we handling such utility, separate into 2 script:
- 1 for handling self’s input to change scene
- 1 for handling other player’s input to change scene
with this, we can resolve conflict of our gameplay, as:
- when game application receive input from player, change scene
- when game application receive packet from server, change scene
*won’t render bomb twice at a same time.
We preserved all IN GAME utility in our multiplayer mode of Launch the Rocket (that TA has done!) �
Improve Gameplay logic by our own consideration
(for balance gameplay)
Network optimization
SENSITIVE to time.
Example: Game Timer
- Server will broadcast the explosion timer of bomb as
(2-0.1/2) = 1.95s to all player.
Network optimization (Cont’)
2. game object Interpolation
Network traffic busy -> PACKET LOSS!
Example:
Actual player position: (0,0,0) -> (2,0,0) -> (4,0,0) -> (4,2,0) -> (4,4,0)
Likely scenario when packet loss occur:
Other player received: (0,0,0) -> x -> x -> (4,2,0) -> (4,4,0)
Teleport?
Network optimization (Cont’)
2. Game object Interpolation
Next position = 0.7*(previous position) + 0.3*(actual position)
(0,0,0) -> (0,0,0) -> (0,0,0) -> (1.2, 0.6,0) -> (2.04, 1.62,0) -> (2.628, 2.334,0)
-> ….. -> (4,4,0)
What we can achieve: smoother display (less lagging)
*more frame will be produced*
Network optimization (Cont’)
3. Tune our packet transfer rate
30 packet/s 🡪 20 packet/s 🡪 15 packet/s
Conclusion
Work distribution
靖傑 | 譽凱 | 子鈞 |
Game server implement | Game server modify | Report |
處理各種game logic / display游戲畫面 / unity platform的設置(modify prefab component等等) | ||
Network optimization for providing better QoS | ||
各種bug tracking, 我們都會互相溝通和討論 | ||
�----------------Demo Phase----------------�Thanks for your attention!
For Mac users
if there’s problem when opening the game: