Layers of Game Engine
Tool Layer: game editor
Function Layer: Rendering, Animation, Physics, Camera, Script
Resource Layer: geometry, sound, and other data
Core Layer: Libraries and Utility Code
Platform Layer: platform level compatibility and I/O
Offline Resource Importing
.xml
or .ast
file for defining relationship between assets and its connection to game engine
Pre-processing compressed data during compile time to make loading data faster
GUID: each assets is assigned with a global identification ID (good for moving resources)
Runtime Asset Manager: a in-memory system to reference assets
"life cycles": when a resource should be loaded, and unloaded
different resource have different "life cycles"
garbage collection and deferred loading
Assets Types:
3D model
Texture
Material
Font
Skeleton
Collision
Physics
World / Map
Ticks: plank time
Note that what belongs in function layer is still in debate. Some game-specific logic might also be in function layer.
Math Library:
Data Structure:
Example: tree, vectors, map, heap, queue, linked list, array, stack, hashing
Goal: avoid fragment memory
For: animation fragment sequence, skeleton tree
Often, the standard implementation of data structure is not enough. Game engine needs to have its own specific data structure for better performance on specific task.
Memory Management:
Major bottlenecks of game engine
Polymorphic Memory Resource (PMR)
3 Basic Rules
Virtualize Platforms
Supports Platform: Windows, MacOS, Linux
Supports Library: OpenGL, DirectX11, DirectX12, Vulkan
Supports Chips: M1, x86_64, x32
Graphical Interface and Editors
Table of Content