View on GitHub

Purpose

TimberWolf is a not-yet-production-ready game engine written in Rust. It was previously being developed using C++, but in anticipation of the direction we expect game development to go in the future, and to assist in meeting the newly-defined objectives of the language, we made the decision to switch all of the core code to use Rust.

TimberWolf has four priorities:

  1. to enable developing seamlessly cross-platform games
  2. to make game code triply safe (type-safe, memory-safe, thread-safe)
  3. to maximize performance
  4. to offer extensibility and flexibility over ease-of-use

To achieve these priorities most effectively, we also want to provide the most robust abstractions for game development that we can. Nothing is 100% set in stone quite yet, but the goal is to build the engine in a data-oriented way, and make the API as declarative as possible, with a more specific focus on organizing the entire engine around push-pull reactive state. A declarative/functional API will aid in the extensibility and flexibility, while also providing more intuitive behavior, which should make games written with TimberWolf less “buggy” than others (of course, the responsibility for ensuring this still rests with the end developer). Using the push-pull reactive state is quite a bit less certain and more experimental at the moment, but the general idea is that we can use it to make the code governing the propagation of state more declarative, succinct, and intuitive, and at the same time minimize the number of times state needs to propagate through potentially expensive functions.

The abstractions will be less of a priority than throughput performance and responsiveness, however, and where needed, the API will be lower-level in order to provide the opportunity to optimize performance to an extreme degree. Rust is a language that is compiled to machine code, and the compiler includes high quality machine code optimization. Additionally, it is a statically-typed language, and uses zero-cost compile-time abstractions to provide most of its safety features. Thus, Rust is an exceptional language to achieve performance objectives. Additionally, we will implement the latest graphics APIs, with emphasis on Vulkan, to provide the opportunity to fine-tune the graphics pipeline. TimberWolf will also include support for native multithreading and GPGPU for games with heavy computation needs.

Long-term, this engine aspires to be as cross-platform as possible. As of now, we have the ability to build upon abstractions that will enable us to target every modern graphics API out there: Vulkan, DirectX 11 and 12, OpenGL, and Metal. Eventually, we’d like to have the library support compiling to WebAssembly and WebGL, and include wrapper code for Android and iOS targets. In the (probably very-distant) future, we’d like to support targeting game consoles as well, though hardware constraints may limit us to the most PC-like consoles (sorry Nintendo).

Status

TimberWolf is still in active development, and the API is still in the alpha state. As such, it is not recommended for production work, however, if you’d like to get your hands dirty and help out with the development, that would be great!

TimberWolf is an open source project licensed under the MIT license. It goes great with any open or closed-source project, and can be used commercially (per the terms of the MIT license, read it before using it).