Más contenido relacionado La actualidad más candente (19) Similar a Heliumエンジンの設計と実装 (20) Heliumエンジンの設計と実装4. アジェンダ
• Helium エンジンとは
• 外部ライブラリ
• 基礎ライブラリ
• システム設計
• 描画
5. Helium エンジンとは
• オープンソースのゲームエンジン
• github で公開されている
https://github.com/HeliumProject/Helium
• Insomniac Games のオープンソースプロジェク
トをベースに Whitemoon Dreams が開発を引き
継いだ
• Nocturnal Initiative によると、初版は 2008 年ら
しい
10. 対象プラットフォーム
• 言語: C++
• OS:Windows(32bit,64bit)
• グラフィックス :DirectX9
• CPU:x86(32bit,64bit)
• コンパイラ (CL,GCC,SNC)
• Posix 関係のファイルは存在するが、未実
装になっている
14. 外部ライブラリ
• TBB(Intel Threading Building Blocks)
• wxWidgets(A cross-platform GUI and tools
library for GTK)
• nvtt(nvidia-texture-tools)
• P4API.NET(Perforce for the .NET)
16. アジェンダ
• Helium エンジンとは
• 外部ライブラリ
• 基礎ライブラリ
• システム設計
• 描画
17. Container
• ArrayIterator
• BitArray, DynArray
• Map,Set
• HashMap,HashSet
• SortedMap, SortedSet
• Pair
• RbTree
• Table
• ObjectPool
18. Memory
• ArrayPtr
• AutoPtr
• エンディアン変換
• SmartPtr
• 参照カウンタ
19. Checksum
• Crc32
• MD5
• Hash64
http://burtleburtle.net/bob/c/lookup8.c
• MurmurHash
http://tanjent.livejournal.com/756623.html
22. Inspect
• Button や CheckBox 、 ColorPicker など GUI
関係のクラス
• SceneGraph:: CreateTool で使われている
→ ゲーム内のデバッグ用 GUI 表示かもしれ
ない
http://nocturnal.insomniacgames.com/index.ph
p/Inspect
27. 衝突形状
• FPU 実装と SIMD 実装が用意されている
• AABB
• OBB
• Line
• Frustum
• BoundingSphere
→point list の中にある最小球を求める関数など
がある
28. SIMD
• _mm_load_ps といった SSE による実装
• Vector 、 Matrix 、 Quaternion など基本的
なものは SOA でも提供されている
• SSE 関数をラップした Load と Store が用意
されている
• typedef __m128 Register 型でアクセスする
30. メモリ管理
• dlmalloc(by Doug Lea) か nedmalloc(by Niall
Douglas) を使用する
• http://www.nedprod.com/programs/portable/
nedmalloc/
• https://github.com/ned14/nedmalloc
→ マルチスレッドでロックフリーなメモリア
ロケータ
31. DynamicMemoryHeap
• dlmalloc や nedmalloc にクリティカルセク
ションによるロックと、メモリトラッキン
グ機能を付けたもの
→ メモリ確保時のアドレスを記録しておく
hash_map< void*, void* Addresses[ BACKTRACE_DEPTH_MAX ] >
32. アジェンダ
• Helium エンジンとは
• 外部ライブラリ
• 基礎ライブラリ
• システム設計
• 描画
34. World
• Layer と GraphicsScene を保持している
• Entity の生成を行う
• TickCount や Update 処理は WorldManager
が行う
35. Layer
• Entity を保持している
• Package を管理している
• 以下の 2 種類がある
→ Level layers
Package からファイルを読み込んで構築される
→ Dynamic layers
レベルエディタで動的に変更出来る
39. GameObject
• フラグや名前、 ID を保持するクラス
• 以下のクラスの基底になっている
• Package
• Resource
• ResourceHandler
• Entity
• Layer
• World
• GraphicsConfig
• GraphicsScene
43. job の種類
• SortJob
• WorldManagerUpdate
• EntityPreUpdate
• EntityPostUpdate
• その他グラフィックス用に幾つか
45. アジェンダ
• Helium エンジンとは
• 外部ライブラリ
• 基礎ライブラリ
• システム設計
• 描画
51. プリミティブ
• Axes
• Capsule
• Circle
• Cone
• Cube
• Cylinder
• Frame
• Grid
• Locator
• Pointer
• Radius
• Rings
• Sphere
53. Rendering クラス
• Index Buffer , Vertex Buffer
• Input Layout
• Vertex Shader , Pixel Shader
• Constant Buffer
• Surface
• Texture
• 各種 RenderState
…
62. 今回解説しきれなかった箇所
• C++ Reflection
• Instrumenting Profiler
• Debugging Helpers
• Perforce Integration
• Build