After a year of development, the first release of the new open-source game engine Ambient has been presented. The engine provides a runtime for creating multiplayer games and 3D applications, compiled to WebAssembly and utilizing the WebGPU API for rendering. The code is written in Rust and is distributed under the MIT license.
A key objective in the development of Ambient is to provide tools that simplify the creation of multiplayer games, making it no more complicated than single-player projects. The engine is designed to create a universal runtime supporting game and application development in any programming language that can be compiled to WebAssembly intermediate code. However, the first release currently only supports development in Rust.
Key features of the new engine:
- Transparent support for networking. The engine combines client and server functions, providing all the necessary components for building client and server logic, as well as automatically synchronizing the server's state to clients. Both the client and server use a shared data model, simplifying code transfer between the backend and frontend.
- The ability to run each module in its isolated environment, allowing for the limitation of the impact of untrusted code. A module's crash does not cause the entire application to crash.
- Data-oriented architecture. Providing a data model based on a component system that each WASM module can manipulate. Utilizing the ECS (Entity Component System) design pattern. Storing data for all components in a centralized database, server, the state of which is automatically replicated to the client, which can then extend the data according to its local state.
- The ability to create Ambient modules in any programming language that can be compiled to WebAssembly (currently only Rust is supported).
- Generating universal executables that can run on Windows, macOS, and Linux, functioning as both a client and a server.
- The ability to define custom components and 'concepts' (collections of components). In projects using the same components and concepts, portability and data sharing are ensured, even if the data is not specifically designed for use in particular projects.
- Support for compiling resources in various formats, including .glb and .fbx. Streaming resource loading over the network is possible—clients can receive all the necessary resources when connecting to the server (players can start playing without waiting for all resources to load). Formats supported include FBX and glTF models, as well as various audio and image formats.
- An advanced rendering system utilizing the GPU for accelerated output, supporting visibility zone culling and level of detail switching on the GPU side. By default, it employs physically-based rendering (PBR), supports animations, and cascaded shadow maps.
- Support for simulating physical processes based on the PhysX engine.
- A user interface construction system similar to React.
- A unified input system that is independent of the current platform.
- A spatial audio system with plug-in filters.
Development is still in the alpha stage. Notable unimplemented features include the ability to launch in Web, client API, multithreading management API, library for creating user interfaces, API for using custom shaders, audio support, loading and saving ECS (Entity Component System) components, hot resource reloading, and automatic scaling. servers, a collaborative editor for creating game maps and scenes.

Source: opennet.ru
