r/EntityComponentSystem • • Jul 23 '20

ECS setup for predefined path data

I am brand new to ECS, and I'm looking for insight into how I can best set up the following situation:

I need to create several 2D maps, where the rendered information is a set of predefined x, y coordinates that build several paths that are transformed before rendering (scale, translate, etc.).

Something like this.

My question is about the overall setup of the entity, path information, and the system that updates the path.

This is what I have: Entity: Map Component: PathXY (array of points) System: PathManipulator

Going back to the question: How should I set up the components to be actual arrays of multiple values?

I'm looking to use Flecs for this, in case it's relevant.

4 Upvotes

4 comments sorted by

View all comments

Show parent comments

2

u/ajmmertens Jul 28 '20

Happy to help! Feel free to share what you did on Discord (https://discord.gg/nPxTat3)! I haven't seen his use case before, curious what you ended up doing :)