sim-ecs
sim-ecs copied to clipboard
Add snapshots
Description
Snapshots work like a time-machine. They record every change since a certain point and allow to do or undo them (rewind to the snapshot's creation time). Since they store deltas, they are more space-efficient than saving.
Use-Case
Snapshots should be save-able (world.save()
) and can be used for simple game saves (e.g. load world from Prefab and apply snapshot)
Hints
Depends on #9
The implementation should be time-efficient as well, e.g. they should not care about the exact history. If a component was changed several times, the snapshot should only record the initial and most recent value.