Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serialization functions #140

Merged
merged 2 commits into from
Jul 18, 2024
Merged

Add serialization functions #140

merged 2 commits into from
Jul 18, 2024

Conversation

BenjaTK
Copy link
Owner

@BenjaTK BenjaTK commented Jul 17, 2024

Adds 2 functions to GaeaGenerator:

  • serialize returns a PackedByteArray that represents the currently generated grid.
  • deserialize takes these bytes and sends them to the grid.

Is this enough for serialization or should we also add functions to save for files? I feel like that should be left to the user, but if there's enough demand I'll add them.

@BenjaTK BenjaTK added the ✨ enhancement New feature or request label Jul 17, 2024
@cullumi
Copy link
Contributor

cullumi commented Jul 18, 2024

Is this enough for serialization or should we also add functions to save for files?

I think it's enough for this PR at least, since saving to a file is very context-specific.

But a lightweight implementation for demo purposes might not hurt. Anything beyond that may very well balloon out of the scope of what makes sense for an actual Toolkit feature, though.

@BenjaTK
Copy link
Owner Author

BenjaTK commented Jul 18, 2024

That's a good point, I'm going to merge this.

@BenjaTK BenjaTK merged commit 3e2e31e into main Jul 18, 2024
@BenjaTK BenjaTK deleted the serialization branch August 30, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants