Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

When can we expect 2d physics for ECS to arrive?

Discussion in 'Entity Component System' started by FM-Productions, May 26, 2019.

  1. FM-Productions

    FM-Productions

    Joined:
    May 1, 2017
    Posts:
    72
    Hello everyone!

    I recently saw in a post talking about the tiny unity port to c#, and that is pretty much running inhouse already:

    https://forum.unity.com/threads/c-update-for-project-tiny.643000/

    I suppose this will include a physics framework too, my question is now:

    Will such a 2d physics framework also be usable for a regular ecs project, or is there a special separation to tiny project still?

    And like mentioned in the title, when can we expect a 2d physics framework for regular ECS to arrive then?



    The background is that I want to try a small rewrite of the core code of the physics to support a fixed point type (a special struct with a long as underlying value) instead of floating points to have a deterministic physics simulation that also supports jobs/concurrent code though. I know unity is working on making calculations deterministic across various systems in the near future, but I have no idea when this will happen and how stable it will be then.



    Thanks!
     
    foxnne likes this.
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    2D physics is specific to Unity Project Tiny.
    Unless there is something changed, regarding ECS / DOTS, there will not be separate 2D physics.
    All will be based on 3D physics, from which, you can also use as 2D, if you like.
     
    FM-Productions likes this.
  3. FM-Productions

    FM-Productions

    Joined:
    May 1, 2017
    Posts:
    72
    Ah okay, so if the plan is to keep tiny packages strictly separated and there will be no dedicated ecs 2d physics, I suppose it would be better to extend the unity ecs physics and add some solvers for 2d shapes for example?
    It is still a little odd for me if no 2d physics package for ecs (aside from unity tiny) was planned at all though.
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    2D physics is nothing more special, than 2D.
    Is just one less axis.
    Other than maybe be a little more complex collision clack, because it adds one axis extra.
    If you want, you can implement own 2D physics.
    If you need 2D why not stick to Tiny, as is made for that purpose?
     
    FM-Productions likes this.
  5. FM-Productions

    FM-Productions

    Joined:
    May 1, 2017
    Posts:
    72
    I'm making a desktop game and would prefer to be able to use all other systems of unity regardless of the physics engine choice (not too familiar with Tiny, but I think the feature set is reduced as opposed to a regular project?). Thanks for the answer!
     
    bobbaluba likes this.
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    Tiny aims for performat, low power consumption and build size 2D games, as far I remember correctly. And yes, it has many features reduced.
    ECS / DOTS is not for production ready and don't have many features as of yet. It will take few years, for that to happen.
     
    FM-Productions likes this.
  7. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    If Tiny already has light box2d feature and c# support is coming to that soon, I don't see why this won't be made available to main Unity in not too distant future.
     
    bobbaluba, foxnne and FM-Productions like this.
  8. Enderlook

    Enderlook

    Joined:
    Dec 4, 2018
    Posts:
    44
    Since the Tiny project seems to be stopped... What would happen with 2D Physics? When will it arrive? Is it actually usable?
     
  9. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    You are better and safe to assume, it will never arrive, instead of waiting indefinite time. So the question is, what you can do, so your development is not hindered.

    Just use Unity physics API, which uses 3D based physics. You can get pretty much the same results.