Skip to content

Isolate world model on a global actor#28

Draft
fwcd wants to merge 3 commits intomainfrom
actors
Draft

Isolate world model on a global actor#28
fwcd wants to merge 3 commits intomainfrom
actors

Conversation

@fwcd
Copy link
Owner

@fwcd fwcd commented Apr 1, 2022

This branch introduces the global @WorldActor isolating accesses to the world model throughout the application, thereby leveraging Swift 5.5's new concurrency and async/await (and hopefully eliminating potential data races).

Some challenges with this approach:

  • Performance is noticeably worse, especially as the player moves through the world due to all player state, including the position, being stored in the world model
    • A potential solution would be to separate the world model from e.g. player state, which could be moved onto another actor

See also:

@fwcd fwcd added the enhancement New feature or request label Apr 1, 2022
@fwcd fwcd changed the title Isolate world model on a global actor WIP: Isolate world model on a global actor Apr 1, 2022
@fwcd fwcd changed the title WIP: Isolate world model on a global actor Isolate world model on a global actor Jul 13, 2022
@fwcd fwcd marked this pull request as draft July 13, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant