Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Is it Good Time for using DOTS in Sprite based Production Project?

Discussion in 'Data Oriented Technology Stack' started by jGate99, May 9, 2019.

  1. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    760
    Hi there,

    I developed a project last year that draw 10k 2d Sprites but i was not happy with the performance issues.

    I saw this video

    and thought if 3d objects can be drawn/manipulated/animated with such speed then 2D Sprite should have no issue too.

    So I want to come back to that project again and wants to know if

    I can use DOTS in its current state and draw/animate/manipulate those 10k objects simultaneously every frame and whether it will work fine on mobile platforms or not? Can i use it for a production purposes or should i wait longer?

    Thanks
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,184
    I say do it. Be bold.
     
    jGate99 likes this.
  3. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    204
    DOTS currently does not have native sprite rendering, at least not the DOTS on this forum (Project Tiny does, but the technologies haven't been fully merged yet). So if you want to be bold and make sprites work here, then you'll probably want to make a GameObjectConversionSystem that builds a dictionary of Sprites and meshes and use that to convert SpriteRenderers into RenderMeshes.
     
    jGate99 likes this.
  4. Suike

    Suike

    Joined:
    Jul 25, 2013
    Posts:
    13
    Keep in mind that there aren't many tutorials, samples or documentation for DOTS, so If the initial development time is important for your project and you are not familiar with DOTS I wouldn't recommend it.

    Also keep in mind that whatever system for physics/rendering/animation you make you will probably spend some time later migrating when Unity release the existing physics/rendering/animation system for DOTS.
     
    jGate99 likes this.
  5. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,269
    More than enough
     
  6. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    760
    Sorry for lack of knowledge, is instantiating and moving sprites will be different than instantiating and moving bullets in that youtube video?
    i thought both things are the same.
     
  7. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    760
    Yes development time is important and i really dont want to start something that i later not able to finish because of time constraints.
     
  8. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    760
    @ALL
    For now i have following requirements and if current implementation of DOTS solves it; then im ready to go,
    So please suggest which is possible or not.

    - instantiating sprites and manipulating their "transform" (scale, rotation, position) for 10k sprites every frame just like this bullet.
    - writing algorithm to loop to do complex calculations on those 10k objects (job system)
    - coloring those sprites differently every frame

    Is this currently possible? To me after watching that youtube video it "seems" easy but im no expert and dont want to get stuck in future.
     
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,184
    Check the examples first as well.
     
    jGate99 likes this.
  10. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    351
    I'm doing sprites using RenderMesh and a quad for mesh without any problem with 60k+ entities. This way you can read/write Translation, Rotation and NonUniformScale inside jobs.

    Also possible and that depends on how complex the algorithm is but for 10k that should be a walk in the park :)

    This is not quiet there yet but Unity is working on having support on per instance properties. Until then you can use a custom renderer system but you can read more about it here.
     
    jGate99 likes this.
  11. Zhorky

    Zhorky

    Joined:
    Mar 16, 2014
    Posts:
    9
    That is exactly my issue with DOTS at the moment. But on the other side: Someone needs to learn it to teach others. I don't know the state of where DOTS is right now. Can we expect it 2019.2/.3? Even later? At the moment it feels for me like 2019.3 could be realistic, but also the lack of documentation really worries me and i feel like we still write lots of boilerplate code just to get the basics up and running. Don't start asking about things like collision systems, i just built my own AABB solution, because DOTS feels like some kind of empty shell. It opens a lot of doors for games we for now just dreamed about, but also keeps those doors shut, because of exactly your points. Who is actually familiar with DOTS, but the developers?
     
  12. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,160
    What about just using camera facing quads? Wouldn't that look 2D enough?