Crate covalent[−][src]
The covalent
crate is a fast, safe, data-driven, modular game engine.
Goals
Covalent aims to accomplish the following goals, in this order (top is most important)
- Modularity. It should be relatively straightforward to rip out a part of covalent’s architecture and replace it with your own code if you need it. You should be able to choose between many different options for your specific use case. For example, covalent uses an entity-component system (ECS).
- Safety. In applications as complex as a game, obscure bugs can surface often. Covalent aims to make sure that your code is as safe as possible, leveraging Rust’s type system and borrow checker to avoid race conditions and other similar problems.
- Speed. Covalent uses the
rayon
crate along with a thread-safe entity-component system to automatically spread your work across all available CPU cores.
Non-Goals
Covalent also specifically aims to not achieve certain outcomes.
- Integrated game development platform. Due to covalent’s modularity, it would be impossible to create a Unity/Unreal/Godot-style development app suited to every game. Instead, it would be a better idea to write tools that allow you to make your game inside the game itself.
Re-exports
pub use cgmath; |
Modules
events | This module contains commonly-used events in covalent.
You can create custom events by implementing the |
graphics | |
input | Code copied from |
scene | A scene is essentially everything that the user can see or hear, and anything that interacts with that. |
Macros
lock_data | A macro to generate a struct containing a list of fields that may be locked. This allows for more intuitive concurrency, by abstracting away the lock-unlock logic and potential lock mishaps. |
Structs
Context | A context that encapsulates the behaviour of an application run with covalent. This contains all the functions that the graphics backend will execute when the given event occurs. |
DisplayHints | Hints to use when constructing the display window. |
InterpolatedStopwatch | A stopwatch (in covalent) is an object that counts the time between events.
An interpolated stopwatch counts the time between successive events, and calculates the average
time between those events, by storing the times of the last |
Functions
execute | Construct a covalent context from the given backend, then executes the application defined by this Covalent context. Only create a single context during the lifetime of your application, and only create this context on the main thread! |
pt1 | Convenience constructor for a one-dimensional point. |
pt2 | Convenience constructor for a two-dimensional point. |
pt3 | Convenience constructor for a three-dimensional point. |
vec1 | The short constructor. |
vec2 | The short constructor. |
vec3 | The short constructor. |
vec4 | The short constructor. |