Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 3D Game Programming

Similar presentations


Presentation on theme: "1 3D Game Programming"— Presentation transcript:

1 1 3D Game Programming 王銓彰kevin.cwang@msa.hinet.net

2 2 課程大綱 Introduction to Game Development (3hr) Introduction to Game Development (3hr) Game System Analysis (3hr) Game System Analysis (3hr) The Game Main Loop (3hr) The Game Main Loop (3hr) 3D Game Engine Training (TheFly3D) (6hr) 3D Game Engine Training (TheFly3D) (6hr) Game Mathematics (3hr) Game Mathematics (3hr) Geometry for Games (3hr) Geometry for Games (3hr) Advanced Scene Management System (6hr) Advanced Scene Management System (6hr) Terrain (3hr) Terrain (3hr) Game AI (6hr) Game AI (6hr) Game Physics (3hr) Game Physics (3hr) Game FX (3hr) Game FX (3hr) Network Gaming (3hr) Network Gaming (3hr) Introduction to MMOG (3hr) Introduction to MMOG (3hr) The Non-3D Parts (3hr) The Non-3D Parts (3hr)

3 3 課程要求 One Term Project One Term Project The Students will divide into several teams The Students will divide into several teams Use TheFly3D Game Engine to code a 3D Real-time Strategy Game Use TheFly3D Game Engine to code a 3D Real-time Strategy Game The Teacher will Provide Graphics Materials The Teacher will Provide Graphics Materials Two Examinations Two Examinations Homework will be closely coupled with the term project Homework will be closely coupled with the term project

4 4 王銓彰 目前 目前 昱泉國際股份有限公司 技術顧問 昱泉國際股份有限公司 技術顧問 數位內容學院 專任講師 / 顧問 數位內容學院 專任講師 / 顧問 資策會多媒體研究所 專案顧問 資策會多媒體研究所 專案顧問 學歷 學歷 台灣大學土木工程學系畢業 台灣大學土木工程學系畢業 資歷 資歷 97-03 昱泉國際股份有限公司 技術長 97-03 昱泉國際股份有限公司 技術長 96-96 虛擬實境電腦動畫股份有限公司 研發經理 96-96 虛擬實境電腦動畫股份有限公司 研發經理 93-96 西基電腦動畫股份有限公司 研發經理 93-96 西基電腦動畫股份有限公司 研發經理 90-93 國家高速電腦中心 助理研究員 90-93 國家高速電腦中心 助理研究員 89-90 台灣大學土木工程學系 CAE Lab 研究助理 89-90 台灣大學土木工程學系 CAE Lab 研究助理

5 5 王銓彰 Game 作品 Game 作品 昱泉國際 昱泉國際 DragonFly 3D Game Engine DragonFly 3D Game Engine –M2 神甲奇兵, VRLobby, 天劍記 Lizard 3D Game Engine Lizard 3D Game Engine – 幻影特攻、笑傲江湖 I & II 、神鵰俠侶 I & II 、風雲、小李飛刀、笑傲江 湖網路版、怪獸總動員、聖劍大陸、笑傲外傳 西基電腦動畫 西基電腦動畫 Ultimate Fighter – 1 st Realtime 3D fighting game in Taiwan Ultimate Fighter – 1 st Realtime 3D fighting game in Taiwan

6 6 王銓彰 專長 (Expertise) 專長 (Expertise) 3D Computer Graphics 3D Computer Graphics Geometric Modeling Geometric Modeling Numerical Methods Numerical Methods Character Animation Character Animation Photo-realistic Rendering Photo-realistic Rendering Real-time Shading Real-time Shading Volume Rendering Volume Rendering

7 7 王銓彰 應用領域 (Applications) 應用領域 (Applications) 即時 3D 遊戲開發 (Real-time 3D Game Development) 即時 3D 遊戲開發 (Real-time 3D Game Development) 電腦動畫 (Computer Animation) 電腦動畫 (Computer Animation) 虛擬實境 (Virtual Reality) 虛擬實境 (Virtual Reality) 電腦輔助設計 (Computer-aided Design) 電腦輔助設計 (Computer-aided Design) 科學視算 (Scientific Visualization) 科學視算 (Scientific Visualization)

