關(guān)于我們
書(shū)單推薦
新書(shū)推薦
|
游戲設(shè)計(jì)與開(kāi)發(fā) 讀者對(duì)象:本書(shū)適用于電子游戲相關(guān)專業(yè)的學(xué)生、游戲開(kāi)發(fā)初學(xué)者,以及需要進(jìn)階的游戲開(kāi)發(fā)者。對(duì)于學(xué)生與初學(xué)者來(lái)說(shuō),本書(shū)是一本實(shí)戰(zhàn)指南;對(duì)于需要進(jìn)階的游戲開(kāi)發(fā)者來(lái)說(shuō),本書(shū)可作為工作中的參考資料。
本書(shū)結(jié)合了游戲設(shè)計(jì)的原則與使用Unity開(kāi)發(fā)游戲的方法,挑選了受歡迎、有代表性的多個(gè)相對(duì)獨(dú)立的游戲?qū)嵗,在原開(kāi)發(fā)者的協(xié)助下進(jìn)行了重新優(yōu)化和整理。每章有特定的游戲類型與風(fēng)格,滿足讀者學(xué)習(xí)、實(shí)戰(zhàn)與參考的需求。
從高中時(shí)代就開(kāi)始制作"文曲星”游戲,從此踏入游戲開(kāi)發(fā)的世界。曾在北京像素軟件開(kāi)發(fā)大型網(wǎng)絡(luò)游戲《尋仙》,創(chuàng)業(yè)時(shí)期層主持過(guò)多款手游和HTML5游戲。后來(lái)專注于高性能游戲服務(wù)器設(shè)計(jì)。ping時(shí)喜歡研究動(dòng)態(tài)語(yǔ)言和算法,擅長(zhǎng)講解復(fù)雜的算法和概念。目前專業(yè)從事游戲開(kāi)發(fā)教育工作,希望能帶領(lǐng)更多人走進(jìn)游戲開(kāi)發(fā)的世界!禪nity 3D完全自學(xué)教程》編者,《游戲AI開(kāi)發(fā)實(shí)用指南》譯者。
1 章 3D 動(dòng)作解謎游戲—《拉方塊》..........................................................................1 1.1 游戲的開(kāi)發(fā)背景和功能概述...........................................................................................1 1.1.1 游戲開(kāi)發(fā)背景簡(jiǎn)介 ..............................................................................................1 1.1.2 游戲功能簡(jiǎn)介 ......................................................................................................1 1.2 游戲的策劃和準(zhǔn)備工作...................................................................................................2 1.2.1 游戲的策劃 ..........................................................................................................2 1.2.2 開(kāi)發(fā)游戲前的準(zhǔn)備工作 ......................................................................................3 1.3 游戲的架構(gòu) ......................................................................................................................3 1.3.1 游戲場(chǎng)景簡(jiǎn)介 ......................................................................................................3 1.3.2 游戲架構(gòu)簡(jiǎn)介 ......................................................................................................3 1.4 游戲的開(kāi)發(fā)與實(shí)現(xiàn) ..........................................................................................................4 1.4.1 游戲場(chǎng)景的搭建及相關(guān)設(shè)置 ..............................................................................4 1.4.2 腳本編輯及相關(guān)設(shè)置 ..........................................................................................8 1.5 游戲的優(yōu)化與改進(jìn) ........................................................................................................17 2 章 2D ping臺(tái)跳躍跑酷游戲—《冰火人》.................................................................18 2.1 游戲的開(kāi)發(fā)背景和功能概述.........................................................................................18 2.1.1 游戲開(kāi)發(fā)背景 ....................................................................................................18 2.1.2 游戲功能 ............................................................................................................18 2.2 游戲的策劃和準(zhǔn)備工作.................................................................................................20 2.2.1 游戲的策劃 ........................................................................................................20 2.2.2 使用 Unity 開(kāi)發(fā)游戲前的準(zhǔn)備工作 .................................................................20 2.3 游戲的架構(gòu) ....................................................................................................................21 2.3.1 游戲場(chǎng)景簡(jiǎn)介 ....................................................................................................21 2.3.2 游戲玩法簡(jiǎn)介 ....................................................................................................22 2.4 游戲的開(kāi)發(fā)與實(shí)現(xiàn) ........................................................................................................22 2.4.1 場(chǎng)景的搭建及相關(guān)設(shè)置 ....................................................................................23 2.4.2 腳本編輯及相關(guān)設(shè)置 ........................................................................................35 3 章 人見(jiàn)人愛(ài)—《糖果消消樂(lè)》..............................................................................47 3.1 游戲的開(kāi)發(fā)背景和功能概述.........................................................................................47 3.1.1 游戲開(kāi)發(fā)背景....................................................................................................47 3.1.2 游戲功能............................................................................................................47 3.2 游戲的策劃和準(zhǔn)備工作 ................................................................................................48 3.2.1 游戲的策劃........................................................................................................49 3.2.2 使用 Unity 開(kāi)發(fā)游戲前的準(zhǔn)備工作 .................................................................49 3.3 游戲的架構(gòu) ....................................................................................................................49 3.3.1 游戲場(chǎng)景簡(jiǎn)介....................................................................................................50 3.3.2 游戲架構(gòu)簡(jiǎn)介....................................................................................................50 3.4 游戲的開(kāi)發(fā)與實(shí)現(xiàn) ........................................................................................................50 3.4.1 場(chǎng)景的搭建及相關(guān)設(shè)置 ....................................................................................50 3.4.2 游戲的狀態(tài)劃分和數(shù)據(jù)結(jié)構(gòu)的設(shè)計(jì)與實(shí)現(xiàn) ....................................................53 3.4.3 棋盤和糖果的生成設(shè)計(jì)與實(shí)現(xiàn) ........................................................................58 3.4.4 不同糖果刪除效果設(shè)計(jì)與實(shí)現(xiàn) ........................................................................61 3.4.5 洗牌狀態(tài)的設(shè)計(jì)與實(shí)現(xiàn) ....................................................................................65 3.4.6 動(dòng)畫(huà)狀態(tài)的設(shè)計(jì)與實(shí)現(xiàn) ....................................................................................70 3.4.7 糖果掉落狀態(tài)的設(shè)計(jì)與實(shí)現(xiàn) ............................................................................71 3.4.8 等作狀態(tài)的設(shè)計(jì)與實(shí)現(xiàn) ............................................................................73 3.4.9 檢測(cè)狀態(tài)的設(shè)計(jì)與實(shí)現(xiàn) ....................................................................................79 3.4.10 刪除與生成糖果的設(shè)計(jì)與實(shí)現(xiàn) ......................................................................91 4 章 另類跑酷游戲——《套馬》 .................................................................................94 4.1 游戲的開(kāi)發(fā)背景和功能概述 ........................................................................................94 4.1.1 游戲開(kāi)發(fā)背景....................................................................................................94 4.1.2 游戲功能............................................................................................................94 4.2 游戲的策劃和準(zhǔn)備工作 ................................................................................................95 4.2.1 游戲的策劃........................................................................................................96 4.2.2 使用 Unity 開(kāi)發(fā)游戲前的準(zhǔn)備工作 .................................................................96 4.3 游戲的架構(gòu) ....................................................................................................................98 4.3.1 游戲場(chǎng)景簡(jiǎn)介....................................................................................................98 4.3.2 預(yù)制體介紹........................................................................................................98 4.3.3 游戲玩法和流程................................................................................................99 4.4 開(kāi)始場(chǎng)景的開(kāi)發(fā) ............................................................................................................99 4.4.1 場(chǎng)景的搭建及相關(guān)設(shè)置 ..................................................................................100 4.4.2 腳本編輯及相關(guān)設(shè)置 ......................................................................................100 4.5 游戲場(chǎng)景的開(kāi)發(fā) ..........................................................................................................101 4.5.1 導(dǎo)入和使用模型素材 ......................................................................................101 4.5.2 創(chuàng)建角色預(yù)制體..............................................................................................103 4.5.3 創(chuàng)建場(chǎng)景預(yù)制體..............................................................................................106 4.5.4 搭建場(chǎng)景 ..........................................................................................................109 4.5.5 設(shè)置游戲物體的層 ..........................................................................................111 4.5.6 設(shè)置攝像機(jī) ......................................................................................................112 4.5.7 創(chuàng)建游戲界面 ..................................................................................................113 4.5.8 實(shí)現(xiàn)游戲管理器 ..............................................................................................115 4.5.9 實(shí)現(xiàn)馬腳本 ......................................................................................................117 4.5.10 實(shí)現(xiàn)角色腳本 ................................................................................................119 4.6 游戲的優(yōu)化與改進(jìn) ......................................................................................................125 4.6.1 DOTween 插件的使用方法.............................................................................126 4.6.2 在該游戲中加入動(dòng)態(tài)效果 ..............................................................................132 5 章 經(jīng)典游戲—《黃金礦工》 ...............................................................................134 5.1 游戲的開(kāi)發(fā)背景和功能概述.......................................................................................134 5.1.1 游戲開(kāi)發(fā)背景 ..................................................................................................134 5.1.2 游戲功能 ..........................................................................................................134 5.2 游戲的策劃和準(zhǔn)備工作...............................................................................................135 5.2.1 游戲的策劃 ......................................................................................................136 5.2.2 使用 Unity 開(kāi)發(fā)游戲前的準(zhǔn)備工作 ...............................................................136 5.3 游戲的架構(gòu) ..................................................................................................................137 5.3.1 游戲場(chǎng)景簡(jiǎn)介 ..................................................................................................137 5.3.2 游戲架構(gòu)簡(jiǎn)介 ..................................................................................................138 5.4 游戲開(kāi)始界面場(chǎng)景的開(kāi)發(fā)...........................................................................................139 5.4.1 場(chǎng)景的搭建及相關(guān)設(shè)置 ..................................................................................139 5.4.2 腳本編輯及相關(guān)設(shè)置 ......................................................................................141 5.5 游戲關(guān)卡場(chǎng)景的開(kāi)發(fā)...................................................................................................141 5.5.1 場(chǎng)景的搭建及相關(guān)設(shè)置 ..................................................................................141 5.5.2 腳本編輯及相關(guān)設(shè)置 ......................................................................................147 5.6 游戲的優(yōu)化與改進(jìn) ......................................................................................................158 6 章 3D 動(dòng)作游戲——《割草無(wú)雙》..........................................................................159 6.1 游戲的開(kāi)發(fā)背景和功能概述.......................................................................................159 6.1.1 游戲開(kāi)發(fā)背景 ..................................................................................................159 6.1.2 游戲功能 ..........................................................................................................159 6.2 游戲的策劃和準(zhǔn)備工作...............................................................................................162 6.2.1 游戲的策劃 ......................................................................................................162 6.2.2 使用 Unity 開(kāi)發(fā)游戲前的準(zhǔn)備工作 ...............................................................163 6.3 游戲的架構(gòu) ..................................................................................................................164 6.3.1 場(chǎng)景簡(jiǎn)介..........................................................................................................164 6.3.2 游戲架構(gòu)簡(jiǎn)介..................................................................................................165 6.4 游戲的開(kāi)發(fā)與實(shí)現(xiàn) ......................................................................................................165 6.4.1 場(chǎng)景的搭建及相關(guān)設(shè)置 ..................................................................................166 6.4.2 控制系統(tǒng)的搭建及相關(guān)設(shè)置 ..........................................................................167 6.4.3 敵人系統(tǒng)的準(zhǔn)備及相關(guān)設(shè)置 ..........................................................................172 6.4.4 UI 的搭建及相關(guān)設(shè)置.....................................................................................175 6.4.5 其他游戲腳本的準(zhǔn)備 ......................................................................................181 6.4.6 腳本編輯及相關(guān)設(shè)置 ......................................................................................181 7 章 鳥(niǎo)模擬 ............................................................................................................198 7.1 鳥(niǎo)行為模式的理論與實(shí)現(xiàn) ......................................................................................198 7.1.1 鳥(niǎo)行為模式的分析 ......................................................................................198 7.1.2 創(chuàng)建工程..........................................................................................................199 7.1.3 編寫(xiě)腳本..........................................................................................................201 7.1.4 編寫(xiě)控制腳本..................................................................................................204 7.1.5 完成工程并測(cè)試..............................................................................................205 7.1.6 鳥(niǎo)的其他行為模式..........................................................................................206 7.2 鳥(niǎo)的調(diào)整與完善 ......................................................................................................207 7.2.1 調(diào)整每只鳥(niǎo)的具體行為 ..................................................................................207 7.2.3 小結(jié)和擴(kuò)展......................................................................................................208 8 章 程序建!S網(wǎng)格生成 ...............................................................................209 8.1 三維網(wǎng)格生成概述 ......................................................................................................209 8.1.1 三維網(wǎng)格的原理..............................................................................................209 8.1.2 與網(wǎng)格有關(guān)的 Unity 組件 ...............................................................................210 8.1.3 三維網(wǎng)格技術(shù)的應(yīng)用 ......................................................................................211 8.2 用腳本生成三維網(wǎng)格 ..................................................................................................211 8.2.1 創(chuàng)建#一個(gè)三角面..........................................................................................211 8.2.2 對(duì)三角面程序的解釋 ......................................................................................213 8.2.3 常用三維模型舉例..........................................................................................214 8.3 三維模型貼圖 ..............................................................................................................219 8.3.1 簡(jiǎn)單貼圖實(shí)例..................................................................................................219 8.3.2 貼圖代碼詳解..................................................................................................222 8.3.3 立方體貼圖......................................................................................................223 8.4 噪聲與地形 ..................................................................................................................227 8.4.1 地形建模..........................................................................................................227 8.4.2 柏林噪聲簡(jiǎn)介 ..................................................................................................229 8.4.3 將噪聲應(yīng)用于地形建模 ..................................................................................230 9 章 三維沙盒游戲—《方塊世界》........................................................................232 9.1 游戲簡(jiǎn)介與功能概述...................................................................................................232 9.1.1 無(wú)限大的地形 ..................................................................................................232 9.1.2 刪除和創(chuàng)建地形方塊 ......................................................................................233 9.2 無(wú)限網(wǎng)格的生成方法...................................................................................................233 9.2.1 問(wèn)題分析 ..........................................................................................................233 9.2.2 創(chuàng)建組塊 ..........................................................................................................234 9.2.3 編輯組塊代碼 ..................................................................................................236 9.2.4 組塊貼圖 ..........................................................................................................239 9.2.5 組塊與地形 ......................................................................................................242 9.3 將組塊組合成世界 ......................................................................................................244 9.4 創(chuàng)建游戲角色 ..............................................................................................................248 9.4.1 添加角色 ..........................................................................................................248 9.4.2 添加角色控制器組件 ......................................................................................250 9.4.3 編輯角色控制腳本 ..........................................................................................250 9.4.4 添加攝像機(jī)腳本 ..............................................................................................252 9.4.5 添加工具界面 ..................................................................................................253 9.5 動(dòng)態(tài)改變組塊 ..............................................................................................................254 9.5.1 銷毀方塊的算法 ..............................................................................................254 9.5.2 通過(guò)線定位要銷毀的方塊 ..........................................................................255 9.5.3 創(chuàng)建方塊的算法 ..............................................................................................257 9.5.4 編輯角色作腳本 ..........................................................................................259 9.5.5 完善游戲并測(cè)試 ..............................................................................................260
你還可能感興趣
我要評(píng)論
|