Changelog
This changelog is manually updated. While an effort will be made to keep the Unreleased changes up to date, it may not be fully representative of the current state of the project.
Unreleased (YYYY-MM-DD)
Added
Headline features
- Packages can now be depended on by ID and version (i.e.
id = "viyiawgsl5lsiul6pup6pyv6bbt6o3vw", version = "0.3.2-nightly-2023-12-06") instead of bydeployment. This is recommended for all future packages, as it makes it easier to understand which package is being used. See the package documentation for details.
Other
http::posthas been added to the server API to make it possible to make POST requests. It accepts optionalheadersandbodyarguments.
Changed
Breaking
- Ambient packages are no longer projected into Rust code using the
#[main]macro. Instead, a build script is used to generate asrc/packages.rs. The intent of this change is to make it obvious what’s being generated and when, as well as making the macro less error-prone. To update for this:- Add
pub mod packages;to the Rust modules with#[main]. - Add
ambient_package_projectionas a build dependency inCargo.toml. - Add
build.rsto the project root with the following contents:fn main() { ambient_package_projection::generate(); }
- Add
- Ambient will no longer update the
deploymentfield of dependencies; instead, it will insert the version of that dependency, and that version is not automatically updated. The new--versionargument can be used to update the versions of every package in your dependency tree:ambient deploy --version 0.3. http::getnow accepts optionalheaders. To update your code, setNonefor the second argument.- File I/O and the
httpAPIs are now disabled when used on a hosted environment (i.e. Ambient deployments). To test if your logic still works in a hosted environment, run Ambient with theAMBIENT_HOSTEDenvironment variable set to anything (e.g.AMBIENT_HOSTED=1 ambient run).
Non-breaking
Fixed
Community PRs to internals
These PRs are not directly user-facing, but improve the development experience. They’re just as appreciated!
Removed
Version 0.3.1 (2023-10-24)
Added
Headline features
Other
- Package/
character_movement:CharacterMovementconcept added. - Assets: Added support for animations and skinning for assimp.
- Examples: Added assimp example.
- Examples: Added benchmark/animations example.
Changed
Breaking
- Server: The logging format has changed to increase consistency, remove unnecessary logs, and improve readability.
- API:
camera::world_to_screennow returns a 3D vector instead of a 2D vector, which can be used to determine if the point is behind the camera. - Packages: Renamed the
character_controllerpackage tothird_person_controllerand added aThirdPersonControllerconcept.
Non-breaking
- Physics: The
Collisionmessage now includes the points of collision and their corresponding normals. Thanks to @kevzettler for fixing this in #1107! - Pipeline Types: A few extra types have been exported. Thanks to @kevzettler for fixing this in #1082!
Fixed
- Debugger: The debugger has now been re-enabled.
- CLI: Released
crates.ioversions are now used as the API dependency in a new project instead of git tags of the Ambient repository. - Rendering: Fixed 3D line drawing when they’re behind the camera.
- Networking: The send queue is now compacted during send to reduce queue growth when backlogged by a slow player connection.
- Web: The web client will now update its size when the window is resized.
- Rendering: Fixed an issue where a black border would appear around solid objects with an alpha cutoff (#1104).
- Rendering: Fixed water not working on the web.
- Package/
orbit_camera: Scrolling the ECS inspector will no longer zoom the camera in and out.
Community PRs to internals
These PRs are not directly user-facing, but improve the development experience. They’re just as appreciated!
Removed
Version 0.3.0 (2023-10-04)
This release involved a great many changes, including porting Ambient to the web, adding support for deployments, many API changes, and more. Not all changes may be reflected in this changelog; please let us know if you find any omissions.
Added
Headline features
- Client: The client can now run on the web.
- Deploy: The
ambient deploycommand can now be used to deploy a package to Ambient runtime services. - Audio: Spatial audio is now supported for 3D sounds. See the physics example and first_person_camera example
- Networking: The networking protocol now supports WebTransport for the web client.
- Rendering: Procedural meshes, textures, samplers and materials are now supported on the client. See the procedural generation example.
- Semantics: A semantic system to connect packages (previously projects) has been added. This enables dependencies, enums and more. See the breaking changes for more details.
Other
- UI: Added a new
ImageFromUrlelement, which can load images from assets or URLs. It also supports rounded corners, borders and a fallback background color. See the image example for more details. - Rendering: Added a
torusprimitive. Thanks to @mebyz for implementing this in #376! - Physics: Add
set_character_controller_positionto thephysicsAPI. Thanks to @devjobe for implementing this in #398. - ECS:
Durationis now a supported primitive type. - ECS: All integer types from 8-bit to 64-bit are now supported as component types, including signed and unsigned variants. Additionally, all signed and unsigned integer vector types are now supported. This includes
U16,IVec2,UVec3, etc. - Docs: The IDE documentation has been improved, including information on how to set up Emacs for Ambient development (thanks to @kevzettler in #505).
- Assets:
ambient assets importcan be used to import assets one by one. This will create or modify thepipeline.tomlfile for you. - Camera: Added
camera::get_activeto get the active camera. - Client: When using the native client, you can now use
--window-xand--window-yto specify the window position, as well as--window-widthand--window-heightto specify the window size. - Packages: A set of standard packages have been added. Explore
guest/rust/packagesto find them. These include a character controller, a focus-grabber, a package manager, and more. - Packages: Several sample games have been added, including
tangent,arkanoid,pong, and more. - Examples: Examples have been added for new functionality, including
clock,audio_ctrl,dependencies, and more. - Debugging: Sentry has been added to the client and server to automatically report crashes. This can be disabled in Ambient’s
settings.toml.
Breaking
-
Examples: Examples have been rearranged to be more discoverable. They are now grouped by category.
-
Project: Projects have been renamed to Packages; see the package documentation for details.
-
Package: As mentioned above, a new package semantic system has been added. This comes with several breaking changes:
-
In your Rust code:
- The modules generated by the Ambient macro are now different in shape. They are namespaced, with each item being present in the namespace as a separate module within the
packagesmodule, where your package isthis. For example:components::my_component->packages::this::components::my_componentambient_api::components::core::app::main_scene->ambient_api::core::app::components::main_scene- a dependency
cool_dependency = { path = "somewhere" }->packages::cool_dependency::components::my_component(i.e. the name used for the import is used, not the package ID)
asset::urlhas been removed; instead, each package now introduces anassetsmodule, allowing you to access that package’s assets directly. For example:asset::url("assets/Teapot.glb").unwrap()->packages::ambient_example_asset_loading::assets::url("Teapot.glb")
- UI layout components now use enums to specify their alignment. For example:
with_default(fit_vertical_none())->with(fit_vertical(), Fit::None)
- Messages now preserve the order of their fields.
- If your fields are
a, c, b, they will be in that order in the generated code. - Previously, they were sorted alphabetically.
- If your fields are
- The modules generated by the Ambient macro are now different in shape. They are namespaced, with each item being present in the namespace as a separate module within the
-
In your
ambient.toml:-
Specifying a
versionis now mandatory. -
Specifying a
contentis now mandatory. -
Messages now have PascalCase IDs:
messages.set_controller->messages.SetController
-
Enums are now supported; they are defined as follows, and can be used anywhere a primitive type can be used, including components and messages.
[enums.Layout] description = "The type of the layout to use." [enums.Layout.members] Flow = "Bottom-up flow layout." Dock = "Top-down dock layout." Bookcase = "Min-max bookcase layout." WidthToChildren = "Width to children." [components] layout = { type = "Layout" } -
Packages can now depend on other packages, allowing for access to their components, messages, etc. This is done by adding a
dependenciessection to your package. For example:[dependencies] my_cool_package = { path = "cool_package" }This will allow you to access the components, messages, etc. of the
my_cool_packagepackage from your package. The name that you use to import the package will be used as the namespace, not the package’s original ID.
-
-
-
Components: Several “tag components” have been prefixed with
is_to indicate their tag nature. These include:core::animation::animation_player->core::animation::is_animation_playercore::audio::audio_player->core::audio::is_audio_playercore::audio::spatial_audio_player->core::audio::is_spatial_audio_playercore::layout::screen->core::layout::is_screencore::network::persistent_resources->core::network::is_persistent_resourcescore::network::synced_resources->core::network::is_synced_resourcescore::player::player->core::player::is_playercore::wasm::module->core::wasm::is_modulecore::wasm::module_on_server->core::wasm::is_module_on_server
-
API: Locally-broadcasted messages can now choose to include the originating module in the broadcast; this is an additional boolean parameter to
ModuleMessage::send_local_broadcastandmessage::Target::LocalBroadcast. -
Camera: Renamed
screen_to_world_directiontoscreen_position_to_world_rayandclip_space_raytoclip_position_to_world_ray. See #410. -
Package:
type = { type = "Vec3" }is no longer valid syntax inambient.toml. Onlytype = "Vec3"andtype = { type = "Vec", element-type = "Vec3" }are valid. -
Physics: Renamed the
visualizingcomponent tovisualize_collider. -
Animation: The animation system has been reworked. See the animation documentation for details. Thanks to @devjobe for laying the foundation for this!
-
Physics: Renamed
box_collidertocube_collider. -
API: The
timefunction has been split intogame_timeandepoch_time. Thedtimecomponent has been renamed todelta_time. Theframetimefunction has been renamed todelta_time. -
Assets: Asset pipelines now use TOML instead of JSON. Use the
ambient assets migrate-pipelines-tomlcommand to migrate. (Note that this command will be removed in the next release.) -
API: Removed
Entity::with_defaultdue to its confusing behaviour (Rust defaults are not necessarily the same as component or concept defaults). You will now have to explicitly specify a value for each component. -
API:
entity::wait_for_componentis now marked asmust_useto ensure users consider the possibility of the entity being despawned. -
Elements: All hooks are now free functions (i.e.
use_state(hooks, ..)instead ofhooks.use_state(..)) -
UI: Focus is now global across different packages, including the removal of the
FocusRootelement component. -
Hierarchies: The
childrencomponent is now automatically derived fromparentcomponents (unless the user opts out of this). Thechildrencomponent is also no longer networked, as it is automatically derived on the client. -
Concepts: Concept code generation has been changed to generate
structsinstead, as well as adding support for optional components. See the documentation for more information.
Non-breaking
- Logging: The logging output levels have been tweaked to better communicate the state of the system at any given time.
- Debugger: The debugger has been improved with a resizable sidebar, a scrollable view, and a component filter.
- Animation: The animation graph is now executed on the server as well.
- CLI: The
ambient newcommand now takes several parameters to customize the resulting generation. - Rendering: The renderer now runs using the direct pipeline on all architectures. This is temporary until platform-specific issues with the multi-draw indirect pipeline are addressed.
Fixed
- Rendering: Skinned meshes will no longer be corrupted when there is more than one skinned mesh in a mesh buffer.
- UI:
TextEditorwill no longer capture input even when it is not visible. - Rendering: Decals now render more consistently.
- API:
entity::wait_for_componentwill now exit if the entity is despawned. - API: The
message::Sourcemethods no longer consume the source when returning their data. - Rendering: Lines with a
fromlocated after atoon the X-dimension will now render correctly. - API: The
entity::mutate_componentdocumentation now refers to the correct parameter. Thanks to @aldzban for fixing this in #482. - UI: The
ScrollAreanow has a scroll bar. - Input: Input is now cleared when the window loses focus, preventing “stuck input” bugs.
- UI: Layout-related properties, like alignment and fit, did not work correctly for certain values. This has been fixed with the introduction of enums.
- Player: Player entities are now recursively despawned when disconnecting.
- Build: Rust compilation errors are now more readable with more colors and fewer unused warnings.
- ECS: The
transformableconcept now includeslocal_to_worldto ensure that the world transform is always available. - Physics: The
physics::raycast[_first]functions will now validate the direction to ensure that they are non-zero, non-NaN and normalized. - Rendering: Removing the
outline_recursivecomponent from a entity will now remove the outline from its children as well. - API: The
ambient_uiprelude (and theambient_apiprelude, by extension) no longer glob-imports components into the global namespace. This means that you will need to import components explicitly. - Messaging: Messages without empty fields now generate a unit struct, instead of a struct with no fields. That is, they generate
struct MyMessage;instead ofstruct MyMessage {}. - Physics: Child collision volumes are now automatically updated when their parent’s transform changes. Thanks to @kevzettler for fixing this in #885!
Community PRs to internals
These PRs are not directly user-facing, but improve the development experience. They’re just as appreciated!
Changed
Removed
Version 0.2.1 (2023-05-06)
Fixed
- API: The API documentation is now built only for the
wasmtarget ondocs.rs.
Version 0.2.0 (2023-05-05)
Added
Headline features
- API: Guest code can now create and interact with UI. See the UI examples.
- API: Guest code can now run on the client. See the
clientsideexample. - API: Clientside guest code can now play basic audio. See the
pongexample. - Server: By default, a proxy URL is generated for the server on startup. This can be used to access a running server from anywhere on the internet, making it easy to share your work with others. To turn this off, specify
--no-proxyon the server command line.
Other
- API: Kinematic bodies are now exposed. This is used by the minigolf example to provide its moving obstacles.
- API: Added
physics::move_characterfunction to correctly move character controllers. This is used by the third-person camera example. - API:
Uvec2/Uvec3/Uvec4/U8can now be used for component values. - API: A new
messageAPI has been added to allow for sending messages between client and server WASM, and from one WASM module to another. Messages are defined inambient.tomland are structured. Message subscriptions return handles that can be used to cancel their subscriptions. - API: A new
cameraAPI has been added on the client for operations that involve the camera, includingscreen_rayfor calculating a ray from the camera through a screen position. Thanks to @owenpalmer for implementing this in #316. - API: A new
inputAPI has been added for retrieving input and manipulating the cursor (including changing its icon, visibility and lock state). - API:
physics::{add_impulse, add_force_at_position, add_impulse_at_position, get_velocity_at_position}have been added. - API: Added
create_revolute_jointto thephysicsAPI. - API: Added a capsule concept with corresponding components.
- API: Several animation manipulation functions have been added to
entityandasset. Thanks to @devjobe for implementing this in #362. - Physics: A
collider_loadedcomponent will now be automatically attached to an entity once its collider has finished loading. - Client: The client’s window title is now automatically changed to the name of the project running on the server. Thanks to @MavethGH for implementing this in #178.
- Client: Added a basic headless mode to enable automatic CI testing of projects.
- Client: Added
Dump UI Worldbutton to inspect the state of the UI. Thanks to @owenpalmer for implementing this in #216.
Examples
- A suite of UI examples have been added to demonstrate how to use the UI in guest code.
- The
clientsideexample shows how to use clientside WASM. - The
messagingexample shows how to message the server from the client and vice versa, and how to message another module with both broadcasts and directed messages. - The
pongexample implements a basic version of Pong to demonstrate a basic multiplayer game. - The
fogexample shows how to configure fog in the renderer for more atmospheric scenes. - The
first_person_cameraexample shows how to implement a first-person camera. - The
music_sequencerexample shows how to use the audio and UI API to build a basic music sequencer. - The
decalsexample shows how to use decals to add detail to a scene. Thanks to @kevzettler for implementing this in #347.
Changed
Breaking
- Client:
--debugis now--debugger, but it can also be accessed through theAMBIENT_DEBUGGERenv variable. - API: The
Cargo.tomlhas changed to enable clientside builds. Please look at the examples to see how to update yourCargo.tomlappropriately. - API:
ChangeQueryhas been split intoUntrackedChangeQueryandChangeQueryto ensure thattrack_changeis called before the query is built. - API:
asset_urlhas moved toasset::url. - API:
EventResultandEventOkhave been renamed toResultEmptyandOkEmptyto better clarify their purpose. - API: The physics API has been revamped to better encode the physics engine’s capabilities.
physics::apply_forceis nowphysics::add_force.physics::explode_bombis nowphysics::add_radial_impulse, and takes aFalloffRadiusenum.
- API: All input functionality has moved to
inputon the clientside. - API: The
lookat_centercomponent has been renamed tolookat_target. - Physics: Convex shapes are now used if a body is neither static or kinematic.
Non-breaking
- Ambient: Ambient is now dual-licensed MIT/Apache2, in accordance with the rest of the Rust ecosystem.
- Ambient: The default logging settings now better communicate what Ambient is doing at any given moment.
- Project: Concept definitions in projects now support namespaces. Thanks to @ArberSephirotheca for implementing this in #212.
- API: Concepts now include the components they use in their doc comments.
- API:
#[main]-attributed functions no longer have to beasyncor return aResult. - API:
#[main]-attributed functions,on,once,Query::bindandrun_asynccan now return aResultor nothing. - Project: Project manifests can now be split into multiple files using
includes.
Fixed
- Ambient: Various stability and performance fixes.
- Ambient: Added attributions for external code.
- Ambient: Typo fixes. Thanks for the following!
- Examples: The Minigolf example now has several gameplay tweaks (including camera movement on right-click) to improve the experience.
- Examples: The examples no longer occasionally use non-one alpha colours, which led to them rendering black objects.
- Server: The server no longer shuts down automatically after a period of inactivity.
- ECS: A bug with ECS component versioning that led to certain components not updating has been fixed. Fixes #113.
- Networking: Various optimizations have been made to networking and the ECS to reduce unnecessary network traffic.
Community PRs to internals
These PRs are not directly user-facing, but improve the development experience. They’re just as appreciated!
- CI: Linux CI builds now output the tree of their target to assist in debugging CI cache blow-up. Thanks to @daniellavoie for implementing this in #170.
- ECS:
Entity::assert_allcan be used to ensure all components for anEntityon the host have an attribute. Thanks to @MavethGH for implementing this in #211. - App:
ambient newuses the correct path for relative API when creating a project inguest/rust/examples. Thanks to @owenpalmer for implementing this in #218. - Ambient: The presentation of the license in the repository was improved. Thanks to @C-BJ for #201 and #203.
- Ambient: The book and build CI workflows now only run when relevant files are updated. Thanks to @C-BJ for implementing this in #202.
- Audio: The audio asset pipeline now uses Rust libraries for re-encoding files, instead of shelling out to ffmpeg. Thanks to @marceline-cramer for implementing this in #317.
- Rendering: Ambient now runs on wgpu 0.16, improving compatibility and providing access to new features. Thanks to @kevzettler for implementing this in #308.
- Campfire: The internal development tool Campfire can now automatically check release-readiness. Thanks to @kevzettler for implementing this in #356.
Removed
- API:
player_camerahas been removed, and the components it instantiated are now directly exposed. See themultiplayerexample to see what’s changed. - API: Events have been removed and replaced with the more general-purpose
messageAPI.
Version 0.1.1 (2023-02-22)
Added
- A minigolf example by SK83RJOSH.
- Examples are now bundled into a downloadable
examples.zipfor each release.
Fixed
- macOS ARM64 builds are now available after enabling the execution of unsigned executable memory (as required for wasmtime execution).
- The debugging configuration for VSCode was updated to use the new CLI.
- Minor documentation updates.
Version 0.1.0 (2023-02-22)
Initial release. See the announcement blog post.