Skip to content

WorldPartition-like functionality #35

@JMS55

Description

@JMS55

Unreal has a WorldPartition feature, where you can divide the static portions of your game level into grid cells. Cells not near a "streaming source" (e.g. the player) get unloaded from memory. Cells that become newly visible to a streaming source load in from disk.

I think it would be great to make a new crate extending big_space, and build upon the existing Grid and GridCell functionality to support streaming cells.

Theoretical implementation plan:

  • Support instantiating a GridCell from a BSN file
  • Add a GridCellStreamingSource component
  • Add a "streaming" flag to Grid
    • When enabled, cell entities not visible to a streaming source should be despawned
    • When enabled, cell entities newly visible to a streaming source should be spawned as a child of a BigSpace
  • Create some kind of tool for baking foo.bsn files representing a GridCell into a separate foo.imposter.bsn file
    • Create a few simplified meshes based on the static landscape kind of entities present in the original file
    • Store the new LODs as a VisibilityRange in the imposter file
    • When a Grid has streaming enabled, and a cell is despawned, spawn in the imposter cell
    • When a Grid has streaming enabled, and a cell is newly visible, despawn the imposter cell and spawn in the real cell

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions