4.51k likes | 5.28k Views
3 D Game Programming. 王銓彰 kevin.cwang@msa.hinet.net 2005. 課程大綱. Introduction to Game Development (3hr) Game System Analysis (3hr) The Game Main Loop (3hr) 3D Game Engine Training (Using TheFly3D) (6hr) Game Mathematics & Geometry (3hr) Terrain (3hr) Character Motion (3hr)
E N D
3D Game Programming 王銓彰 kevin.cwang@msa.hinet.net 2005
課程大綱 • Introduction to Game Development (3hr) • Game System Analysis (3hr) • The Game Main Loop (3hr) • 3D Game Engine Training (Using TheFly3D) (6hr) • Game Mathematics & Geometry (3hr) • Terrain (3hr) • Character Motion (3hr) • Game Control System (3hr) • Advanced Scene Management System (3hr) • Game AI (6hr) • Game Physics (3hr) • Game FX (3hr) • Network Gaming (3hr) • MMOG (3hr) • Summary • Wang’s Method for Real-time 3D Game Development
課程要求 • One term project • The students are in teams. • Use TheFly3D 3D engine to code a Real-time 3D Game. • Action RPG • The teacher will provide graphics materials and setup the game design. • Final examination • Homework will be closely coupled with the term project.
王銓彰 (1/3) • 目前 • 數位內容學院 專任講師 / 顧問 • 宇峻奧汀 顧問 • 鈊象電子 3D技術顧問 • 學歷 • 台灣大學土木工程學系畢業 • 資歷 • 04-04 資策會網路多媒體研究所 專案顧問 • 97-04 昱泉國際股份有限公司 技術長 • 96-96 虛擬實境電腦動畫股份有限公司 研發經理 • 93-96 西基電腦動畫股份有限公司 研發經理 • 90-93 國家高速電腦中心 助理研究員 • 89-90 台灣大學土木工程學系 CAE Lab 研究助理
王銓彰 (2/3) • Game作品 • Current • TheFly3D 3D Engine • 昱泉國際 • DragonFly 3D Game Engine • M2神甲奇兵, VRLobby, 天劍記 • Lizard 3D Game Engine • 幻影特攻、笑傲江湖 I & II、神鵰俠侶 I & II、風雲、小李飛刀、笑傲江湖網路版、怪獸總動員、聖劍大陸、笑傲外傳 • 西基電腦動畫 • Ultimate Fighter • 1st real-time 3D fighting game in Taiwan
王銓彰 (3/3) • 專長 (Expertise) • 3D Computer Graphics • Geometric Modeling • Numerical Methods • Character Animation • Photo-realistic Rendering • Real-time Shading • Volume Rendering • 應用領域 (Applications) • 即時3D遊戲開發 (Real-time 3D Game Development) • 電腦動畫 (Computer Animation) • 虛擬實境 (Virtual Reality) • 電腦輔助設計 (Computer-aided Design, CAD) • 科學視算 (Scientific Visualization)
1st Introduction to Game Development
Introduction to Game Development • Game platform • Game types • Game team • Game development pipeline • Game software system • Tools
Game Platform • PC • Single player • Match Makings • MMOG (Massive Multi-player Online Game) • Web-based Games • Console • Sony PS2 • MS Xbox • Nintendo GameCube • Arcade • Mobile • Nintendo GBA • Nintendo DS • Sony PSP • Hand-held
Game Development on PC • PC is designed for general office application. • Not for entertainment purpose • A virtual memory system • Unlimited system memory • But video memory is limited. • For frame buffers, z buffers, textures, vertices, … • PCI / AGP might be a problem for performance. • Open architecture • Hardware driver version issue • Different capabilities • Different performance • Compatibility test is very important. • Development is easy to setup. • Visual C/C++ with DirectX
Game Development for Consoles • Specific hardware designed for games • Single user OS • Single process OS • No hard disk drive (?) • Closed system • Native coding environment • Proprietary SDK • Hardware related features • C language with assembly • Limited resources • Memory for everything • 32M for PS2 • 64M for Xbox • One console runs, the others do ! • Use gamepad and no keyboard
Game Types • RPG (Role playing games) • AVG (Adventure games) • RTS (Real-time strategy games) • FPS (First-person shooting games) • RSLG (戰棋) • STG • Sports • Action • Puzzle games • Table games • MMORPG • Massive Multiple Player Online Role Playing Games
Game Team Members • 開發團隊 • 製作人 • 執行製作人 • 企劃團隊 • 程式團隊 • 美術團隊 • 行銷業務團隊 • 產品經理(PM) • 測試團隊 • 遊戲審議委員會 • Game project approval • 遊戲經營團隊 • 線上遊戲 game master (GM) • Customer services • MIS
Game Producer 遊戲製作人 • Team leader (usually) • 資源管理 (Resource management) • 行政管理 (Administration) • 專案管理 (Project management) • 向上負責 (Upward management) • 團隊的決策 • 風險管理
遊戲執行製作人 • 專案管理執行 • Daily 運作 • House keeping • Meeting coordinator • Schedule checking • Cross-domain communication • Usually not a full-time job position • A position for training and becoming a producer
遊戲企劃 (1/2) • 故事設計 (Story telling) • 腳本設計 (Scripting) • 玩法設計 (Game play design) • 角色設計(Character design) • 動作設計(Animation design) • 關卡設計 (Level design) • 特效設計(Effect design) • 物件設計 • 介面設計(User Interface design) • 遊戲調適 (Game tuning) • 數值設定 (Numerical setup) • AI 設計 (Game AI design) • 音效設定 (Sound FX setup)
遊戲企劃 (2/2) • 場景設定 (Scene setup) • Game document writing • Game quality checking
遊戲美術 • Visual setup for game design • 2D setup • 3D setup • Graphics design and production • 場景 (Terrain) • 人物 (Character) • 建模 (Models) • 材質 (Textures) • 動作 (Motion / Animation) • 特效 (FX) • User Interface • 行銷支援 (封面.海報..等)
遊戲程式 • 遊戲程式 (Game Program) 撰寫 • 遊戲開發工具 (Game Tools) 開發 • Level editor • Scene editor • FX editor • Script editor • Game editor • 遊戲Data exporters from 3D animation Software • 3dsMax / Maya / Softimage • Game engine development • Game technique research • Online game server development
遊戲開發流程 Basic Procedures for Game Development Idea Proposal Production Integration Testing Debug Tuning • 發想 (Idea) • 提案 (Proposal) • 製作 (Production) • 整合 (Integration) • 測試 (Testing) • 除錯 (Debug) • 調適 (Tuning) Concept Approval Prototype Pre-alpha Alpha Beta Final > Concept approval > 雛形 (prototype) > Pre-alpha > Alpha > Beta
遊戲發想(Concept Design) • 遊戲類型 (Game types) • 遊戲世界觀 (Game world) • 故事 (Story) • 遊戲特色 (Features) • 遊戲玩法 (Game play) • 遊戲定位 (Game product positioning) • Target player • Marketing segmentation / positioning • 競爭對手評估 • 風險評估 (Risk) • SWOT (Strength/Weakness/Opportunity/Threat) 分析 • 產出物 • Concept Design Document (CDD)
遊戲提案(Proposal) • 系統分析 (System analysis) • GDD 撰寫 (Game design document) • MDD 撰寫 (Media design document) • TDD 撰寫 (Technical design document) • 遊戲專案建立 (Game project) • Schedule • Milestones / Check points • Risk management • 測試計畫書 • 團隊建立 (Team building) • 產出物 • GDD • MDD • TDD • The Team
遊戲開發(Production) • 美術量產製作 • Modeling • Textures • Animation • Motion • FX • 程式開發 (Coding) • 企劃數值設定 • … 量產 !
遊戲整合(Integration) • 關卡串聯 (Level integration) • 數值調整 (Number tuning) • 音效置入 (Audio) • 完成所有美術 • 程式與美術結合 • Testing within the game team • Focus group (User study) • Release some playable levels for focus group. • Get the feedback from focus group to adjust the game play. • Invited outside game players but evaluation in-house
遊戲測試(Test) • Alpha 測試 • 除錯 (Debug) • Make the game stable • Beta 測試 • 數值微調 • Game play 微調 • 對線上遊戲而言 (MMOG) • 封閉測試 (Closed beta) • Invited game players • 開放測試 (Open beta) • Free for public players • 極限測試 (Critical testing) • Only for MMOG • Continuously implementing • For servers
Bugs Bug Bug Classification Bug Dispatch ? Debug N Verify Y FAQ • Bug 分級 (Bug Classification) • A Bug • B Bug • C Bug • S Bug • Principles • Bug 分級從嚴 • Tester vs Debugger
Game Software System NPC System Virtual Agent Trading System Story Fighting System FX System Game AI Script System Terrain Collision Character Dynamics Sound FX UI 3D Scene Mngmt 2D Sprite Gamepad Audio Network 3D Graphics API 2D API Input Device OS API Game Game Play Layer Engine Layer System Layer Hardware
System Layer – APIs (1/2) • 3D Graphics API • DirectX 9.0 SDK – Direct3D • Newest update : DirectX 9.0c SDK Update (June, 2005) • OpenGL • 2.0 • 2D API • DirectX 9.0 SDK - DirectMedia • Win32 GDI • Input device • DirectX 9.0 SDK – DirectInput • Audio • DirectX 9.0 SDK – DirectSound / Direct3DSound / DirectMedia • OpenAL
System Layer – APIs (2/2) • OS API • Win32 SDK • MFC • Network • DirectX 9.0 SDK – DirectPlay • Socket library
Engine Layer (1/2) • 3D scene management system • Scene graph • Shaders • 2D sprite system • Audio system • Gamepad • Hotkeys • Mouse • Timers • Network • DDK interface
Engine Layer (2/2) • Terrain system • Advanced scene management system • Space partition technique • BSP Tree • Octree • Character system • Bone-skin • Motion Blending • Dynamics • Particle system • Rigid-body dynamics • Collision detection • Sound FX • User interface
Game Play Layer • NPC (Non-playable characters) management • Game AI • Path finding • Finite state machine (FSM) • Steering behavior • Avatar • Combat system • FX system • Script system • Trading system • Number system • …
Game Development Tools for Programming (1/2) • System Tools • Visual C/C++ • .Net 2003 • VC/C++ 7.1 • Visual C/C++ 6.0 + SP5 • NuMega BoundsChecker • Finding memory leaking • Intel vTune • Finding computation performance bottlenecks • for CPU • PIX • Finding graphics performance bottlenecks • For GPU
Game Development Tools for Programming (2/2) • SDKs • System API • Win32 SDK or MFC • DirectX SDK or OpenGL • Socket library • Middleware (Game engine) • Renderware • Unreal • … • Physics • ODE
Game Development Tools for Artists • 3D tools • Discrete 3dsMax • Maya • Softimage XSI • 2D tools • Photoshop • Illustrator • Motion tools • Motion capture devices • Motion Builder • FiLMBOX
2nd Game System Analysis
What Will We Talk • The idea about system analysis (SA) • Mind mapping • Case study - Term project
Why System Analysis (1/2) Job A Job B Job D Job C • For 程式結構 analysis • The main program • Game development tools • To identify 工作量 • New game engine ? • Re-used code ? • Tools needed to be developed ? • For 資源 management • Total man month • How many programmers ? • How good the programmers ? • For job dependency analysis
Why System Analysis (2/2) • To do technical possibility analysis • 技術可行性分析 • R&D ? • Where is the technical bottleneck ? • Pre-processor for • Technical design document • Project management • Bridge from game design to programming
Something about System Analysis • No standard procedures or approaches • It’s not a theory. • Experience • You can use your own method/tool • UML • Mind mapping • 心智圖法 • This is the one we will use in this course • …
Wang’s System Analysis Steps • Brainstorming • Integration • Dependency analysis • Create the project • Technical design document (TDD) writing
Brainstorming • Based on the game design to put everything as many as you could • Use mind mapping • Including • Game system • Combat / Village / Puzzle / … • Program modulus • Camera / PC control / NPC AI / UI / FX /… • Tools • Level editor / Scene editor / … • Entities in games • Characters / vehicle / terrain / audio / …
Integration • Confirm the resource limitation • Technical implement possibility • Put all related items together • Man month analysis • How many ? • Who ? • Jobs / System identification
Dependency Analysis • Sort the Jobs • By job dependency • By programmers’ schedule • Prototype for scheduling
System Analysis – Create the Project • Scheduling • Job assignment • Resource allocation • Check points • Milestones • Major check points • Output • Risk management • Alternatives • Risk management policy
Technical Design Document • Specification • Resources • Design in details • Implement methods (工法) • Algorithms • “Project” • Output in each milestone • SOP (optional) • TDD Template
Mind Map • 心智圖法 • A radiant thinking tool • Applications • 讀書心得 • Proposal • 上課筆記 • 遊記 • System Analysis • … • Reference • Programs • Visio • MindManager • Books • Tony Buzan, Barry Buzan • “The Mind Map Book: How to Use Radiant Thinking to Maximize Your Brain's Untapped Potential”
Mind Map Demo Using MindManager • Use MindManager X5 pro • Developed by MindJet