8 8 IntroductionTo Game Development

9 9 Introduction to Game Dev Game Platform Game Platform Game Types Game Types Game Team Game Team Game Development Pipeline Game Development Pipeline Game Software System Game Software System Tools Tools

10 10 Game Platform PC PC Single player Single player Match Makings Match Makings MMOG (Massive Multi-player Online Game) MMOG (Massive Multi-player Online Game) Web-based Games Web-based Games Console Console Sony PS2 Sony PS2 MS Xbox MS Xbox Nintedo GameCube Nintedo GameCube Arcade Arcade Mobile Mobile GBA GBA Hand-held Hand-held

11 11 Game Development on PC Designed for Office Application Designed for Office Application Not for Entertainment Not for Entertainment A Virtual Memory System A Virtual Memory System Unlimited memory using Unlimited memory using But Video Memory is Limited But Video Memory is Limited PCI/AGP might be a Challenge PCI/AGP might be a Challenge Open Architecture Open Architecture Compatibility Test is Important Compatibility Test is Important Development is Easy to Setup Development is Easy to Setup

12 12 Game Development on Console Specific Hardware Designed for Games Specific Hardware Designed for Games Single User / Single Process OS Single User / Single Process OS In General no Hard Disk Drive (??) In General no Hard Disk Drive (??) Closed System Closed System Very Native Coding Way Very Native Coding Way Proprietary SDK Proprietary SDK Hardware related features Hardware related features Limited Resources Limited Resources Memory Memory One Console runs, the others do! One Console runs, the others do!

13 13 Game Types RPG (Role playing games) RPG (Role playing games) AVG (Adventure games) AVG (Adventure games) RTS (Real-time strategy games) RTS (Real-time strategy games) FPS (First-person shooting games) FPS (First-person shooting games) MMORPG MMORPG SLG (???, 戰棋 ) SLG (???, 戰棋 ) Simulation Simulation Sports Sports Puzzle games Puzzle games Table games Table games

14 14 Game Team 組成 開發團隊 開發團隊 製作人 製作人 執行製作人 執行製作人 企劃團隊 企劃團隊 程式團隊 程式團隊 美術團隊 美術團隊 行銷業務團隊 行銷業務團隊 測試團隊 測試團隊 遊戲審議委員會 遊戲審議委員會

15 15 遊戲製作人 (Producer) Team Leader (always) Team Leader (always) 資源管理 (Resource Management) 資源管理 (Resource Management) 行政管理 (Administration) 行政管理 (Administration) 向上負責 (Upward Management) 向上負責 (Upward Management) 專案管理 (Project Management) 專案管理 (Project Management)

16 16 遊戲執行製作人 專案管理執行 (Project Management) 專案管理執行 (Project Management) Daily 運作 Daily 運作 House Keeping House Keeping Not full-time job position Not full-time job position

17 17 遊戲企劃 故事設計 (Story Telling) 故事設計 (Story Telling) 腳本設計 (Scripting) 腳本設計 (Scripting) 玩法設計 (Game Play Design) 玩法設計 (Game Play Design) 關卡設計 (Level Design) 關卡設計 (Level Design) 遊戲調適 (Game Tuning) 遊戲調適 (Game Tuning) 數值設定 (Numerical Setup) 數值設定 (Numerical Setup) AI 設計 (Game AI) AI 設計 (Game AI) 音效設定 (Sound FX Setup) 音效設定 (Sound FX Setup) 場景設定 (Scene Setup) 場景設定 (Scene Setup)

18 18 遊戲美術 場景 (Terrain) 場景 (Terrain) 人物 (Character) 人物 (Character) 建模 (Models) 建模 (Models) 材質 (Textures) 材質 (Textures) 動作 (Motion / Animation) 動作 (Motion / Animation) 特效 (FX) 特效 (FX) User Interface User Interface

