Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Abstract entities #20

Closed
AmaranthineCodices opened this issue Apr 5, 2019 · 0 comments · Fixed by #21
Closed

WIP: Abstract entities #20

AmaranthineCodices opened this issue Apr 5, 2019 · 0 comments · Fixed by #21
Assignees
Labels
enhancement New feature or request

Comments

@AmaranthineCodices
Copy link
Collaborator

I want to abstract entities away from Roblox instances. You will still be able to attach components to instances with CollectionService tags, but the entity will no longer be a Roblox instance. It will be an opaque identifier (either a userdata or just an auto-incremented number) that has no fundamental behavior.

This will mean RECS will ship a blessed component with it: InstanceReference. InstanceReference components are attached to entities with CollectionService tags. Currently, an entity with the components DeathBrick and Sparkler looks like:

  • Instance (entity)
    • DeathBrick component
    • Sparkler component

After this change, the entity will instead look like this:

  • (entity)
    • InstanceReference component (referencing the instance)
    • DeathBrick component
    • Sparkler component

When the RECS core starts, it will scan for all instances with CollectionService tags. It will then create abstract entities for them with an InstanceReference component referencing the instance, along with all other applicable components (depending on the CollectionService tags on the instance).

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 a pull request may close this issue.

1 participant