ECS optimized custom binary scene format
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Bevy's current scene format currently supports loading an entire scene from a single serialized buffer. This is pretty useful for debugging and human readability, but can be inefficient at runtime to load and copy and uses more space on disk than is desirable for sending to users, both in normal disk storage and over the wire for network transfers.
## What solution would you like?
A custom binary scene format that leverages the specific format of ECS internals. Boiled down, a `Table` is realistically a keyed `Slab>`, and the format can mirror this format efficiently. By tightly packing identical components together on disk in a binary format, deserialization can be massively accelerated, and potentially parallelized.
Each `Column` could be serialized as a single contiguous buffer on disk, which can be read sequentially into intermediate buffers and submitted as a task for parallel deserialization, assuming the Table or SparseSet was already preallocated using the table metadata.
To fully take advantage of this format, users will likely need a conversion stage during game builds, which functionally blocks this feature on asset preprocessing of some kind.
## What alternative(s) have you considered?
Just use `bincode` to serialize the scene files as is.
Contributor guide
Assessment
This issue has not been assessed yet.