Skip to content

feat: introduce shared resource management and migrate asset consumers (comparison) - #1

Draft
ChronosWS wants to merge 5 commits into
feat/resource-systemfrom
feat/resource-manager
Draft

ChronosWS wants to merge 5 commits into
feat/resource-systemfrom
feat/resource-manager

Conversation

@ChronosWS

@ChronosWS ChronosWS commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Overview

Draft comparison of the full resource-management feature, not just its latest commit:

  • Introduce a shared, application-lifetime ResourceManager with resource sources, lookup/filtering, overlays, lazy metadata and bounded content access.
  • Migrate category consumers for fonts, images, models, items, audio and language while aiming to preserve existing behavior.
  • Route normal Bedrock/Pomme theme assets through the shared manager, below selected resource packs. Directory-backed sources use internal DirectoryLayout::ResourcePack / Mapped layouts, sparse aliases, native-path passthrough and case-preserving generic resource IDs.
  • Add private Cow-backed ResourceId storage and a compile-time resource_id! macro supporting static expressions, including concat!. Literal IDs borrow static strings; dynamic IDs retain fallible construction with the same namespace/path validation rules.
  • Use typed static IDs for fixed GUI, block-entity, mob and other texture tables. GUI IDs use direct namespace:path spelling; Bedrock sprites carry direct PNG and optional JSON IDs generated from one stem, replacing the texture enum. Compose static and dynamic sprite iterators without an extra dynamic-sprite collection, and name the font byte limit. These are representation changes, not GUI metadata, normalization or rendering improvements.
  • After a live resource-pack reload resets mesh columns, clear compiled state and requeue loaded columns for remeshing. This is a focused reload fix, not a global mesh-scheduler change; manual confirmation of the reported missing-block symptom is still pending.

GUI metadata/nine-slice rendering expansion is deferred. Consumer reload remains best-effort, not a global rollback transaction. The earlier destruction-atlas rollback is retained; no new atlas normalization behavior is claimed.

Latest publication

  • f06f0178eeb8cf5dd44fe4ab593c5d84d797d023 — refactor(resources): add compile-time resource identifiers
  • b81aeca4ddc3d951e12702a33727af1875c2d05e — fix(resources): remesh loaded columns after pack reload

Validation

The following compile-only checks passed again on 2026-10-27 for the exact source published in the two commits above. Source hashes also match the prior independently reviewed iterator-composition verification:

  • cargo fmt -p pomme-client -- --check
  • cargo check -p pomme-client --all-targets --locked --offline --features ttf-fonts,test-harness,cpu-bench
  • cargo clippy -p pomme-client --all-targets --locked --offline --features ttf-fonts,test-harness,cpu-bench -- -D warnings
  • cargo check -p pomme-client --all-targets --locked --offline --no-default-features
  • cargo check -p pomme-client --all-targets --locked --offline --no-default-features --features cpu-bench
  • git diff --check

Cargo checks used the Vulkan SDK environment. Existing no-default default_key dead-code and nix/winit dependency future-incompatibility warnings remain.

No automated tests were executed, as requested; all-target checks only compiled test/bench targets. During development, manual RHI2 world/entities and RHI3 audio/language checks passed, and the user confirmed shared panorama overrides across all three themes. These earlier spot-checks do not validate every current rendering path. Latest-refinement runtime validation, including the reload/remesh fix, remains pending. No fresh release build, application run, benchmark or profiling was performed for this publication.

Comparison notes

  • Targets ChronosWS/PommeClient master, observed at 2e709e8dd172c217af169707b69be72eed10e8d3 on 2026-10-27, not upstream master. Upstream master was observed at f5a44191441890a44acf0a9ace16a95aeb42dc0b; the fork base remains behind upstream. This comparison is not up to date with mainline.
  • The branch was previously rebased onto tested RHI integration 5be61cdafabf9d24379efdb5cb6ab935d50b3afe. This publication performs no new rebase or master synchronization and retains theme migration commit da301eb and the subsequent destruction-atlas rollback at 683b11b.
  • Existing upstream draft: feat(resources): Migrate resource consumers to ResourceManager system PommeMC/Client#785 — preserved separately; pushing the shared head also updates that draft. Its historical body has not been refreshed by this publication.
  • This additional fork PR is for comparison/review, not ready for merge.

@ChronosWS
ChronosWS force-pushed the feat/resource-manager branch from 9fae734 to e50daea Compare October 28, 2026 00:40
@ChronosWS
ChronosWS changed the base branch from master to feat/resource-system October 29, 2026 00:51
Purdze and others added 4 commits November 1, 2026 21:17
…ative trash slot (PommeMC#864)

* draw the block outline and empty the inventory on a shift-clicked creative trash slot

* draw the outline after entities, hide it while spectating a mob and show the spectator crosshair on interactable blocks

* take the outline and spectator crosshair target from the camera and note the pack outline
Make selected resource content transferable through Arc suppliers and Send readers, with pinned ZIP generations and atomic close state.

Load the sound registry from the active resource manager and hand selected content to the audio worker for decoding. Invalidate cached buffers on resource activation while retaining incremental streaming without buffering full encoded audio.

Plumb borrowed resources through existing audio callers and update the resource contract documentation.
Move remaining non-shader consumers to ResourceManager with typed and
constant resource IDs and resource-backed font, model, and texture reads.
Integrate local and server pack selection with the shared resource view,
separate application activation from UI catalog capabilities, and bootstrap
headless and benchmark consumers through resources.

Remove the legacy resource-pack manager and filesystem resolver. Preserve
the separate audio migration and the resource-system foundation beneath it.
@ChronosWS
ChronosWS force-pushed the feat/resource-manager branch from 3701f46 to f0fd90b Compare November 2, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants