Replace cereal snapshots with sealed component JSON serialization - #187
Merged
BenjaFriend merged 3 commits intoAug 16, 2026
Merged
Conversation
…so levels are human-readable and Gameplay no longer lists Graphics types. Co-authored-by: Ben Hoffman <BenjaFriend@users.noreply.github.com>
…ored pose. Owning EnTT groups swapped Transform out from under assign() once a level was already loaded; views plus Transform-first world load keep gameplay spawn order-agnostic. Also list named entities in the world outline and quiet expected JSON test logs. Co-authored-by: Cursor <cursoragent@cursor.com>
Member
Author
|
look mom AI slop |
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
ComponentTypeRegistryand entity-centric JSON so levels are human-readable and Gameplay no longer lists Graphics types (unblocks the issue 169 module split).Transformfirst, iterate meshes with EnTT views instead of owning groups, and list named entities in the world outline so JSON levels and Play-spawned grids keep their authored pose.MeshRenderermodel/material on save).Implementation
Fling::Json(PIMPL) wraps nlohmann privately. Public headers no longer include<nlohmann/json.hpp>.JsonArchiveis a single bidirectionalSerialize(UnrealFArchivestyle) withMakeNVP/FLING_FIELD.ComponentTypeRegistry: explicitRegister<T>thenSeal().LoadLevelFile/OutputLevelFilerequire sealed. NoFLING_COMPONENTstatic auto-registration.World::InitrunsGame::RegisterComponents(), external registrars,Game::Init(),Seal(), then loadsStartLevel.view<Transform, MeshRenderer, tag>soassign<Transform>()references stay valid. World still loads Transform before other JSON keys soPointLight/ mesh hooks see the authored pose.Test plan
FlingTests— 172 assertions in 17 test cases, all passed (JSON round-trip, registry Seal, unknown keys skipped, distinct Transform positions, view vs owning-group assign)