Leafwing-Studios / leafwing_manifest

Data-driven content generation for Bevy
Apache License 2.0
73 stars 2 forks source link

Demonstrate how to use mutable manifests #35

Open alice-i-cecile opened 7 months ago

alice-i-cecile commented 7 months ago

The MutableManifest trait exists, but isn't taught in an example. From the dynamic_manifest draft example:

//! While manifests are typically defined once and then used throughout the lifetime of the application,
//! there are cases where you may want to dynamically generate or modify a manifest at runtime.
//!
//! For example, you may be working with user-generated content, have a modding system that allows players to add new content to the game,
//! or simply have more content than you can fit into memory at once.
//!
//! By mutating the contents of our manifest at runtime, we can add (and remove!) game objects to the game world as needed.

Good scalable patterns here aren't fully clear right now, dynamically loading and unloading content based on e.g. levels is probably the right way to tackle this. As a result, this ties into #2.