Skip to content

Use serde for world serialization #3

@ReCore-sys

Description

@ReCore-sys

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 Position and Velocity wrappers. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationSomething could be tuned up or optimizedrefactorSomething isn't right in terms of orgnisation

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions