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

ECS - Storage class improvements #49

Open
6 of 8 tasks
MStachowicz opened this issue Dec 14, 2022 · 1 comment
Open
6 of 8 tasks

ECS - Storage class improvements #49

MStachowicz opened this issue Dec 14, 2022 · 1 comment
Labels
Bug Something isn't working ECS Feature New feature or request Medium Bug or task of intermediate time investment.
Milestone

Comments

@MStachowicz
Copy link
Owner

MStachowicz commented Dec 14, 2022

Todo:

  • Rename funcs to snake case
  • Add noexcept to special member funcs
  • Remove or implement copy construct and copy assign funcs from ECS
  • Strong typedef? EntityID cannot be discerned from size_t, need to turn EntityID into a class.
  • Move Archetype::getOffsets into ApplyFunction struct and change it to use std::index_sequence.
  • Remove foreachEntity as it duplicates foreach(Entity, ComponentTypes) behaviour
  • Add a forech<>() const version.
  • Static asset addEntity && addComponent: Don't allow adding an Entity as a component.
@MStachowicz MStachowicz added Bug Something isn't working Feature New feature or request Medium Bug or task of intermediate time investment. ECS labels Dec 14, 2022
@MStachowicz
Copy link
Owner Author

Strongly typed EntityID in the form of class Entity ab73921

MStachowicz added a commit that referenced this issue Apr 2, 2023
Renamed mBuffer to mData and changed the data type from std::vector<Byte> to std::byte*.
Added m_capacity initialised to 16 instances of the archetype at construction.
Renamed Destructor to MemberFuncs and added a MoveAssign and MoveConstruct function pointer.
Replaced usages of typedef with using.
Fixed Archetype::push_back to now call move-constructors for the ComponentTypes.
Fixed Archetype::erase to now call move-assignment operator when re-positioning Components in non-end erase.
Added Archetype::reserve(Capacity).
MStachowicz added a commit that referenced this issue Apr 5, 2023
Replaced ComponentIDGenerator with ComponentHelper.
ComponentHelper gives ComponentID but also stores an array of ComponentInfo.
ComponentInfo allows a non-templated way to access information about types after type erasure. This access is required by #37 and #51 when the only type supplied to these functions is the ComponentType being added or removed.
Removed Archetype getComponentImpl and getComponentMutableInfo.
MStachowicz added a commit that referenced this issue Apr 9, 2023
Refactored get_components_layout which now aligns types to their preferred alignment as well as reordering the parameter pack to optimise memory usage in the Archetype buffer.
ComponentLayout owns a copy of ComponentInfo.
MStachowicz added a commit that referenced this issue Apr 11, 2023
Added destructor, move-construct and move-assign.
Declared copy construct and copy assign deleted.
Added Archetype::clear for destroying all the components.
@MStachowicz MStachowicz added this to the Version 0.1 milestone Apr 29, 2023
@MStachowicz MStachowicz changed the title ECS improvements and outstanding bugs ECS Storage class improvements Dec 20, 2023
@MStachowicz MStachowicz changed the title ECS Storage class improvements ECS - Storage class improvements Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ECS Feature New feature or request Medium Bug or task of intermediate time investment.
Projects
None yet
Development

No branches or pull requests

1 participant