Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Should we move serialisers to the classes (rather than staying in the serialiser file)? #432

Open
Cullen-Enerdyne opened this issue Jun 25, 2022 · 3 comments
Assignees
Labels
Help Wanted Extra attention and manpower is needed. Optimization Optimizing and improving existing features and code, Question Further information is requested.

Comments

@Cullen-Enerdyne
Copy link
Collaborator

One major benefit of this is that we can achieve runtime polymorphism through this approach.

Currently, we can only serialise data according to it's declared type. If we run the serialiser with member methods, we can keep more data as base types (e.g. Primitive*), and they will still be serialised correctly.

@Cullen-Enerdyne Cullen-Enerdyne added Help Wanted Extra attention and manpower is needed. Question Further information is requested. Optimization Optimizing and improving existing features and code, labels Jun 25, 2022
@Cullen-Enerdyne Cullen-Enerdyne changed the title Should we move serialisers to the classes (rather than staying in the serialiser file) Should we move serialisers to the classes (rather than staying in the serialiser file)? Jun 25, 2022
@AlexvZyl
Copy link
Owner

#103

@AlexvZyl
Copy link
Owner

I think we should move it. Having the serialiser code in different places is akward.

@AlexvZyl
Copy link
Owner

AlexvZyl commented Jul 2, 2022

If we implement an ECS properly, the serialiser might even become one function to handle all entities. It just iterates components and serialises each component.
#446

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted Extra attention and manpower is needed. Optimization Optimizing and improving existing features and code, Question Further information is requested.
Projects
None yet
Development

No branches or pull requests

2 participants