簡易檢索 / 詳目顯示

研究生: 陳柏劭
Po-Shau Chen
論文名稱: 網路賽車遊戲之車輛位置同步顯示技術
Vehicle Position Synchronization Display Technology for Online Racing Games
指導教授: 金台齡
Tai-Lin Chin
口試委員: 孫士韋
沈上翔
學位類別: 碩士
Master
系所名稱: 電資學院 - 資訊工程系
Department of Computer Science and Information Engineering
論文出版年: 2018
畢業學年度: 106
語文別: 中文
論文頁數: 73
中文關鍵詞: 網路遊戲卡爾曼濾波器支援向量回歸
外文關鍵詞: Kalman Filter, Support Vector Regression
相關次數: 點閱:323下載:7
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 遊戲發展從以前的單機遊戲,到近十年來的線上遊戲,再到近幾年發展更加蓬勃的行動裝置遊戲,無論是電腦遊戲或是遊戲機甚至到行動裝置上的遊戲,往往離不開網路連線的趨勢,從以前的單機到網路連線,主要增加了和其他玩家競爭的競爭感,讓玩家不只是只能跟電腦人工智慧(Artificial Intelligence)對戰,更能夠和真實世界其他玩家競爭。隨著行動網路跟行動裝置的蓬勃發展,可以說是不論玩家在何處,都能和世界各地的玩家對戰。
    由於網路特性,網路傳輸勢必有網路延遲(Latency),雖然網路延遲在大部分網路使用情況下感受並不顯著,但在即時連線的遊戲對戰下,幾毫秒的誤差都可能是影響遊戲的關鍵,賽車競賽的遊戲環境下,由於賽車高速移動的特性,幾毫秒的網路延遲(Latency)影響更是顯著,舉例而言,當玩家一傳送其車輛資料到玩家二的裝置時,同時因為賽車遊戲物件移動速度非常快,玩家一的車輛已遠離傳送時該車的位置,如玩家一在k時刻的位置在0公尺處、速度為300公里/小時,玩家一在k時刻傳送他的位置給玩家二,玩家二在100毫秒後收到該封包,但由於網路延遲的100毫秒,玩家一當下已經跑到了8.3公尺處,發生了傳輸延遲產生的誤差,誤差造成遊戲畫面的不一致,同時由於網路延遲的不固定,收到封包的間隔也是一個不固定的數值,因而導致位置更新間隔的不固定,導致更新玩家物件會產生物件抖動的情況。
    因此在建立網路連線之後為了使遊戲畫面更加順暢及同步,便要加入玩家的行為預測,讓不同的玩家看相互看到其他玩家時能夠更準確地呈現在正確的位置,因為網路延遲不只造成玩家體驗不佳,甚至可能造成遊戲結果不公平的情況,舉例來說,賽車遊戲中,玩家一和玩家二在終點線前幾乎以同樣的速度衝向終點,但由於網路延遲造成封包過了數十毫秒甚至一兩百毫秒後才傳送到對方玩家裝置上,對方玩家才進行位置更新,因此玩家一和玩家二看到對方車輛的位置都是在自己操控的車輛後方,雙方都會認為自己將會贏得比賽,所以造成遊戲結果不公平的情況。
    網路特性下,網路傳輸除了有網路延遲(Latency),同時可能還包含網路封包遺失甚至是網路短時間的斷線,由於這些常見的網路特性,可能造成多人連線遊戲同步時的畫面不同步和抖動情形,遊戲畫面不同步造成玩家體驗較差,同時可此造成遊戲勝負難以判定,畫面抖動更是會造成遊戲體驗差勁,因此我們希望能夠利用軟體來彌補硬體先天的缺陷,希望能夠在遊戲中加入玩家行為預測,來減少因為網路延遲(Latency)和網路斷線所造成不佳的遊戲體驗。第二章將描述以往在進行玩家預測的一些主要方法。第三章將介紹主要利用的演算法:卡爾曼濾波(Kalman Filter),第四章將介紹另一個主要的演算法:支援向量回歸(Support Vector Regression)且同時會說明我們的實作方法。第五章我們有實作傳統的預測方法和我們套入的兩個演算法卡爾曼濾波(Kalman Filter)和支援向量回歸(Support Vector Regression),同時進行比較和分析。


    Due to the rise of Internet and mobile devices, many applications on the mobile devices such as social network, mobile games become more and more popular within recent years. The growth of mobile games is one of the most influential events in computer gaming in this decade. As the rise of the Internet mobile phone games not only play on their own, but also multiple players. Another primary reasons for this is that mobile phones are a thing that just almost everyone has on them at all times within recent years. Therefore, there are more and more multiplayer mobile game.
    A major problem of network-based multiplayer games is caused by the network transmission delay. This delay causes several problem and leads to contradictory situations. The two cars are going simultaneously while passing the finishing line. Because of the transmission delay, it takes a moment until the position of the remote player reaches the local player. Therefore, the position of the opponent’s car seems behind the local player. Thus, both players believe that they are the leader and going to be the winner of the game. Thus, the network delay caused the game unfair.
    In order to solve this situation, there are two major approaches have been developed such as local presentation delay and dead reckoning. In local presentation delay, the processing of game object from the remote and the local system are synchronized. Because of the requires that also local events are delayed. Because of the local events are also delayed, it's a bad experience for the player. The second approach , dead reckoning, is often used to reduce the effects of network induced delays and losses by using prediction method. Dead reckoning is the process of calculating one's current position by using a previously determined position, or fix, and advancing that position based upon known or estimated velocity over previous time and course. With dead reckoning, the next time event such as a player position is predicted. This can reduce the effect of network latency and of loss of events also.
    There are many different ways of dead reckoning. For different games, there is no one method is always the best. Different games may suit different prediction methods. Mainly, the game can be divided into sports games, action games, racing games. Different games have their own different feature. Because of the car moving fast in racing games, the accuracy of the prediction is more important. In this paper, we focus on the research the player's behavior prediction in racing games.
    Newton's law of motion is the most simple way in position prediction. It is also the method most used by the past, because Newton's law of motion is intuitive and easy. When sending the packet, not only the local player's location is transmitted to the remote player, but also the local player's speed, acceleration and timestamp. When remote player receive the package sending from local player, we can predict local player's next position by using the information in package.
    So we can use Newton's law of motion to simply predict the current player's position. However, the characteristics of high-speed vehicle movement in racing games. Rely only by Newton's laws of motion are not accurate enough in racing games. In this paper we study several prediction schemes and evaluate their suitability for racing games by experiments. In this paper we have provided two other methods to predict player's behavior, Kalman Filter and Support Vector Regression.

    Kalman filter, also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies.Kalman filter also produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe.
    Support vector machines (SVM), a machine learning method is emerging as a powerful modeling tool. In machine learning, support vector machines (SVM) are supervised learning models with associated learning algorithms that analyze data used for classification and regression analysis. Deal with the problem of regression SVM, called Support Vector Regression (SVR). Same as SVM, the goal of SVR is to find the best plane (hyperplane) in space. Different with SVM, SVM look for planes that divide the data, whereas support vector regression look for predictions that are accurate data distribution of the plane. In this paper we will compare several prediction schemes and evaluate their suitability for racing games by experiments, and analyze their advantage and shortcoming.

    論文摘要 ABSTRACT 目錄 第一章 緒論 1-1背景 1-2研究動機與目的 1-2-1賽車遊戲中傳統玩家行為預測 1-3研究方法 1-4主要貢獻 1-5論文架構 第二章 文獻探討 第三章 卡爾曼濾波器(KALMAN FILTER) 3-1卡爾曼濾波器介紹 3-1-1變異量數(Variance) 3-1-2常態或高斯分佈(Normal or Gaussian Distribution) 3-1-5卡爾曼濾波器介紹 3-2卡爾曼濾波實例 3-3卡爾曼濾波修正 第四章 支援向量回歸 (SUPPORT VECTOR REGRESSION) 4-1支援向量回歸介紹 4-2支援向量回歸訓練資料和預測方式 第五章 遊戲引擎(UNITY3D)網路架構 5-1UNET特徵 5-2UNET主要架構 5-2-1服務端(Server)和主機(Host) 5-1-2玩家(Players)和本地玩家(Local Players) 5-3UNET實作範例 5-3-1Networkmanager網路連線管理器 5-3-2設定NetworkBehaviour網路玩家行為元件 第六章 效能評估與模擬實驗 第七章 結論 參考文獻

    [1].林士蕙 (2015/04/29)。五年成長16倍,手機小遊戲潛藏大商機,取自: https://www.gvm.com.tw/article.html?id=20455
    [2].Glenn Fiedler. (1970). Introduction to Networked Physics. Retrieved from https://gafferongames.com/post/introduction_to_networked_physics/ , May 15, 2017
    [3].L. Pantel and L. Wolf, “On The Suitability of Dead Reckoning Schemes for Games,” in Proc. of NetGames2002, 2002.
    [4].L. Pantel and L.C. Wolf, “On the Impact of Delay on Real-Time Multiplayer Games,” in Proc. of ACM NOSSDAV’02, 2002.
    [5].L. Gautier and C. Diot: “Design and Evaluation of MiMaze, a Multiplayer Game on the Internet”, Proc. IEEE Multimedia (ICMCS’98), Austin, TX, USA, pp. 233-236, 1998
    [6].S. Aggarwal, H. Banavar, A. Khandelwal, S. Mukherjee, and S. Rangarajan,“Accuracy in dead-reckoning based distributed multi-player games,” in The 3rd ACM SIGCOMM workshop on Network and system support for games, pp. 161–165, 2004
    [7].I. Becht and S. Bakkes, “meirl-bc: Predicting player positions in video games,” in The 9th International Conference on the Foundations of Digital Games, 2014.
    [8].R. E. Kalman, “A new approach to linear filtering and prediction problems,” J. Basic Eng., vol. 82, pp. 35–45, Mar. 1960
    [9].R. Faragher, “Understanding the basis of the Kalman filter via a simple and intuitive derivation,” IEEE Signal Process. Mag., vol. 29, no. 5, pp. 128–132, Sep. 2012.
    [10].Krakiwsky, E.J., Harris, C.B., Wong, R.V.C., A Kalman filter for integrating dead reckoning, map matching and GPS positioning. In: Proceedings of IEEE Position Location and Navigation Symposium, pp. 39–46, 1988
    [11].Chen KY. Forecasting systems reliability based on support vector regression
    with genetic algorithms. Reliability Engineering & System Safety ,92:423–32, 2007

    QR CODE