开篇就是一个非常赞的图标,显示了一个粗略的游戏engine的结构,尽管只是粗略,但是已经占了整整一页,相当赞。
读这里突然就觉得花钱买这个书和花时间读这个书绝对值得的。
想自己写engine的可以根据这个骨架进行设计会很棒。
简单文字复述一下这个图:
首先是engine以外的基础部分
* 底层硬件
* drivers
* operating system
* 第三方的sdk:
- directx, opengl
- havok, phyx,
- ode----open source的
- boost----这个的online文档可以学到居多的计算机知识,唔,以后得好好见识一下
- stl, stl port----可能的话还是自己写一个的好
- kynapse(autodesk ai中间件)
- euphoria----真是紧跟时代步伐啊
- 。。。
core:
- module start up/shutdown
- assert
- unit test
- memory management
- math
- string
- log
- parser(xml, csv)
- profiling/stats gathering
- engine config
- random num(囧,这也列啊)
- rtti/reflection : reflection不是很了解的话可以看这个, 一般我们都把rtti和reflection一起说的。
- serialization
- object handle/unique id
- asynchronous file i/o
platform independence layer(一般都是放在core里面啊)
- atomic data types
- collection&iterations
- file system
- network transport
- timer
- threading
- graphics wrapper
- phys wrapper
engine part:
front end:
visual effects:
- (hdr)lighting
- shadow
- prt lighting/subsurf scatter
- particle
- decal
- post fx
- environment mapping
- ...
scene graph
- space management
- occlusion
- lod
low level render:
- material/shader
- static/dynamic lighting
- camera
- text/font
- primitivs/submission
- viewport
- texture/surface
- debug visualizer
这里值得一提的是很多功能强大的effect系统,里面维护particle,decals等等的系统部分。
profiling/debuging
- record/playback
- memory/performance stats
- in game menu or console
这一块的工具对于大型游戏至关重要,很多游戏都有一些内部工具让profiling更加一目了然
- 可以profile一个block的profiling tool
- 在screen上实时显示statistics,当前画了多少primitives等
- dump performance详细信息到文本文件中,再用可视化工具显示出来
- memory dump工具
- debug信息的分类
- replay系统
collision/physics
- forces/constraints
- ray/shape casting
- rigid body
- phantoms
- shapes/sollidables
- physcs/collision world
audio
- dsp/effects
- 3d audio model
- audio playback/management
skeletal animation
- animation state tree&layers
- LERP and additive blending
- inverse kinematics
- animation play back
- animation decompression
- hierarchical object attachment
- game specific post processing(?)
- sub-skeletal animation
这里skeleton是我最喜欢的技术,尽管道理很简单,但是思想非常好,像普通的碰撞一类的,就是更新一些位置什么的,相对和其他系统的关联度很小,结构也算是分离的很好。
skinning是把animation和render联系起来,之所以这么做是为了效率,yes,效率。
做了这样一个把render和animation关联起来的事情之后,本来做不到的事情可以做到了,skinning的bonedata成为一种简约的压缩数据,然后利用gpu端强大的计算能力把简单数据放大成复杂模型的动画,这个思想必将在游戏中更加的大有所为。
gameplay foundations:
- static world elements
- dynamic game object model
- real time agent based simulation
- event/message system----game obj的通信
- world loading/streaming
- script system----提高开发效率
- high level game flow system
- ai foundation----寻路,行为,line check...
game specific subsystem
这个每个游戏就见仁见智了。
抄的好爽,都学下来实践下来真得好多年啊。
- 写的时候底层不要依赖上层-----这个虽然是共识,是个人都知道,但是至今为止在工作过得所有项目都见过这种下层依赖上层的情况,就是太tmd懒了。