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

Entity representation rework #18

Open
armandfaux opened this issue Mar 14, 2024 · 0 comments
Open

Entity representation rework #18

armandfaux opened this issue Mar 14, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@armandfaux
Copy link
Owner

armandfaux commented Mar 14, 2024

Entities were first designed to be a class in the engine, because classes are easier to visualise and understand.
Each entity currently owns its own components. While this is a simple and easy to use method, it's not optimised and causes much overhead.
I want Kaelinn to be faster and a rework of the entity management seems mandatory at this stage.

  • An Entity will no longer be a class, but rather a mere "id" (unsigned int)
  • This id will also be an index for accessing the entity's components and its signature

This is likely the biggest change ever made that deep in the engine structure. However, significant performance improvements are to be expected.
This rework will cause many side effects, since every module will be affected. The most critical parts of the code that need refactorisation are the following :

  • How and where are the components stored (no more entity objects to store them)
  • How system interact with entities and components
  • How we create, delete, and modify entities
  • How we keep a track of the entity "type"

See #19, #20

@armandfaux armandfaux added enhancement New feature or request question Further information is requested labels Mar 14, 2024
@armandfaux armandfaux added this to the KLN v-1.1 milestone Mar 14, 2024
@armandfaux armandfaux self-assigned this Mar 14, 2024
This was referenced Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant