Skip to content

Implement on the fly world chunk loading#93

Merged
jobe-m merged 7 commits intomainfrom
feature/on-the-fly-world-chunk-loading
Apr 17, 2026
Merged

Implement on the fly world chunk loading#93
jobe-m merged 7 commits intomainfrom
feature/on-the-fly-world-chunk-loading

Conversation

@jobe-m
Copy link
Copy Markdown
Member

@jobe-m jobe-m commented Apr 17, 2026

No description provided.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 17, 2026

🤖 Augment PR Summary

Summary: Adds on-the-fly world chunk loading so chunks (and their entity assets) can be loaded as the camera approaches chunk boundaries.

Changes:

  • AssetStore now receives GameStateManager and forwards it into WorldMapData
  • WorldMapData was refactored to track chunk dimensions/pixels and to use chunkLookUpTable + chunkGridVania for chunk lookup
  • AssetLoader now supports loading a single chunk or a list of chunks, and populates the new lookup/grid structures
  • Re-enabled the WorldChunk component and attached it to the main camera blueprint
  • Renamed runtime prefab/entity references in SystemRuntimeConfigs and updated dependent systems to use the new getters
  • WorldChunkSystem now triggers chunk loads/spawns based on camera position and refreshes entities’ chunk assignment from their positions
  • Game state config now uses initialChunkList (instead of a single chunk) and tests/serializer registrations were updated accordingly

Technical Notes: Adjacent chunk loading is initiated asynchronously (via launchAsap on Dispatchers.ResourceDecoder) when the camera crosses chunk midpoints.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread korge-fleks/src/commonMain/kotlin/korlibs/korge/fleks/systems/WorldChunkSystem.kt Outdated
Comment thread korge-fleks/src/commonMain/kotlin/korlibs/korge/fleks/systems/WorldChunkSystem.kt Outdated
@jobe-m jobe-m merged commit 6468e08 into main Apr 17, 2026
1 check passed
@jobe-m jobe-m deleted the feature/on-the-fly-world-chunk-loading branch April 17, 2026 21:47
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.

1 participant