19 19 遊戲程式 遊戲程式 (Game Program) 遊戲程式 (Game Program) 遊戲開發工具 (Game Tools) 遊戲開發工具 (Game Tools) Level Editor Level Editor Scene Editor Scene Editor FX Editor FX Editor Script Editor Script Editor 遊戲 Data Exporters from 3D Software 遊戲 Data Exporters from 3D Software 3dsMax / Maya / Softimage 3dsMax / Maya / Softimage Game Engine Development Game Engine Development Online Game Server Development Online Game Server Development

20 20 遊戲開發流程 Basic Procedures for Game Development IdeaProposalProductionIntegration Testing DebugTuning Concept Approval PrototypePre-alphaAlphaBetaFinal 發想 (Idea) 發想 (Idea) 提案 (Proposal) 提案 (Proposal) 製作 (Production) 製作 (Production) 整合 (Integration) 整合 (Integration) 測試 (Testing) 測試 (Testing) 除錯 (Debug) 除錯 (Debug) 調適 (Tuning) 調適 (Tuning) > Concept Approval > 雛形 (Prototype) > Pre-alpha > Alpha > Beta

21 21 遊戲發想 (Concept Design) 遊戲類型 (Game Types) 遊戲類型 (Game Types) 遊戲世界觀 (Game World) 遊戲世界觀 (Game World) 故事 (Story) 故事 (Story) 遊戲特色 (Features) 遊戲特色 (Features) 遊戲玩法 (Game Play) 遊戲玩法 (Game Play) 遊戲定位 (Game Product Positioning) 遊戲定位 (Game Product Positioning) Target player Target player Marketing segmentation / positioning Marketing segmentation / positioning 風險評估 (Risk) 風險評估 (Risk) SWOT (Strength/Weakness/Opportunity/Threat) SWOT (Strength/Weakness/Opportunity/Threat)

22 22 遊戲提案 (Proposal) 系統分析 (System Analysis) 系統分析 (System Analysis) GDD 撰寫 (Game Design Document) GDD 撰寫 (Game Design Document) MDD 撰寫 (Media Design Document) MDD 撰寫 (Media Design Document) TDD 撰寫 (Technical Design Document) TDD 撰寫 (Technical Design Document) 遊戲專案建立 (Game Project) 遊戲專案建立 (Game Project) Schedule Schedule Milestones / Check points Milestones / Check points Risk management Risk management 測試計畫書 測試計畫書 團隊建立 (Team Building) 團隊建立 (Team Building)

23 23 遊戲開發 (Production) 美術量產製作 美術量產製作 Modeling Modeling Textures Textures Animation Animation Motion Motion FX FX 程式開發 (Coding) 程式開發 (Coding) 企劃數值設定 企劃數值設定 … 量產 !

24 24 遊戲整合 (Integration) 關卡串聯 (Level Integration) 關卡串聯 (Level Integration) 數值調整 (Number Tuning) 數值調整 (Number Tuning) 音效置入 (Audio) 音效置入 (Audio) 完成所有美術 完成所有美術 程式與美術結合 程式與美術結合 Focus Group (User Study) Focus Group (User Study) Release some playable levels for focus group Release some playable levels for focus group

25 25 遊戲測試 (Testing) Alpha 測試 Alpha 測試 除錯 (Debug) 除錯 (Debug) Beta 測試 Beta 測試 數值微調 數值微調 Game play 微調 Game play 微調 對線上遊戲而言 (MMOG) 對線上遊戲而言 (MMOG) 封閉測試 (Closed Beta) 封閉測試 (Closed Beta) 開放測試 (Open Beta) 開放測試 (Open Beta) 極限測試 (Critical Testing) 極限測試 (Critical Testing) 線上遊戲才有 線上遊戲才有

26 26 Bug Bug 分級 (Bug Classification) Bug 分級 (Bug Classification) A Bug A Bug B Bug B Bug C Bug C Bug S Bug S Bug Principles Principles Bug 分級從嚴 Bug 分級從嚴 Tester vs Debugger Tester vs Debugger Bug Classification Bug Dispatch Debug Verify Bug FAQ Y N ?

27 27 Game Software System Hardware 3D Graphics API2D APIInput DeviceOS API3D Scene Mngmt2D SpriteGamepadNetworkAudioTerrainCollisionCharacterUIDynamicsSound FX Fighting SystemFX SystemGame AIScript System NPC SystemVirtual AgentTrading SystemStory Game Game Play Layer Engine Layer System Layer

28 28 System Layer - APIs 3D Graphics API 3D Graphics API DirectX 9.0 SDK – Direct3D DirectX 9.0 SDK – Direct3D OpenGL 2.0 OpenGL 2.0 2D API 2D API DirectX 9.0 SDK - DirectMedia DirectX 9.0 SDK - DirectMedia Win32 GDI Win32 GDI Input Device Input Device DirectX 9.0 SDK – DirectInput DirectX 9.0 SDK – DirectInput Audio Audio DirectX 9.0 SDK – DirectSound / Direct3DSound / DirectMedia DirectX 9.0 SDK – DirectSound / Direct3DSound / DirectMedia OpenAL OpenAL

29 29 System Layer - APIs OS API OS API Win32 SDK Win32 SDK MFC MFC Network Network DirectX 9.0 SDK – DirectPlay DirectX 9.0 SDK – DirectPlay Socket library Socket library

30 30 Engine Layer 3D Scene Management System 3D Scene Management System Scene Graph Scene Graph Shaders Shaders 2D Sprite System 2D Sprite System Audio System Audio System Gamepad Gamepad Hotkey Hotkey Mouse Mouse Timers Timers Network Network DDK Interface DDK Interface

31 31 Engine Layer Terrain Terrain Advanced Scene Management – Space Partition Advanced Scene Management – Space Partition BSP Tree BSP Tree Octree Octree Character System Character System Motion Blending Techniques Motion Blending Techniques Dynamics Dynamics Collision Detection Collision Detection SoundFX SoundFX User Interface User Interface

32 32 Game Play Modula NPC (Non-playable Characters) NPC (Non-playable Characters) Game AI Game AI Path Finding Path Finding Finite State Machine Finite State Machine … Avatar Avatar Combat System Combat System FX System FX System Script System Script System Trading System Trading System Number System Number System …

33 33 Game Dev Tools Visual C/C++ Visual C/C++.net 2003.net 2003 Visual C/C++ 6.0+ SP5 Visual C/C++ 6.0+ SP5 DirectX DirectX Current 9.0c Current 9.0c NuMega BoundsChecker NuMega BoundsChecker Intel vTune Intel vTune 3D Tools 3D Tools 3dsMax/Maya/Softimage 3dsMax/Maya/Softimage In-house Tools In-house Tools

34 34 Game System Analysis

35 35 What Will We Talk Here Idea about System Analysis (SA) Idea about System Analysis (SA) Mind mapping Mind mapping Case Study - Our Term Project Case Study - Our Term Project

36 36 Why SA ? (1/2) For 程式結構 Analysis For 程式結構 Analysis Program modulus Program modulus Tools Tools To Identify 工作量 To Identify 工作量 Programs/tools under development Programs/tools under development For 資源 management For 資源 management Man month Man month How many programmers ? How many programmers ? Development tools ? Development tools ? Specific tools ? Specific tools ? For Job Dependency Analysis For Job Dependency Analysis

37 37 Why SA ? (2/2) To make 技術可行性 Analysis To make 技術可行性 Analysis R&D ? R&D ? Pre-processor for Pre-processor for Technical design document Technical design document Project management Project management Bridge from Game Design to Programming Bridge from Game Design to Programming

38 38 Something about SA No Standard Procedures No Standard Procedures It’s Not a Theory, Just Something Must Be Done! It’s Not a Theory, Just Something Must Be Done! You Can Have Your Own Method You Can Have Your Own Method UML UML Mind mapping ( 心智圖法 ) Mind mapping ( 心智圖法 ) This is the one we will use for this course This is the one we will use for this course …

