Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Showcase Share Our DOTS Showcases

Discussion in 'Entity Component System' started by Antypodish, Nov 22, 2020.

  1. tbg10101_

    tbg10101_

    Joined:
    Mar 13, 2011
    Posts:
    197
    rdjadu, thelebaron, bb8_1 and 2 others like this.
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
  3. tbg10101_

    tbg10101_

    Joined:
    Mar 13, 2011
    Posts:
    197
    Yes. Each feature (such as atmosphere, energy, and heat) is a series of systems and each module is an entity with a collection of component data. The simulation is in DOTS but the presentation is still GameObjects (copied from the simulation using DOTS).
     
  4. echu33

    echu33

    Joined:
    Oct 30, 2020
    Posts:
    69
    Looking for somewhere to post this, Since my scene heavily rely on usage of Job system & burst compiler I guess It can be consider related to DOTS?



    The scene contains more than 100K of dynamic leaves(600K simulated particle), using verlet integration to simulate the rope-like motion.

    All leaves simulation are calculate on CPU side using Job System with Burst Compiler enabled.
    The fish flocking are simulate on GPU side.

    Use indirect instancing to draw leaves and fish.

    //Performance - steady 30 FPS on PS4 equivalent pc.
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    It is definatelly part of DOTS, so it is 100% valid.

    This is such interesting and pretty results you got out there. Well done.

    It is so calming, I can keep watching. Besides blue sharks :p
     
    echu33 likes this.
  6. HappySlice

    HappySlice

    Joined:
    Nov 3, 2014
    Posts:
    22
    I made Orbital Knight for the Ludum Dare 51 game jam. It's a FPS with thousands of enemies. Every 10 seconds, your gun shoots another bullet. Made with Unity's DOTS/ECS
    https://happyslice.itch.io/orbital-knight

     
  7. officialfonee

    officialfonee

    Joined:
    May 22, 2018
    Posts:
    46
    Awesome work! I could totally see this being a full fledge games!
     
    HappySlice likes this.
  8. Dimetrock

    Dimetrock

    Joined:
    Dec 9, 2012
    Posts:
    37
    My name is Dmytro, I am from Ukraine, and I've been a game developer for over 10 years. For the past two years, I've been working on my own project Train World - a train transportation simulator on a large scale.

    The current test map size is over 38 000 square kilometers. In total there are almost half a billion trees/plants on this map.

    Entities are used for:
    • Vegetation
    • Pedestrians
    • Animals
    • Cars and other vehicles in cities
    • Map elements: icons and rail visuals
    Each of these probably deserves its own article. For example, pedestrians and animals use the Vertex Animation Texture technique for animations. Trees and plants have a custom LOD system and disappear when the rail is built near them. Rail visuals use very specific mesh and a shader that allows displaying lines of various sizes with dynamic scale while using a single mesh and material.

    The game has a page on Steam. The planned release date is sometime in 2023.
    Demo is available.
    https://store.steampowered.com/app/2132350?utm_source=unity_forum

    Media


    Screenshot_14.png Screenshot_650.png Screenshot_222.png

    Any feedback is welcome.
     
    Last edited: Dec 23, 2022
  9. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    @Dimetrock
    It looks nice with its visual styling.
    I love trains.
    Interesting use for DOTS.
    I hope for 1km long trains :p:cool:

    But in the trailer I am missing few things like arriving to the station, multiple trains on stations, side tracks etc, a bit more of variations on gameplay. Maybe in next Steam vids?

    If you open Unity forum thread wih your game, you will be able to collect more feedback from fellow developers.
     
  10. Dimetrock

    Dimetrock

    Joined:
    Dec 9, 2012
    Posts:
    37
    A 1 km train is not a problem, just don't forget to add more locomotives. Multiple trains on stations, side tracks, and many more features will be added, some of them are already. I will show it all in future videos. Also, I have a forum thread about the game here
     
    Antypodish likes this.
  11. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    1,007
    Nice work, but please don't hurt pedestrians, couple of them get run over at 00:28 :p.
     
    chadfranklin47 and Antypodish like this.
  12. Dimetrock

    Dimetrock

    Joined:
    Dec 9, 2012
    Posts:
    37
    During the development and lifetime of the project, no pedestrians were hurt. :)
     
    Antypodish likes this.
  13. PolarTron

    PolarTron

    Joined:
    Jun 21, 2013
    Posts:
    95
    Tech wise and design wise this looks amazing. Added to my wishlist. My feedback is purely on the visuals.

    It could use a pass on post processing effects including maybe a "Color Lookup" texture (LUT).
    The Amplify LUT Pack is a great package for this purpose. I'm not a technical artist but slapping a good enough LUT on top adds a lot. Maybe consider using Amplify Shader Pack too? The car looks like it's using a default specular setup.

    Style wise I wish it was a lower fidelity style. High resolution textures from far away looks kinda noisy. I'm looking at the ground textures and the roof tile textures here, but everything kinda has this problem to be honest. Maybe a proper post processing setup can offset this problem but at the moment it really looks like a Unity game.

    More lights. More shadows. More colors. Make it pop!
     
    Skjalg and Dimetrock like this.
  14. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    344
    Does this count?



    I used Burst in order to solve a bunch of quartic polynomials and other equations in a matter of milliseconds with great accuracy. The simulation uses double precision and the balls have 6 degrees of freedom.
     
  15. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    Sure, since it uses burst and it is part of DOTS. ;)
    It showcases very well, the use case of burst, without needing for parallel jobs, or entities.
     
    Nitugard likes this.
  16. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,979
    looks really great, did you schedule job or ran it on main thread?
     
    pcg likes this.
  17. TitoMakani

    TitoMakani

    Joined:
    Jan 20, 2020
    Posts:
    6
    Hey everyone,

    I'm a developer at Industrial Technology and Witchcraft, a small studio in Berlin, Germany. We've been working on an Automation and Colony Sim game using a voxel engine built from the ground up in Unity DOTS.



    Let me know if you have any questions regarding the technical details of either the voxel engine or how the project uses DOTS and I'll be happy to answer them!
     
    Last edited: Nov 15, 2022
    Extiward, rdjadu, mariandev and 20 others like this.
  18. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    1,005
    Looks cool! Hoping for success!
     
    TitoMakani likes this.
  19. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,110
    Nice Job :)

    Can you please elaborate more about Voxel Engine on DOTS how you structure it, what size of chunk you use and what performance of generating chunks you have with DOTS now?
     
  20. TitoMakani

    TitoMakani

    Joined:
    Jan 20, 2020
    Posts:
    6
    Sure thing!

    So I'll just start with the Voxel Engine and also by saying we are currently using Entities 0.51.

    Some important numbers are the standard voxel size which is 20 cm and a grid tile is 25x25 voxels.

    We've gone through a number of iterations with various acceleration structures, but a lot of them are really great for a TON of mostly static voxels. Our game though, might have tens of thousands+ of moving voxel objects in the scene. It's honestly a very classic DOTS use case. So for rendering we use Hybrid Renderer with custom HDRP shaders. Each voxel object is just a cube that we raymarch through using two layered dda. Essentially we have a top level "Brick Grid" which points to a lower map of voxels stuffed into a bitmap. If a voxel is hit we use the number of set bits behind it to lookup the material id. This allows us to have sparse grids and brings down the memory cost per voxel as we only need to upload the material id of solid voxels.

    On the CPU side we deal mostly with "raw" voxel data which is stored as a flat array in a DynamicBuffer on an entity. We also have another DynamicBuffer for the Brick Grid, but that is mostly only used for accelerating voxel to voxel interaction, or if a single voxel changes we can just check the grid's attribute mask to see if it has any changes that need to be sent to the GPU. It's also great for instancing the voxel data as until a grid has been dirtied all of the same voxel objects can use the exact same brick grid data.

    For objects you see like items, conveyors, walls, pioneers, etc... they are all parsed at runtime from .vox files where their structure and material properties are parsed out and formatted so we can just copy them right into the appropriate buffers when needed. Terrain and grass behaves a little different as they are dynamically generated. We have a number of sequential systems which make up the World Generation Pipeline. Each terrain chunk is it's own entity which contains currently contains 75x105x75 voxels. Each system updates the chunk components when it's done so the next system can pick it up.

    The first thing I should say is we decided early on to only use a 2d height map for terrain, so no caves or overhangs. We had an earlier version with 3d terrain, but it didn't suit the game we were making. Also looking at the profiler it was clear that sampling 3d FBM noise for so many voxels really was a bottleneck. So instead we generate a few different noise maps which are used to determine the terrain height, and later on biome. Per biome we specify a few different color palettes like terrain color, grass color, and of course the types of resource, trees, and fauna can spawn on it. To smooth out transitions we also determine the biome per 2d terrain voxel, but most systems don't look that granularly. We also tried to keep the whole pipeline as free of sync points as possible with each system having a unique structure for the parallel jobs to best handle what the system is trying to accomplish.

    Without burst and the job systems I don't see it working at this scale, and that's even just for the voxel based stuff. Having so many objects, conveyor belts, and other simulation stuff going on along with a colony of GOAP based agents going about their own day I feel we would have run into a performance roadblock very quickly. Like I said this was built on DOTS from day 1 so it's a mostly pure DOTS project excluding things that must live in Gameobjectland and like lights, particle effects, camera, etc.. So I can really only say that when I turn Burst off in editor there is a very noticeable difference loading in chunks.

    In terms of destruction we took great inspiration from Teardown where voxels can have their own physical properties. So coming from the vox file we parse out the physical material type based on the color palette index. For static objects this effects how incoming damage fractures the object. An example being If a laser hits a wood voxel it should break and burn through it, causing other flammable voxels to catch fire, while if it hits a very heavy metal it might die and just visually heat up that voxel instead.

    So basically each voxel physical type has a set interaction with a damage type and also a modifier for how much force it takes to interact with it. In the case of fracturing we dynamically calculate the Total Mass, Center of Mass, Volume, and Inertia Tensor based on the physical type of each voxel that makes up the debris and send it on it's way.

    Anyways the project is still very much in the midst of development, but I think DOTS is a great fit for a Voxel Engine. In general with Unity it's a bit bumpier if you want to do a custom SRP, lets say to implement a path-tracing render pipeline. For the CPU side though, its handled what we've thrown at it. I think also just in general voxels are a great match for DoD since they are really just plain boring ol' data and as you need more features you can just modify your components.

    Anyways that was a broad info dump, but I hope somewhere in there I've answered your question.

    Let me know if you have any others, and if anyone is interested in voxel engines I can point you along to some of the resources that we used during the planning/architecture steps.
     
  21. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    717
    Our latest game, Kona II: Brume was prototyped using on Entities 0.1.0, back in 2019, and we continued using the package since then. The game will ship on all major platforms using Entities 0.51 in 2023.


    Unfortunately, we couldn't use Hybrid Renderer or the physics package as these two were not stable enough when it was time to adopt them, especially in a HDRP context. Still, in comparison to our previous game (Kona), our codebase is more manageable and optimal, which allowed more time on the CPU to be spent on graphics. The vast majority of our updates are in SystemBase.Update, and the heavy calculations are done in jobs, such as our interaction and trigger systems.

    We are really looking forward to start a new project with DOTS 1.0, subscenes and physics, and maybe alongside HDRP DXR, who knows!
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      174.7 KB
      Views:
      151
    • 3.jpg
      3.jpg
      File size:
      279.8 KB
      Views:
      145
    Matjio, apkdev, rdjadu and 15 others like this.
  22. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    765
    Congrats on making such an awesome game!! I feel like my body temperature dropped 10 degrees while watching that trailer.
     
    alexandre-fiset likes this.
  23. IsaacsUnity

    IsaacsUnity

    Unity Technologies

    Joined:
    Mar 1, 2022
    Posts:
    94
    This looks really amazing Alexandre, super excited about it!
     
    lclemens and alexandre-fiset like this.
  24. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    Amazing use of DOTS. Love games like Factorio :)

    Does each of objects in a game is an entity?
    I presume, for animated characters, you used none DOTS approach?

    @TitoMakani, @alexandre-fiset, do you have links to Unity forum threads with your projects?
    If so, can you share them? You can also update your initial post with links.
     
    TitoMakani likes this.
  25. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    717
    No. For instance, for a View such as a "SubtitleView", we have one entity for it, linking to the TMPro, Canvas, CanvasGroup and Animator components for managing them in managed SystemBase. We do not really care about the game objects, just the components. We also have entities for buttons, which we call ViewButton, that simply allows our system to listen to Click events and such in an ECS-friendly fashion. Something like that:
    Code (CSharp):
    1.   Entities
    2.                 .WithAll<SomeTag, ViewButtonClick>()
    3.                 .ForEach((Entity entity) => {
    4.                    // Do something on Click
    5.                 }).Run();
    Then for:
    Yes, we use the Animator. But we do have an AnimatorSystem that basically mirrors the method of the animators, such as SetBool, SetInt and SetTrigger. I once shared my code back in 2019, but it has changed quite a bit since then, as we embeded our package in the project to fasten development. We have similar patterns for user interface and inputs.
     
    Last edited: Nov 21, 2022
    bb8_1 and Antypodish like this.
  26. TitoMakani

    TitoMakani

    Joined:
    Jan 20, 2020
    Posts:
    6
    Thanks, it really just happened to be perfect timing as a Unity dev to start a game like this.

    We don't currently have any active threads on the forum. I'm gonna go ahead and start one and edit this post and the original with a link.

    Thanks for the suggestion!
     
    Antypodish likes this.
  27. Niter88

    Niter88

    Joined:
    Jul 24, 2019
    Posts:
    112
    From now on when people ask me "what can Unity do?" I'll send them this video
    Good job
     
  28. Goularou

    Goularou

    Joined:
    Oct 19, 2018
    Posts:
    54
    I am a true fan and user of DOTS, but here I have a dumb question: what would ECS bring to this case where pretty much all meshes appear different?
     
    pm007 likes this.
  29. Dimetrock

    Dimetrock

    Joined:
    Dec 9, 2012
    Posts:
    37
    Hi, Train World Demo is now available on Steam.
     
    lclemens and IsaacsUnity like this.
  30. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    894
    ECS is more then meshes. It has a physics system. Obviously you can make your own components.
     
  31. Goularou

    Goularou

    Joined:
    Oct 19, 2018
    Posts:
    54
    Yes definitely: I was thinking rendering only indeed while the "new" physics are also very valuable. Thanks.
     
  32. n3b

    n3b

    Joined:
    Nov 16, 2014
    Posts:
    56
    Squeezed some numbers out of Unity.Physics, ECS for systems only though
    ~10k bodies with ~100k contacts
    ~50k bodies with ~50k contacts

     

    Attached Files:

  33. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    765
    I don't think "Return to Empire" by TiMi Studio and Tencent Games has been added to this list.... I had no idea it existed until now.

    upload_2023-7-8_13-5-42.png

    Trailer --> https://www.eurogamer.net/first-look-at-return-to-empire-the-china-only-age-of-empires-mobile-game

    Powerpoint --> https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2023/Slides/Thousands+of+Soldiers_Xiao_Jian.pdf

    Download --> https://m.apkpure.com/return-to-empire/com.tencent.tmaoe

    Pretty cool that it is made for mobile, which hasn't always had the best support under DOTS.
     
  34. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    @lclemens No, it hasn't be added yet.
    That is interesting indeed, to use DOTS on mobile RTS games.
     
    officialfonee likes this.
  35. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    1,007
    Lots of interesting things in the ppt, thanks for sharing.
    I like the system/data dependency visualization tool, could be interesting for unity to have one.
     
  36. officialfonee

    officialfonee

    Joined:
    May 22, 2018
    Posts:
    46
    Very cool. And those have Lua integrated with DOTS. Thanks for sharing.
     
    Antypodish and lclemens like this.
  37. Mockarutan

    Mockarutan

    Joined:
    May 22, 2011
    Posts:
    159
    Last edited: Jul 16, 2023
    xVergilx, pcg, officialfonee and 11 others like this.
  38. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    765
    Congrats on your steam release today!!
     
    officialfonee and Antypodish like this.
  39. WildMaN

    WildMaN

    Joined:
    Jan 24, 2013
    Posts:
    128
    I finally released my pet project. What started almost 4 years ago as a spiritual successor to Medieval Engineers on PC, eventually transformed to mobile hypercasual mayhem. I had to drop some half-baked but nevertheless fantastic features like runtime weights & tension redistribution and dynamic colliders rebuilding for realistic fracturing. But hey, I managed to finish and release it as a solo developer in my spare time!

    My last venture into multithreading was well over 20 years ago, and I had tons of fun with DOTS and DOD in general, optimizing quite complex algorithms and offloading some work to GPU. Thinking of some huge-scale colony simulation as my next project. RimWorld for mobile, or maybe Factorio...

    Unity 2020.3.48, Entities 0.17, Physics 0.6, no hybrid rendering - just GameObjects and mesh instancing. Tons of hacks and workarounds to make it work & build for Google Play.



    https://play.google.com/store/apps/details?id=com.funrox.castlesmash
     
  40. foscoalma

    foscoalma

    Joined:
    Oct 23, 2017
    Posts:
    1
    Hello guys! I, personally, love the Unity's DOTS! We're using Entities 0.51 for our project, because we build it on DOTSNET (and it doesn't support Entities 1.0, sad).
    We're making an post-apocalyptic multiplayer survival open world game. We've released an Early Access on Steam.
    God bless Unity and DOTS!


    If you're interested, here's a link to our game:
    https://store.steampowered.com/app/2218970/Plains_of_Pain/

    Update 2024-03-07:
    We have implemented procedurally generated world (using MapMagic 2), and our own building system for base building.
     
    Last edited: Mar 7, 2024
  41. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    1,005
    Looks awesome!
     
    foscoalma and officialfonee like this.
  42. MatanYamin

    MatanYamin

    Joined:
    Feb 2, 2022
    Posts:
    110
    officialfonee, RaL, lclemens and 3 others like this.
  43. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    Well done. DOTS + VR is always great to see, whet people can make of such tech. :)
     
    officialfonee and MatanYamin like this.
  44. officialfonee

    officialfonee

    Joined:
    May 22, 2018
    Posts:
    46
    Antypodish likes this.
  45. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Hey! Our game, Operation Valor, has just been released on Steam.


    It's a tactical 27v27 top-down shooter. Think top-down Squad/Battlefield.

    We initially built the game on top of Unity's FPS Sample back in 2019.

    At the moment we are using Entities, Physics, and Netcode. All on version 0.50 and Unity 2020.3.

    The presentation, meaning 3D rendering and UI use GameObjects.
    This allows us to keep using Unity's default rendering and animation tooling.
     
  46. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    1,005
     
    Last edited: Feb 17, 2024
  47. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    1,005


    I keep seeing the guy posting this on Linkedin. Says it's his "DOTS experiment".
     
  48. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,822
    Really cool, it brings me diablo II vibes.

    Another game like Diplomacy Is Not An Option, also DOTS. Really great progress indeed.
     
    officialfonee and bb8_1 like this.
  49. gencontain

    gencontain

    Joined:
    Nov 15, 2012
    Posts:
    16
    My city-builder game Goblin Camp uses DOTS extensively. All the creatures, items, buildings and flora are entities. It's made it pretty easy to simulate hundreds of creatures and thousands of plants. I also use Burst + Jobs for things like the water and fire simulations.

    https://store.steampowered.com/app/2431980/Goblin_Camp/

     
  50. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    1,005


    Not sure if it belongs here but I have Unity jobs notification on Linkedin and I always see this:
    upload_2024-2-26_21-6-46.png
    Shapez 2 is at least a Burst powered game.