Expand description
This crate makes up most of the runtime engine, containing all engine
systems except for the platform-specific ones. The platform-specifics are
implemented by platform crates, which call and are called from this crate
via the platform
traits.
Since game engines consist of relatively independent systems, most of this crate is not exported in the root, but instead in the top-level modules, each exposing a distinct part of the engine.
Generic core systems and types are provided by:
allocators
: Memory allocators used by other parts of the engine, mostly collections, for allocating dynamic amounts of data. Allocators can be allocated from other allocators, and as such, the engine takes one main allocator inEngine::new
which is used directly or indirectly for all allocations made by the engine.collections
: Simple collection types oriented around up-front allocation. There are no Vec-style reallocating collections, to make using linear allocators feasible, which in turn is desirable for performance.geom
: Geometry types and related math operations.multithreading
: Utilities for spreading work between multiple CPU cores.
Specific game engine systems can be found in:
resources
: Resource/game asset types and their loading systems.renderer
: Low-level renderer.input
: Input handling.mixer
: Audio playback.game_objects
: A scene/game object/component system to build gameplay systems on.
Re-exports§
pub use profiling;
Modules§
- allocators
- Low-level memory allocators used for all dynamic allocation in the engine.
- collections
- Collection types for varying memory access patterns. Backing memory provided by allocators in the allocators module.
- game_
objects - Runtime game object model types and functionality.
- geom
- Geometry related types and operations.
- input
- Input events and their translation into game-specific actions.
- mixer
- Audio playback system and types.
- multithreading
- Utilities for splitting work to be processed in parallel.
- renderer
- Low-level graphics-related data structures and functionality.
- resources
- The resource database and everything related to querying, loading, and using assets from it.
Macros§
- define_
system - Gutputs a closure that can be passed into
Scene::run_system
, handling extracting properly typed component columns based on the parameter list. - impl_
game_ object - Generates a
GameObject
impl block for a type. - static_
allocator - Creates a static
LinearAllocator
with the given amount of bytes of backing memory.
Structs§
- Engine
- The top-level structure of the game engine which owns all the runtime state of the game engine and has methods for running the engine.
- Engine
Limits - Parameters affecting the memory usage of the engine, used in
Engine::new
.