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

Implement entity archetypes in MVP #38

Closed
3 of 5 tasks
Tracked by #9 ...
martinjonsson01 opened this issue Mar 11, 2023 · 0 comments · Fixed by #77
Closed
3 of 5 tasks
Tracked by #9 ...

Implement entity archetypes in MVP #38

martinjonsson01 opened this issue Mar 11, 2023 · 0 comments · Fixed by #77
Assignees
Labels
feature A new feature
Milestone

Comments

@martinjonsson01
Copy link
Owner

martinjonsson01 commented Mar 11, 2023

Reason

The MVP should lay out components contiguously in order to demonstrate that it results in efficiency gains due to cache hits.

Requirements

  • At first start, entities are grouped into archetypes based on which component types they have attached.
  • Systems fetch components from archetypes instead of component vectors.
  • Archetypes are constructed in a way such that components that need to be iterated by systems are laid out contiguously (i.e. without empty slots).

Nice-to-have (not strictly necessary):

  • The old and naive Vec-based component storage is still there for comparison in benchmarks.

Note: not a requirement: being able to add and remove components and having entities switch archetypes. This is a future feature!

Dependencies

@martinjonsson01 martinjonsson01 converted this from a draft issue Mar 11, 2023
@martinjonsson01 martinjonsson01 added this to the MVP milestone Mar 11, 2023
@martinjonsson01 martinjonsson01 added the feature A new feature label Mar 11, 2023
@JacobBredin JacobBredin moved this from 🆕 New to 🏗 In progress in RECS Mar 13, 2023
@JacobBredin JacobBredin self-assigned this Mar 13, 2023
@JacobBredin JacobBredin moved this from 🏗 In progress to 👀 In review in RECS Mar 26, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in RECS Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants