Modern Game Engine Course Notes 01

Course from: BoomingTech

Introduction

What’s Game Engine? Definition from the course:

Layered Architecture of Game Engine

Simplified game engine structure:

Resource

Unify file access by defining a meta asset file format (ie.ast). Assets are faster to access by importing preprocess. Build a composite asset file to refer to all resources. GUID is an extra protection of reference.

Runtime Resource Management: A virtual file system to load/unload assets by path reference. Manage asset lifespan and reference by handle system.

Memory management for Resources - life cycle:

Function

A tick function to run the entire world within a unit of time. In tickMain, we run tickLogic and tickRender to describe how the world runs and looks.

Function Layer provides major function modules for the game engine: Object system (HUGE).

Game Loop updates the systems periodically: Game Loop is the key of reading codes of game engines.

Blur the boundary between engine and game: Camera, character and behavior; Design extendable engine API for programmer.

Multi-core processors become the mainstream: Many systems in game engine are built for parallelism.

Core

Math library: Linear algebra. The efficiency of the used functions matters very much.

Data structure and containers like vectors, maps, etc. It requires customized that outperform STL.

Memory management: the major bottlenecks of game engine performance is limited by memory pool, reducing cache miss, memory alignment. Polymorphic memory resource (PMR):

Platform

Compatibility of different platforms, provides platform-independent services and information for upper layers: File system, Path: Slash/backslash, Environment variables, Directory Traversal.

Render Hardware Interface (RHI): Transparent different GPU architectures and SDK, Automatic optimization of target platforms.

Tool

Unleash the Creativity:

Flexible of coding languages: C++, C#, HTML and CSS, etc.

How to Build a Game World

Dynamic game object

Static game object

Environments: sky, vegetation, terrain

Other game objects: air wall, trigger area, navigation mesh, etc.

Game Object (GO) is the abstraction of almost everything in the game world.

Game object:

There are problem problems with inheritance

Base game object on components. ComponentsInEngine

Object-based Tick (Intuitive)

Component-based Tick (Parallelized processing, reduce cache miss)

Events

Scene Management

Takeaways: