| The PC game industry has been developing fast. Game engine is a platform which handles core techniques of game. With game engine, developers don't need too much attention to cope with low level techniques such as system architecture, memory management, image rendering. Rather developers can use APIs provided by game engine to shorten the developer cycle. As core part of game, game engine are facing problems such as scale complexity and technique diversity. To control these problems, this article makes functional analysis and architectural design of game engine from perspective of programming language and design pattern, and makes game engine component based.This article analyzes and collects several useful techniques of game engine. By component based hierarchy and modular design, every part of game engine' implementation technique is researched. First, by functional analysis of a game engine, four modules are made: core object, graphics system, support function and extended function.Then from perspective of functional definition, core object consists of scene management, scene query and several scene objects management; graphics system consists of buffer management, 3D geometry computation, GPU program, shadow management, rendering management, render state and render system; support function contains animation, font, file system, input, media, overlay, particle system, script and math library; extended function contains windows platform, Direct3D9 render system, particle system library, physics, Cg support and indoor scene management. In implementation, this article designs classes with members describing every part of game engine using design patterns, with detailed research on several core parts such as scene manager.Through architectural design and functional analysis of game engine, we make a clearer view of game engine's role in game development and some of its graphics techniques. Meanwhile through component based design and implementation of multifunctional game engine, game engine can be more clear architectural, easier of use and extend. This article also gives a valuable reference on how to interact and arrange every part of system, as to control system's complexity. |