高云鵬 黃海明
摘要:游戲開發(fā)過程中涉及很多關(guān)鍵技術(shù),好的技術(shù)應(yīng)用可以為復(fù)雜功能和卓越性能提供保障。該文以一款具體的捕魚游戲設(shè)計為例,分析了游戲中的各種功能實現(xiàn)及優(yōu)化技術(shù),包括資源優(yōu)化技術(shù)、壓縮加密技術(shù)、碰撞檢測技術(shù)、繪制優(yōu)化策略、粒子系統(tǒng)、基于自由路徑的魚群算法、基于編輯器的路徑生成技術(shù)等。通過運用這些技術(shù),得到了較好的游戲結(jié)果。
關(guān)鍵詞: 2D引擎; 資源優(yōu)化; 路徑編輯; 碰撞檢測; 粒子系統(tǒng)
中圖分類號:TP391 文獻標識碼:A 文章編號:1009-3044(2014)25-5877-06
The Research on Fishing Game Development and Optimization Technology
GAO Yun-peng1,HUANG Hai-ming2,3
(1.School of Computer Science and Technology , University of Science and Technology of China (USTC), Hefei 230026, China; 2. Institute of Automation, Chinese Academy of Sciences, Beijing 100080,China;3. China Lottery Online Co., LTD., Beijing 100011, China)
Abstract: Game development involves lots of key technologies, appropriate use of technologies can support realization of complex functions and perfect performance. This paper takes the design of fishing game for instance, analyzes the methods for realizing functions and technology for optimization including resource optimization, compress and encryption, collision detect, render optimization, particle system, fish group algorithm based on free path, path generation based on editor etc. Through the use of the above technologies, the game result is good.
Key words:2D engine; resource optimization; path editor; collision detect; particle system
近幾年,捕魚達人游戲的面世,引發(fā)了全民捕魚的狂潮。人們?yōu)槠渲行路f的玩法設(shè)計,豐富而流暢的界面表現(xiàn),極強的趣味性而深深吸引。目前捕魚類游戲已經(jīng)從手機游戲擴展到了網(wǎng)頁游戲,街機游戲甚至端游領(lǐng)域。該文將以街機版捕魚游戲開發(fā)為例,圍繞系統(tǒng)架構(gòu),軟硬件及算法等各方面進行闡述。
1 游戲整體設(shè)計
在游戲系統(tǒng)設(shè)計中,首先要進行架構(gòu)設(shè)計,以滿足功能、保密性、高效性為目標,同時兼顧成本因數(shù)[1-3]。
在基礎(chǔ)硬件上,考慮成本,選擇了業(yè)內(nèi)流行的微特邁工業(yè)主機。在這種主機上可以安裝各種操作系統(tǒng)包括xp、winCE、Linux等等,所以不會對后續(xù)的技術(shù)選型造成太大的影響。
在游戲正式開發(fā)前,游戲引擎的選擇至關(guān)重要[4]。由于這里要開發(fā)的是2D游戲,所以可以在如下這幾種2D引擎中選擇,例如HGE、SDL、COCOS2D等等。考慮到開發(fā)團隊的知識結(jié)構(gòu),并考慮到在Windows下開發(fā)調(diào)試比較便利,且winxp精簡版消耗的內(nèi)存較小,也適合于在工業(yè)主機上安裝運行,所以最終我們選擇了適合于windows操作系統(tǒng)的HGE引擎。……