I think Unity needs to watch this presentation themselves :D
@soviut8 жыл бұрын
I'm sure they already know all about this internally or from working directly with Playdead, but as is the case with any large software project, it can't all get done instantly. What may seem like obvious optimizations to you don't matter to the person who wants physically based shaders or a better audio engine, for example.
@youtubesuresuckscock6 жыл бұрын
So basically it's more difficult to write high performance games in Unity than it is just writing them in C or C++. Awesome engine!
@klarnorbert4 жыл бұрын
@@youtubesuresuckscock They fixed 99% of these issues back in 2017, so you're safe.
@milktea00013 жыл бұрын
@@youtubesuresuckscock unity is the best game engine right now, I know it was so many issues back then, but it's alright now
@CynicatPro8 жыл бұрын
People need to watch the last part about scripting tips. Its so good!
@МаксимКощеев-л9н7 жыл бұрын
Why?
@illsaveus4 жыл бұрын
Honestly the fact that Unity does not actually make games is a HUGE handicap for them. When he said that, it really resonated with me.
@ExtraChannel-yk5pf Жыл бұрын
U have no idea what coming, past unity user.
@The28studio8 жыл бұрын
Congrats on winning best art direction , well deserved
@Xarbrough8 жыл бұрын
Great info! The first half of the talk felt a little long, but still good information in it. The scripting part was paced perfectly and also had great tips. Thank you!
@Radial9Gaming7 жыл бұрын
Unity need to get all these game devs that are optimizing their shit and work together to improve performance immensely
@soviut8 жыл бұрын
The profiling tools (especially the historical ones) are the kind of large-grained analytics that nobody considers until they're neck deep in performance issues and wondering why something that ran just fine last build is broken now. Making decisions based on data, instead of guessing, will save you so much time, money and pain.
@yksnimus6 жыл бұрын
What we learned today? Use unity for the editor only, the rest you redo when possible.
@andidroid64658 жыл бұрын
"Scripting Performance" at 28:32 !!!!! Awesome ! You have to see!
@razzraziel5 жыл бұрын
these optimizations are the reason why most devs using their inhouse engines and c++. its valid for almost all ready to use general products. for example you cant just buy an asset from store and hope for the best, you have to optimize for your specific needs. great talk btw, i wonder how many changed in 2018.3
@forestrf2 жыл бұрын
From 2016 and it's now on Nov. of 2022 when we finally got SetLocalPositionAndRotation(). At least we got it, took a while.
@minichimera7 жыл бұрын
This is great, thank you guys at Playdead!
@zorochii4 жыл бұрын
I'd love to know how some of these optimizations stand as of last versions of Unity, some seem pretty useable no matter the version (reducing the amount of vector maths and stuff), but some others like the Update and FixedUpdate, I'd like to know if that's still the case, if it still holds up the same or if there's been any work done on it. I'm kind of sure there will always be some overhead, but wondering if it got reduced, or not.
@w0nnafight2 жыл бұрын
I know its an old comment, but in case anyone is wondering, most of these things got optimized in the latest versions of unity
@macdx28155 жыл бұрын
What are those sub-scenes exactly? An actual, just small scene? A prefab?
@Bigboi03308 жыл бұрын
Last presentation was the only thing I can for :)
@Wowbagger847 жыл бұрын
How much of the script optimizations are fixed or going to be fixed by unity?
@Lilithe7 жыл бұрын
Am I the only one who kept hearing bounds colours? When he finally spelled it on a slide I was like, "OH! That makes FAR more sense." XD
@ewwitsantonio3 жыл бұрын
Can someone help me understand why you can cache Time.deltaTime? Doesn't it need to update every frame?
@martinleidel Жыл бұрын
Yes it does. But if you use it several times in an inner loop within the same frame, it's better to read it once and use that cached value instead of calling Time.deltaTime multiple times within the same frame. Not sure that's still a thing today with the latest Unity versions though but as there is still that C#/C++ bridge I guess it is.
@martinleidel Жыл бұрын
Yes it does. But if you use it several times in an inner loop within the same frame, it's better to read it once and use that cached value instead of calling Time.deltaTime multiple times within the same frame. Not sure that's still a thing today with the latest Unity versions though but as there is still that C#/C++ bridge I guess it is.
@dino3397 жыл бұрын
it's funny.. some of scripting tips mentioned are amazing.. these same tips.. i found overtime some devs in unity forums saying those little changes in code don't matter much.. (focus on other things) i guess they were amateurs.. everything matters.. and those little things can have a toll on performance if they stack together..
@JFrameMan6 жыл бұрын
Anybody got tips on creating your own update functions? Do you use coroutines to find out when each frame ends?
@Aladato4 жыл бұрын
Give the manager a list of behaviours that need to know when the frame ends and have it notify them the same way it does for the update.
@shihmeng916 жыл бұрын
anyone can explain to me what he means by build-time at 15:30 ??
@DasAntiNaziBroetchen6 жыл бұрын
Build time is before you run the game. When you "build" the game, so you can run it later. AKA an offline process.
@mcdev68687 жыл бұрын
A year after SetLocalPositionAndRotation doesn't seem to be available.
@w0nnafight2 жыл бұрын
it is now
@DommageCollateral3 жыл бұрын
how does the voxel grid registeres objects? collision detection?
@autorotate18035 жыл бұрын
Now there is a method to set rotation and position (SetPositionAndRotation) but not for setting local postion
@clalqurbanov32087 жыл бұрын
Wow, I didn't know Demon Kane works as programmer after WWE
@nin10dorox5 жыл бұрын
39:32 Why can't they overload the vector math operators to do what they write out in their code? Wouldn't you get the best of both worlds?
@sasuke29105 жыл бұрын
Probably because it still means calling a function, or making sure inlining is working correctly. You also kinda create a non-compliant version of Vector3 that has weird behaviour. I'd guess that blowing it all out is easier than messing with compiler settings and overloaded operators. It seems like, ideally, you'd want to create your own vector type with that self modifying behaviour.
Thank you for sharing your good work! Playdead's are the best :D
@best-tof8 жыл бұрын
One thing that has puzzled me since I've watcher your talk is about the sub scenes: are the sub scenes actually prefabs (or similar?) or actual scenes that are loaded additively or are all subscene objects always present, but deactivated, in the main scene?
@ZoidbergForPresident8 жыл бұрын
You can load additional scenes in Unity now, I think that's what they've used.
@JohnDaniels9 ай бұрын
I love "Foreach"!!, no wait, I love get all actors of class.
@In-N-Out3335 жыл бұрын
Sorry for the noob question, but what does he mean by event subscriptions being expensive? Is he talking about a function subscribing to a delegate?
@dyemos5 жыл бұрын
Hmmm, I feel he may refer to Unity Events, which rely heavily upon reflection?
@inkajoo7 жыл бұрын
Yeesh. They might as well have made their own game engine...
@faythe035 жыл бұрын
How much of this is relevant with Unity 2018/2019. Does anybody know?
@ProGaming-kb9io5 жыл бұрын
Maybe we will need to profile it :D
@GameDevASMR8 ай бұрын
I wish Playdead would have made all those amazing tools available before moving to Unreal Engine, even paying on the Asset Store. But maybe too difficult if most of those tools were relying on Unity source code changes :/.
@Exbleative8 жыл бұрын
I wonder how crazy they'd have needed to go with optimizing if they'd not released on consoles, or weren't so bothered with slight fps hitches and/or loading screens?
@PavelShevaev7 жыл бұрын
Great info especially about recording profiling data! Guys how do you record that stuff? Profiling.Profiler.logFile = "profile.log"; Profiling.Profiler.enableBinaryLog = true; Profiling.Profiler.enabled = true; Is this the way to go?
@HaykAmirbekyanTKD5 жыл бұрын
what of the player is constant;y spinning his view frustum around? doesn't that cause unnecessary loading and unloading of assets which can hinder performance?
@forasago Жыл бұрын
The player doesn't control the camera in the game they're talking about. The camera pretty much just follows player movement, and that movement is slow.
@toreole4 жыл бұрын
"unity source code changes" ah yes the forbidden fruit
@NunSuperior8 жыл бұрын
If you want source code examples I have a Unity project demonstrating them here : bitbucket.org/GarretPolk/unity-script-performance/overview
@Kolyasisan5 жыл бұрын
But wait, the vector math point doesn't make sense at all... Vector multiplications should be automatically done on SIMDs in parallel to actually save on performance. Why exactly is it faster when you create 3 separate mult ops for each of the vector elements instead of just doing one vector mult op? Is it because you need to create a Vector3 struct internally to do that or is there some other reason?
@moe4b3 жыл бұрын
Most likely Unity's Mono & IL2CPP runtimes don't make use of those instructions
@BeLuckyDaf8 жыл бұрын
Sorry, I could catch up, why could not they use localposition? What was the problem there?
@jan0503757 жыл бұрын
if a simple sidescroller requires a year of optimizing, i'm really scared to make a 3D game in unity. on the other hand, UE4 is a real pain in the butt and constantly blocking my workflow and i'm sure i'll never get anything done.
@sergeyyjyakunin15145 жыл бұрын
good for me. Because while you're afraid I develope
@jackchu54538 жыл бұрын
I wish someone would've asked about coroutines.
@TheMeanArena8 жыл бұрын
MEC is pretty amazing dealing with coroutines and per frame garbage generation
@terrynguyen56097 жыл бұрын
What was the name of the post? I was looking through the technology section but couldn't find anything. The closest thing I found was "10000 UPDATE() CALLS" which discusses the internal event loop and the pros and cons of running things via Update() vs. creating your own event loop to control the game with.
@nikakasradze73447 жыл бұрын
hm, sorry I just wrote very stupid comment, thanks for bumping this. Yes I had that article in mind. I guess I should have written 10k Updates vs 1 Update calling 10k ManagedUpdates. I've deleted my old comment
@Sarseth904 жыл бұрын
Btw after third presentation - and specially after, dont use update. I'm like... "drop unity, find engine that can render only graphics".
@angle28907 жыл бұрын
WWHAT ? SO HOW TO EXPOSE SETLOCALPOSITIONANDROTATION ??
@svozmas7 жыл бұрын
Paying for it, it's the only way you can access Unity source code.
@thomaskey73887 жыл бұрын
I believe SetPositionAndRotation(Vector3, Quaternion) is now exposed, at least as of 5.6. Not sure about SetLocalPositionAndRotation(). See docs.unity3d.com/560/Documentation/ScriptReference/Transform.SetPositionAndRotation.html
@SmartK87 жыл бұрын
In older versions you should - theoretically - be able to cache reflection (it ignores privacy modifiers). So cache MethodInfo and then just Invoke it manually.
@Sarseth904 жыл бұрын
39:52 visual manipulation :P I really like the ideas, but I dont like that you've changed street fighter guy size, cause it's making visual mislead. This should not be done, ever. Cause we're losing the scale there. Why? Check getdolphins page for "worst graphs of YYYY". But I love the content, I mean all those things you've made there.