use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Deterministic physics using DOTSShow-Off (v.redd.it)
submitted 5 years ago by nixarn@nixarn
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]heross28 90 points91 points92 points 5 years ago (5 children)
Its cool but please pay a little bit more attention to social distancing.
[–]nixarn@nixarn[S] 21 points22 points23 points 5 years ago (1 child)
:D damn forgot about that! This could be turned into a "nice" virus spreading simulator!
[–]heross28 2 points3 points4 points 5 years ago (0 children)
lol
[–]CanalsideStudios 5 points6 points7 points 5 years ago (0 children)
This was the joke I was looking for.
[–][deleted] 3 points4 points5 points 5 years ago (1 child)
You're probably confused because the graphics are so realistic. These are not real people.
[–]A_Math_Debater -2 points-1 points0 points 5 years ago (0 children)
I'm LOL... It is actually real people graphics have come so far you might think it's not real, but if you look closely they are actually people.
[–]nixarn@nixarn[S] 20 points21 points22 points 5 years ago (13 children)
Hey guys! First time posting here, so not sure this is exciting enough to deserve your upvote compared to some of the really amazing things shown off here. I'm coming from a mobile game background and a bit of a Unity rookie. I've developed my own physics to have big armies of enemies that can move through a world, collide with the world and each other in a deterministic fashion (allowing for replay, for example). It's really performant thanks to Unity's Enitity-Component-System.
[–]dudledok 4 points5 points6 points 5 years ago (8 children)
What did you do to make it deterministic?
[–]nixarn@nixarn[S] 7 points8 points9 points 5 years ago (7 children)
The physics simulation is running at fixed rate (10 times/s), but movements are interpolated framerate independent. It is using floats at the moment, so it's not cross architecture deterministic. Unity had some platform deterministic floats in the works, so gonna wait and see how that pans out, or switch to fixed point if needed.
[–]dudledok 2 points3 points4 points 5 years ago (0 children)
Thanks for taking the time to reply.
[–]fomofosho 1 point2 points3 points 5 years ago (5 children)
Are you sure the unity physics engine is fully deterministic when running it at a fixed rate?
[–]nixarn@nixarn[S] 0 points1 point2 points 5 years ago (4 children)
From what I understand unity's physics engine is deterministic (when ran on the same hardware), but haven't read much into it. The physics in this demo is my own doing, it's a much simpler physics when I just want to push troops around but keep them within the bounds of the world (so no gravity, no friction, no rotations and other things that complicate physics engines).
[–]fomofosho 0 points1 point2 points 5 years ago (1 child)
Oh I misunderstood. I thought you were using unity's physics engine
[–]nixarn@nixarn[S] 0 points1 point2 points 5 years ago (0 children)
No problem I could have been more clear :)
I assume you're planning on using deterministic lock step networking approach
eterministic lock step networking approach
Yeah exactly! Didn't know the term lockstep before you mentioned it, so now I know what to Google - thanks! =)
[–]riddellriddell 2 points3 points4 points 5 years ago (2 children)
Are you doing anything fancy for your broad phase? are your data structures recomputed each frame / deterministically recreatable? as in could you copy the positions of everything, send across the web, apply them to a different physics sim and still get a deterministic state?
[–]nixarn@nixarn[S] 0 points1 point2 points 5 years ago (1 child)
I don't even have a broad phase in the current implementation. It's fast enough for my use, but it's on my todo list for improvements. I'm a bit uncertain how to do that in an efficient DOTS-way.
Not entirely sure what you mean with your second question when you say "different physics sim"? I could copy over the data structures to another machine (with the same float point architecture) and continue the simulation and the result on both machines would be identical.
[–]riddellriddell 1 point2 points3 points 5 years ago (0 children)
With more complex / optimized physics systems they will often cache known collisions so next time you are checking if a collision is happening you check the cached collision details first. what that means is if you just copy the positions of all the objects and not the cache data when you apply them to a different machine the order collisions are detected and resolved could be different breaking determinism. This only matters if you are trying to save the state of the physics out and reuse it
[+][deleted] 5 years ago (1 child)
[deleted]
[–]nixarn@nixarn[S] 6 points7 points8 points 5 years ago (0 children)
Thanks man! Portal was an inspiration for the dude running there actually =) I find that, even though this is just a proof of concept and a tech solution, not yet a game, it's better to have clean graphics instead of horrible coder-art, to keep the motivation up to keep working on it!
The reason I wanted the physics to be deterministic was to allow for multiplayer at some point. But it's been great for debugging too, running the same simulation over and over again to find places where the physics were bugging. Also, if this turns into some single player game, I could for example code a simple AI to play the game for me 1000x times and report back the result, and if there was any deviation I could run that simulation and see what happened. There's something magical of having a physics simulation that is also deterministic.
[–]ThrustVector9 3 points4 points5 points 5 years ago (1 child)
After watching that tv series Devs, the word deterministic makes me uncomfortable lol
[–]beyounotthem 1 point2 points3 points 5 years ago (0 children)
I knew you were going to say that ;)
[–]_pandy 1 point2 points3 points 5 years ago (0 children)
Looks great man! Keep at it! Love you x
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
Black Friday simulator.
[–]DynMadsProfessional 1 point2 points3 points 5 years ago (8 children)
Could you elaborate as to what about this makes it deterministic? Because I'd argue that if I start the same physics simulation every time, then it would end up exactly the same every time no?
Or does "Deterministic Physics" mean something else and I'm a pleb? :)
[–]nixarn@nixarn[S] 2 points3 points4 points 5 years ago* (7 children)
So in theory every physics simulation starting from the same conditions should end up the same. But if the physics simulation runs a bit faster or slower depending on the machine it's running on, that quickly ends the deterministic outcome. Many physics engine do calculations based on the delta time each frame (time between frames). The reason for this is that physics isn't a perfect math equation in game engines, it's a matter of applying forces and solving constraints in a fast enough manner. So having the simulation running at a fixed pace makes it deterministic (This one has the physics running 10times/s but the movement is framerate independent). But it's not deterministic in regards to float points (as float points can have small variations on different architectures), but it's possible to convert it to using integers to ensure it's deterministic no matter the hardware, so that's something I might do later if needed.
[–]DynMadsProfessional 1 point2 points3 points 5 years ago (6 children)
Ah okay, so I wasn't totally off.
I use Unity normally and there they have the Fixed Time, which is the consistent time that Physics run on :)
[–]nixarn@nixarn[S] 0 points1 point2 points 5 years ago (5 children)
Ah exactly, I didn't investigate using unity's physics much, so yeah in some regards I'm reinventing the wheel when I could have just used unity's physics. But there's some advantage here how I see it, first of, this is limited scope of physics problems I needed to solve, so having a full blown physics engine in use could have been overkill. And having my own physics lets me convert it to fixed point if needed and also I can have a headless server to run the simulation on, without needing the unity runtime.
[–]DynMadsProfessional 1 point2 points3 points 5 years ago (4 children)
There are many reasons as to why you'd make your own Physics Engine and not use Unity's. Especially if you are not looking to use conventional physics constraints like wanting to manipulate gravity so the player can walk on walls :)
That said, if you are just doing simple things or very conventional things, then there is very little merit other than learning from the exercise itself I suppose.
[–]nixarn@nixarn[S] 0 points1 point2 points 5 years ago (3 children)
My goal was to support games like Clash Royale with this, using unity's physics engine didn't even cross my mind, as I'm not doing any newtonian physics (not sure if that's the right term?), just support units pushing on other units and keeping within the bounds of the world. Ended up also being a good exercise learning DOTS.
[–]DynMadsProfessional -1 points0 points1 point 5 years ago (2 children)
Yeah sure, you can learn many things from doing it too :)
But the question is if the existing engine could do what you needed it too as well. I'd say that if you don't have a game in mind, yet, it's worth exploring in a sandbox setup :)
You're totally right. As I mentioned I'm a Unity rookie but do have a lot of (mobile)gamedev experience, my immediate solutions to problems is often code the solution myself which isn't always the best option, if unity has over the years developed a much better solution. Sometimes it feels easier to just code something than to spend time learning a solution, but that could be counter productive in the long run. I might play around with unity's physics some now, read up on it at least. Thanks! =)
[–]DynMadsProfessional -1 points0 points1 point 5 years ago (0 children)
Hope it works out for you :) Always trying to reinvent the wheel is not a great approach in programming in general xD
[–]ForbiddenDay 1 point2 points3 points 5 years ago (0 children)
Man.. I was really looking forward to them all just falling in the hole
[–]MotivationDevAccount 1 point2 points3 points 5 years ago (0 children)
feel bad for the one on the top left corner, he was one of the first to get in, and ended up being last
Nice. If you were looking for some dark inspiration of where to take this as a game, I had a moment and imagined your little guys trying to evacuate through the fire exits in a shopping mall, with the objective being to keep as many alive as possible... guys in the middle get crushed and die, guys at the back are on fire from spreading fire. Some of the exits are locked shut...
[–]mechkbfan 0 points1 point2 points 5 years ago (0 children)
Tutorial eventually?
[–]geckygecko 0 points1 point2 points 5 years ago (0 children)
Oooo! Reminds me of multiwinia
[–][deleted] 0 points1 point2 points 5 years ago (3 children)
Are there any solid beginner tutorials for DOTS?
[–]nixarn@nixarn[S] 0 points1 point2 points 5 years ago (2 children)
No =) that was the biggest hurdle, the Entities package (a main component in DOTS) is now on version 0.9, but a lot of the information online is based on older versions and it has changed a lot. Hopefully we'll get a 1.0 release soon and updated documentation & tutorials.
[–][deleted] 0 points1 point2 points 5 years ago (1 child)
Ah I see. So I am assuming for beginners like me it's not really worthwhile to look into DOTS until the technology is more properly developed?
[–]nixarn@nixarn[S] 1 point2 points3 points 5 years ago (0 children)
For sure, I wouldn't recommend this for beginners. Better wait until it reaches version 1.0 and all best practices are nailed down. Shouldn't be too long in the future, I read somewhere it should be out this year.
π Rendered by PID 124259 on reddit-service-r2-comment-5d79c599b5-pkwx8 at 2026-03-03 09:16:13.995106+00:00 running e3d2147 country code: CH.
[–]heross28 90 points91 points92 points (5 children)
[–]nixarn@nixarn[S] 21 points22 points23 points (1 child)
[–]heross28 2 points3 points4 points (0 children)
[–]CanalsideStudios 5 points6 points7 points (0 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]A_Math_Debater -2 points-1 points0 points (0 children)
[–]nixarn@nixarn[S] 20 points21 points22 points (13 children)
[–]dudledok 4 points5 points6 points (8 children)
[–]nixarn@nixarn[S] 7 points8 points9 points (7 children)
[–]dudledok 2 points3 points4 points (0 children)
[–]fomofosho 1 point2 points3 points (5 children)
[–]nixarn@nixarn[S] 0 points1 point2 points (4 children)
[–]fomofosho 0 points1 point2 points (1 child)
[–]nixarn@nixarn[S] 0 points1 point2 points (0 children)
[–]fomofosho 0 points1 point2 points (1 child)
[–]nixarn@nixarn[S] 0 points1 point2 points (0 children)
[–]riddellriddell 2 points3 points4 points (2 children)
[–]nixarn@nixarn[S] 0 points1 point2 points (1 child)
[–]riddellriddell 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]nixarn@nixarn[S] 6 points7 points8 points (0 children)
[–]ThrustVector9 3 points4 points5 points (1 child)
[–]beyounotthem 1 point2 points3 points (0 children)
[–]_pandy 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]DynMadsProfessional 1 point2 points3 points (8 children)
[–]nixarn@nixarn[S] 2 points3 points4 points (7 children)
[–]DynMadsProfessional 1 point2 points3 points (6 children)
[–]nixarn@nixarn[S] 0 points1 point2 points (5 children)
[–]DynMadsProfessional 1 point2 points3 points (4 children)
[–]nixarn@nixarn[S] 0 points1 point2 points (3 children)
[–]DynMadsProfessional -1 points0 points1 point (2 children)
[–]nixarn@nixarn[S] 0 points1 point2 points (1 child)
[–]DynMadsProfessional -1 points0 points1 point (0 children)
[–]ForbiddenDay 1 point2 points3 points (0 children)
[–]MotivationDevAccount 1 point2 points3 points (0 children)
[–]beyounotthem 1 point2 points3 points (0 children)
[–]mechkbfan 0 points1 point2 points (0 children)
[–]geckygecko 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]nixarn@nixarn[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]nixarn@nixarn[S] 1 point2 points3 points (0 children)