39 39 The SA Steps I Used Brainstorming Brainstorming Integration Integration Dependency Analysis Dependency Analysis Create the Project Create the Project Write the Technical Design Document (TDD) Write the Technical Design Document (TDD)

40 40 SA – Brainstorming Based on the Game Design to Put Everything As Many As You Could Based on the Game Design to Put Everything As Many As You Could Use Mind mapping Use Mind mapping Including Including Game system Game system Combat / Village / Puzzle / … Combat / Village / Puzzle / … Program modulus Program modulus Camera / PC control / NPC AI / UI / FX /… Camera / PC control / NPC AI / UI / FX /… Tools Tools Level editor / Scene editor / … Level editor / Scene editor / … Entities in games Entities in games Characters / vehicle / terrain / audio / … Characters / vehicle / terrain / audio / …

41 41 SA – Integration Confirm the Resource Limitation Confirm the Resource Limitation Technical Implement Possibility Technical Implement Possibility Put All Related Items Together Put All Related Items Together Man Month Analysis Man Month Analysis How many ? How many ? Who ? Who ? Jobs/System Identification Jobs/System Identification

42 42 SA – Dependency Analysis Sort the Jobs Sort the Jobs By dependency By dependency By programmers By programmers Prototype for scheduling Prototype for scheduling

43 43 SA – Create the Project Scheduling Scheduling Job Assignment Job Assignment Resource Allocation Resource Allocation Check points Check points Milestones Milestones Risk Management Policy Risk Management Policy

44 44 SA – Write the TDD Specification Specification Resources Resources Design in details Design in details Implement Methods ( 工法 ) Implement Methods ( 工法 ) Algorithms Algorithms The Project The Project Output in Each Milestone Output in Each Milestone SOP (optional) SOP (optional)

45 45 Mind Mapping 心智圖法 心智圖法 A Radiant Thinking Tool A Radiant Thinking Tool Applications Applications 讀書心得 讀書心得 Proposal Proposal 上課筆記 上課筆記 遊記 遊記 System Analysis System Analysis … Reference Reference Program Program Visio Visio MindManager MindManager Tony Buzan, Barry Buzan, “ The Mind Map Book: How to Use Radiant Thinking to Maximize Your Brain's Untapped Potential ” Tony Buzan, Barry Buzan, “ The Mind Map Book: How to Use Radiant Thinking to Maximize Your Brain's Untapped Potential ”

46 46

47 47

48 48 Mind Mapping Demo Use MindManager X5 pro Use MindManager X5 pro Developed By MindJet Developed By MindJet

49 49 Term Project System Analysis

50 50 Game Design (1/3) Real-time Strategy War Game Real-time Strategy War Game Mission-based Levels Mission-based Levels Mouse-driven Controls Mouse-driven Controls Player vs Computer Player vs Computer State-based AI State-based AI Group Movement Group Movement

51 51 Game Design (2/3) PC – Controlled by Player PC – Controlled by Player “Blue Team” “Blue Team” Move Move Attack Attack AI AI Standby Standby Anti-attack Anti-attack NPC – Controlled by Computer NPC – Controlled by Computer “Red Team” - Enemy “Red Team” - Enemy Triggered by time table Triggered by time table AI AI Move Move Standby Standby Anti-attack Anti-attack Attack Attack

52 52 Game Design (3/3) Game AI Game AI Finite state machine Finite state machine Path finding Path finding 3D 3D A* A* Steering behavior Steering behavior Flocks / Schools / Herds Flocks / Schools / Herds Flocks / Schools / Herds Flocks / Schools / Herds http://www.red3d.com/cwr/boids/ http://www.red3d.com/cwr/boids/ http://www.red3d.com/cwr/boids/ AI Game Programming Wisdom, Charles River Media (1 & 2) AI Game Programming Wisdom, Charles River Media (1 & 2)

53 53 System Analysis Run MindManager.exe Run MindManager.exe


Download ppt "1 3D Game Programming"

Similar presentations


Ads by Google