-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create a basic ECS #17
Conversation
We could maybe split up workflows so that everything is not in the same file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall great just a few comments on what could be improved slightly.
Some documentation of the more complex features and on the tests.
The engine itself won't add that many components and this struct cant be used from a potential scripting language, so it didn't make any sence to add from the beginning.
Retrieving data is pretty unergonomic and requires unsafe code (since what you get is raw pointers). I think the general solution would require proc macros and I don't think that's worth the hassle TBF. The compile time type safety would still not be available when interacting with a scripting language and it's pretty easy to write wrapper functions that handle specific queries in a type safe way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I agree that we don't have to prioritise removing unsafe even though it would be nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ser bra ut. Härnäst blir det att fundera över föräldra-barn-relationer (d.v.s. om ett svärd finns hos en karaktär, tas karaktären bort så ska svärdet bort)
@mathiasmagnusson Kan du fixa dessa merge conflicts? |
Yes jag fixar det idag |
Seems like we need those reviews again... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
First parts before closing #5
Features to implement before merging this PR into main