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? #38

Open
dakom opened this issue Jan 4, 2019 · 3 comments
Open

ECS? #38

dakom opened this issue Jan 4, 2019 · 3 comments

Comments

@dakom
Copy link
Contributor

dakom commented Jan 4, 2019

@clinuxrulz - I remember you mentioning that you were thinking about a demo using SodiumFRP to power an Entity Component System... can't find it at the moment, curious if you are still thinking along those lines, or maybe even put something together?

@clinuxrulz
Copy link
Collaborator

I made a small start, but I've really gotten nowhere with it yet. https://github.com/clinuxrulz/ilc_ecs/tree/master/src

Plus my laptop at home overheated and died. Only got a work machine I can use at work, and its only for work.

@dakom
Copy link
Contributor Author

dakom commented Jan 10, 2019

Sorry to hear that, hope you get it sorted soon :\

@clinuxrulz
Copy link
Collaborator

clinuxrulz commented Jan 31, 2019

I've got a old lapping up and going.
Honestly though, my only plan of attack is a Stream of descriptions of scene changes and have other parts of the system work out changes from the current scene plus the description of changes. In that respect ANY imperative entity component system library in existence could be used under the hood would work, and it would make no difference (as long as changes are accumulated and tracked in a Stream).

I have no special attack using a immutable map (immutable ecs), because I've had performance issues in the past with immutable maps which makes me uncomfortable. Just can't compete with mutable maps. I'm happy with immutable link lists, and structs performance wise though.

Experience performance/ram-wise so far:

  1. ImmutableMap entitys, ImmutableMap components: bad (too slow)
  2. MutableHashMap entitys, MutableHashMap components: bad (too much ram usage)
  3. MutableHashMap entitys, MutableTreeMap components: good.

I haven't tried a single map for both entities and components (combined key) yet. I just stopped at option 3, because I was happy with it. Other variations with fixed sized arrays are possible too, given you have a fixed number of component types at the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants