Before we start, we should think a little bit about how the overall architecture (in terms of crates and their responsibilities) should look like.
High-level architecture
The engine will be structured as a monorepo with a root workspace and several crates. And this is how I envision them:
praxis_core
Engine lifecycle management (startup, shutdown, main loop), configuration loading and management, time management (delta time, timers), core traits and types used across the engine.
praxis_window
Window creation and management, event loop integration. To avoid dealing with the low-level details of the windowing system, I will base the windowing logic on winit
.
Depends on praxis_core
.
praxis_input
Handling keyboard, mouse, gamepad input.
Depends on praxis_window
and praxis_core
.
praxis_graphics
Rendering abstraction layer. Defines traits for renderers, resources (textures, meshes, shaders), pipelines. As I said before, I will not be doing raw Vulkan or vulkano
, but I will be using wgpu
as a multi-backend abstraction.
Depends on praxis_core
, praxis_window
and praxis_math
.
praxis_math
Provide core mathematical types and operations for graphics and physics. Likely will re-export types from glam
(Vector, Matrix, Quaternion).
praxis_ecs
Entity-Component-System implementation.
This one will be very probably be heavily based on bevy_ecs
.
Depends on praxis_core
.
praxis_scene
Scene representation and management, scene graph for spatial organization, camera management.
Depends on praxis_ecs
, praxis_core
and praxis_math
.
praxis_assets
Asset loading, management, and caching, asynchronous loading capabilities.
Depends on praxis_core
.
praxis_audio
Audio playback and spatialization.
Depends on praxis_core
and praxis_assets
.
praxis_physics
Physics simulation (collision detection, rigid body dynamics).
Depends on praxis_core
, praxis_ecs
and praxis_math
.
praxis_gui
Debugging and editor tools GUI. I'll most likely use imgui
, gpui
or egui
.
Depends on praxis_core
, praxis_graphics
, praxis_input
and praxis_window
.
praxis_scripting
LUA VM and bindings, logic and execution of game scripts.
I'll do this through mlua
.
Depends on pretty much everything, but mostly praxis_ecs
, praxis_assets
, praxis_input
and praxis_scene
.
praxis_utils
Common utilities shared across crates. Here lies logging, serialization, and other utilities, file system access and etc.
It will very likely change, but, mixed with the roadmap, it will let me get started and going for a while.
The next step is to set up the workspace and the crates and get a window showing up. So stay tuned for that.