Search Unity

ECS procedural world advice

Discussion in 'Entity Component System' started by xontik, Oct 7, 2019.

  1. xontik

    xontik

    Joined:
    Oct 7, 2019
    Posts:
    3
    Hello !

    (First post here, i'll do my best)

    I was going to build my first game with Unity, when i heard about ECS and DOTS.
    I really like the type of code that ECS impose, and the performance improvement is very welcome ^^

    Context :
    My game will take place on little planets that are procedurally generated, from icosahedron.
    I have hexagonal tiles that cover the surface of the planet, and from theses tiles :
    - I build a big mesh.
    - i compute neighboors
    - i define an elevation, a temp etc

    My question is : How can I model this world(planets/tiles) with the ecs workflow ?

    Currently I'm using a game object, the planet, holding a collection of tiles that are simple C# classes, a colections of vector3 that are my vertices, and my tiles contains index to that collection.

    I have no clue on how to represent that in ECS , event though i read the documentation twice.
    I think I understood how ECS should work, but i can't apply it to what i have planned for my game

    If someone can point me in the right direction :)

    Thanks for this Awesome piece of software !