Add reflection-driven scene serialization (v3 format)#151
Merged
Conversation
Replaces hardcoded SceneEntity with a reflection-based approach where any component deriving Reflect is automatically saved/loaded. - Add ReflectComponentRegistry to World for type-erased component access - Add SceneFileV3 with HashMap<String, serde_json::Value> per entity - Add Reflect impls for u8, u16, and gameplay components (Health, Team) - Keep v2 format for backward compatibility with auto-migration - Coerce JSON number types to match field types during deserialization Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying euca-engine with
|
| Latest commit: |
4fd261a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9348057b.euca-engine.pages.dev |
| Branch Preview URL: | https://worktree-agent-a92cd49d.euca-engine.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReflectComponentRegistryto ECS World for type-erased component get/insert viaReflecttraitSceneFileV3format stores components asHashMap<String, serde_json::Value>— anyReflectcomponent is automatically serializableReflectimpls foru8,u16, and gameplay types (Health,Team)f64→f32/u8/u32etc.) during deserializationTest plan
#[derive(Reflect)]components through v3 formatcargo clippy --workspace -- -D warningsclean🤖 Generated with Claude Code