Skip to content

Research - "Virtual" Worlds / Multi Threading #5

@Crain-32

Description

@Crain-32

When reviewing the idea of Green Threads, it was discussed that a multithreaded multiworld generation approach is quite simple. You can achieve a similar flow to that by doing the following.

Provide World X with Y items, and tell it to randomize what it can, knowing that the current external state for placed items in it's own world is some set state. While World X randomizes the item pool, all other items for World X are locked so that an invalid state cannot form.

Once World X can either A, no longer place items, or B runs out of items. It prompts the orchestrator that it must park till the state for itself has changed, and releases the items it placed back into the pool. At that point the thread World X was using can be purposed by another World for randomization. Rinse and Repeat until finished.

It should be clear, but this optimization can only really be used by Massive Multiworlds, as when you lock the Items related to world X, you reduce the randomization of the total, so you need a large pool of worlds to negate that bias.

We could utilize this for Small/Medium Multiworlds by locking the context from a World to a Sub Section of that World's Graph, but that is a bit of overkill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ResearchPotential ImprovementenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions