本帖最后由 梦幻小子 于 2014-8-17 16:21 编辑
第一章导论
When I got my first game console in 1979—away-cool Intellivision system by Mattel—theterm “game engine” did not exist. Back then, video and arcade games wereconsidered by most adults to be nothing more than toys, and the soft ware that made them tick was highly specialized to both thegame in question and the hardware on which it ran. Today, games are amulti-billion-dollar mainstream industry rivaling Hollywood in size and popularity. And thesoft ware that drives these now-ubiquitous three-dimensional worlds—gameengines like id Soft ware’s Quake and Doom engines, Epic Games’ Unreal Engine 3 and Valve’s Source engine—havebecome fully featured reusable soft ware development kit s that can be licensedand used to build almost any game imaginable.
我在1979年得到我的一部Mattel游戏机——一个很酷的游戏系统Intellivision,当时所谓的“游戏引擎”概念是不存在的。后来,电子游戏和街机游戏被大人们认为只不过是玩具,这使得软件和硬件都是为某个游戏专门定制的。今天游戏产业已达到几十亿美元总值,与好莱坞的规模和知名度可以相当。现时无处不在的三维游戏时间,都是由游戏引擎驱动发展,像id公司的雷神之锤和Doom游戏引擎,Epic Games的虚幻3游戏引擎还有和Valve的起源游戏引擎,已成为全功能可重用的软件开发包,在被授权后可以开发出几乎任何游戏。
While game enginesvary widely in the details of their architecture and implementation,recognizable coarse-grained patterns are emerging across both publicly licensedgame engines and their proprietary in-house counterparts. Virtually all gameengines contain a familiar set of core components, including the renderingengine, the collision and physics engine, the animation system, the audiosystem, the game world object model, the artificial intelligence system, and soon. Within each of these components, a relatively small number of semi-standarddesign alternatives are also beginning to emerge.
虽然不同的游戏引擎在体系结构和实现细节上有很大的区别,但无论是公开授权使用的游戏引擎还是私有的公司内部引擎,都呈现出一些粗粒度模式。几乎所有游戏引擎都包含了一些熟悉的核心组件,包括渲染引擎、碰撞和物理引擎、动画系统、音频系统、游戏世界中的对象模型、人工智能系统等等。在这些组件中的每一个,一个相对小型的半标准设计模式也开始出现。
There are a great many books that coverindividual game engine subsystems, such as three-dimensional graphics, inexhaustive detail. Other books cobble together valuable tips and tricks acrossa wide variety of game technology areas. However, I have been unable to find abook that provides its reader with a reasonably complete picture of the entiregamut of components that make up a modern game engine. The goal of this book,then, is to take the reader on a guided hands-on tour of the vast and complexlandscape of game engine architecture.
有相当多的书涵盖个人游戏引擎子系统,像三维图形,它们有详尽的细节。也有一些书籍把有价值的提示和技巧通过各种各样的游戏技术领域东拼西凑起来。然而我们一直无法找到一本书为作者提供一个关于现代游戏引擎的完整图景,本书的目的就是把作者引入亲身体验的庞大而复杂的游戏引擎图景。
In this book you will learn 1 how real industrial-strength production gameengines are architected; 2 how game development teams are organized and workin the real world; 3 which major subsystems and design patterns appearagain and again in virtually every game engine; 4the typical requirements for each major subsystem; 5which subsystems are genre- or game-agnostic, andwhich ones are typically designed explicitly for a specific genre or game; 6 where the engine normally ends and the gamebegins.
在这本书中,你将学习到: 1真正的工业级游戏引擎是如何被构建的; 2真实世界中的开发团体是如何组织和工作的; 3每一个主要子系统的真正需要; 4哪些子系统是通用型的,哪些子系统是专门为特定的游戏种类设计的; 5游戏引擎正常结束和游戏开始的位置;
We’ll also get afirst-hand glimpse into the inner workings of some popular game engines, suchas Quake and Unreal, and some well-known middleware packages, such as the HavokPhysics library, the OGRE rendering engine, and Rad Game Tools’ Granny 3Danimation and geometry management toolkit.
我们也会亲自窥探一些流行游戏引擎的内部运作,像雷神之锤和虚幻引擎,还有一些知名的中间件软件包,比如Havok物理引擎、OGRE的渲染引擎、和RAD公司的Granny三维动画工具和几何管理工具包。
Before we get started, we’ll review sometechniques and tools for large scale software engineering in a game enginecontext, including 1the difference between logical and physical softwarearchitecture; 2configuration management, revision control, andbuild systems; 3some tips and tricks for dealing with one of thecommon development environments for C and C++, Microsoft Visual Studio.
在我们开始之前,我们将回顾对于在游戏引擎方面的一些大型软件工程的技术和工具,包括: 1逻辑和物理软件架构的区别; 2配置管理、版本控制和建立系统; 3一些关于搭建C或C++共同开发环境的提示和技巧——微软的VisualStudio;
In this book I assume that you have a solidunderstanding of C++ (the language of choice among most modern game developers)and that you understand basic soft ware engineering principles. I also assumeyou have some exposure to linear algebra, three-dimensional vector and matrixmath, and trigonometry (although we’ll review the core concepts in Chapter 4).Ideally you should have some prior exposure to the basic concepts of real-timeand event-driven programming. But never fear—I will review these topicsbriefly, and I’ll also point you in the right direction if you feel you need tohone your skills further before we embark.
在本书中,我假定你有一个对C++(大多数现代游戏开发商都会选择的语言)的坚实理解和你了解基本的软件工程原理。我也假定你有一些对线性代数的理解、三维矢量和矩阵数学,还有三角学(虽然我们会在4章中回顾这些核心概念)。理想情况下应该是你也应该有一些基本概念和事件驱动编程。但没有必要恐惧——如果在我们着手之前你觉得你需要进一步磨练你的技巧,我们将回顾这些主题,也会告诉你正确的方向。
|