-
-
Notifications
You must be signed in to change notification settings - Fork 5
Use serde for world serialization #3
Copy link
Copy link
Labels
optimizationSomething could be tuned up or optimizedSomething could be tuned up or optimizedrefactorSomething isn't right in terms of orgnisationSomething isn't right in terms of orgnisation
Metadata
Metadata
Assignees
Labels
optimizationSomething could be tuned up or optimizedSomething could be tuned up or optimizedrefactorSomething isn't right in terms of orgnisationSomething isn't right in terms of orgnisation
Type
Projects
Status
Done
Currently we use bitcode for the serialization, which is fine, but has some issues regarding foreign types. If a type doesn't implement Serialize/Deserialize you can't manually implement it which is very annoying for bevy's math primitives. Wincode does let you define custom serialize/deserialize functions which lets us make serialization method for our
PositionandVelocitywrappers. Also apparently wincode is faster, but I haven't checked that and it's unlikely to be a bottleneck.Edit: After some benchmarks and taking into account the serde ecosystem, it ended up being better to just use serde with bitcode. There is a performance drop, but it integrates better with 3rd party libraries.