Modern Git Commands and Features You Should Be Using
Switch, restore, sparse checkout, worktree, bisect
https://martinheinz.dev/blog/109
#git
Switch, restore, sparse checkout, worktree, bisect
https://martinheinz.dev/blog/109
#git
martinheinz.dev
Modern Git Commands and Features You Should Be Using
<p>
All of us - software engineers - use <code class="inline">git</code> every day, however most people only ever touch the most basic of commands, such as...
All of us - software engineers - use <code class="inline">git</code> every day, however most people only ever touch the most basic of commands, such as...
👍4🔥2
UnityDomainReloadHelper
A couple of attributes that help when Domain Reloading is disabled, which significantly decreases the time it takes for Unity to play a scene. By default, Unity provides the RuntimeInitializeOnLoadMethod attribute to assist, but it can be a little cumbersome.
I encourage you to write code in a way that allows you to turn off the domain reload upon entering play mode. It greatly speeds up the workflow even for my small pet projects. I have also worked on projects in production that have more than 1k assembly definitions, and reloading takes ages, so entering play mode was painfully slow and without this option turned off it was really hard to work.
https://github.com/joshcamas/unity-domain-reload-helper
#domainreload #attribute #editortools
A couple of attributes that help when Domain Reloading is disabled, which significantly decreases the time it takes for Unity to play a scene. By default, Unity provides the RuntimeInitializeOnLoadMethod attribute to assist, but it can be a little cumbersome.
I encourage you to write code in a way that allows you to turn off the domain reload upon entering play mode. It greatly speeds up the workflow even for my small pet projects. I have also worked on projects in production that have more than 1k assembly definitions, and reloading takes ages, so entering play mode was painfully slow and without this option turned off it was really hard to work.
https://github.com/joshcamas/unity-domain-reload-helper
#domainreload #attribute #editortools
GitHub
GitHub - joshcamas/unity-domain-reload-helper: A couple of attributes that help disabling Domain Reloading in Unity easier
A couple of attributes that help disabling Domain Reloading in Unity easier - joshcamas/unity-domain-reload-helper
👍6🔥4
How to implement multi-threaded frustum culling in Unity C#
Unity does this process under the hood already, but for some special cases with a custom renderer it might be needed.
https://www.pinwheelstud.io/post/frustum-culling-in-unity-csharp
#jobsystem #culling
Unity does this process under the hood already, but for some special cases with a custom renderer it might be needed.
https://www.pinwheelstud.io/post/frustum-culling-in-unity-csharp
#jobsystem #culling
Pinwheel Studio
Unity frustum culling - How to do it in multi-threaded C# with Jobs System
A quick algorithm to do Unity frustum culling using planes vs AABB test
🔥6👍2
How To Fix Deep Link/Push Notifications Crashes On Unity iOS after Apple Privacy Manifests update (and Why Software Design Matters)
A nasty crash appeared after the update from Unity 2021.3.31f1 to 2021.3.36f1, and the update was required due to the Apple privacy update and the introduction of Privacy manifest files since the support for it was added relatively recently. So you either have already encountered this crash or would encounter it soon if you publish your games to the App Store and use Facebook SDK and deep links as the deadline for this update is really close.
Strangely it was reproduced only on iOS 15 and 16, while iOS 17 was okay.
It turned out to be an interesting investigation, so I wanted to share the details with you.
It's funny how the regex to replace the generated UnityAppController.mm in FB SDK has been sitting there since 2015 and only now fired so badly causing a crash on a subset of devices. And it happened due to the UnityAppController.mm template being updated in one of the newer Unity versions.
And it's a perfect example of "Unknown Unknowns" discussed in "A Philosophy of Software Design" by John Ousterhout. Unknown unknowns increase the complexity of your system, but when it happens between 2 third parties it becomes multitudes times harder to track and resolve.
I definitely recommend the book.
According to the issue tracker, it also happens in 2022 and 2023, so now you know what to do if your app starts crashing on iOS after Unity update.
https://gamedev.center/how-to-fix-deep-link-push-notifications-crashes-on-unity-ios-and-why-software-design-matters/
#crash #ios
A nasty crash appeared after the update from Unity 2021.3.31f1 to 2021.3.36f1, and the update was required due to the Apple privacy update and the introduction of Privacy manifest files since the support for it was added relatively recently. So you either have already encountered this crash or would encounter it soon if you publish your games to the App Store and use Facebook SDK and deep links as the deadline for this update is really close.
Strangely it was reproduced only on iOS 15 and 16, while iOS 17 was okay.
It turned out to be an interesting investigation, so I wanted to share the details with you.
It's funny how the regex to replace the generated UnityAppController.mm in FB SDK has been sitting there since 2015 and only now fired so badly causing a crash on a subset of devices. And it happened due to the UnityAppController.mm template being updated in one of the newer Unity versions.
And it's a perfect example of "Unknown Unknowns" discussed in "A Philosophy of Software Design" by John Ousterhout. Unknown unknowns increase the complexity of your system, but when it happens between 2 third parties it becomes multitudes times harder to track and resolve.
I definitely recommend the book.
According to the issue tracker, it also happens in 2022 and 2023, so now you know what to do if your app starts crashing on iOS after Unity update.
https://gamedev.center/how-to-fix-deep-link-push-notifications-crashes-on-unity-ios-and-why-software-design-matters/
#crash #ios
gamedev.center
How To Fix Deep Link/Push Notifications Crashes On Unity iOS
A crash that happens when opening the app via a notification or a deep link occurred after the Unity version update. Strangely, it was reproduced only on iOS 15 and 16, while working correctly on iOS 17. It affected various versions, including 2021.3, 2022.3…
🔥6👍3
Noisy Nodes: Adds various noise generation nodes to Unity Shader Graph, including 3D noise nodes.
https://github.com/JimmyCushnie/Noisy-Nodes
#shadergraph #noise
https://github.com/JimmyCushnie/Noisy-Nodes
#shadergraph #noise
👍6🔥2
mixandjam/balatro-feel: Recreating the basic Game Feel from Balatro
I've played Balatro a lot, and one of the reasons it's so satisfying is its animations and card behavior. Despite being pretty simple, the attention to detail is crazy. Once, I even caught myself staring at the card iteration animation, which is a plain white texture fade-out, but it blends so nicely with the overall flow.
https://github.com/mixandjam/balatro-feel
#feature #feel #balatro
I've played Balatro a lot, and one of the reasons it's so satisfying is its animations and card behavior. Despite being pretty simple, the attention to detail is crazy. Once, I even caught myself staring at the card iteration animation, which is a plain white texture fade-out, but it blends so nicely with the overall flow.
https://github.com/mixandjam/balatro-feel
#feature #feel #balatro
👍4🔥3
Enableable Components Generated Code
How do enableable components work under the hood with the job system? There is actually the same code generated for both regular and enableable components, and multiple ifs decide how the components are processed.
https://gametorrahod.com/enableable-generated-code/
#ecs #dots
How do enableable components work under the hood with the job system? There is actually the same code generated for both regular and enableable components, and multiple ifs decide how the components are processed.
https://gametorrahod.com/enableable-generated-code/
#ecs #dots
Game Torrahod
Enableable Components Generated Code
On surface this feature sounds like a nice little thing they added for us, but underneath it has a lot going on.
👍2🔥1
The Strange Graphics Of LETHAL COMPANY
The case when it's so strange that it turns out to be genius.
https://www.youtube.com/watch?v=Z_-am00EXIc
#rendering
The case when it's so strange that it turns out to be genius.
https://www.youtube.com/watch?v=Z_-am00EXIc
#rendering
YouTube
The Strange Graphics Of LETHAL COMPANY
The first 500 people to use my link will get a 1 month free trial of Skillshare: https://skl.sh/acerola01241 ! #ad
Lethal Company has some very compelling visuals, but how much of it did the developer make themselves? And how does it all come together?
…
Lethal Company has some very compelling visuals, but how much of it did the developer make themselves? And how does it all come together?
…
👍2🔥2
When, where, and why to put [BurstCompile], with mild under-the-hood explanation
A while ago, I was reviewing the burst inspector and noticed that only static methods were being bursted while others that I thought should qualify were not (no reference types, structs passed as ref args, etc.). After I had made these methods static, they were bursted right away. I was wondering why this was the case because I haven't seen that requirement in the docs (I probably just missed it). Anyway, I have recently found this thread which directly answers this question.
https://forum.unity.com/threads/when-where-and-why-to-put-burstcompile-with-mild-under-the-hood-explanation.1344539/
#dots #ecs
A while ago, I was reviewing the burst inspector and noticed that only static methods were being bursted while others that I thought should qualify were not (no reference types, structs passed as ref args, etc.). After I had made these methods static, they were bursted right away. I was wondering why this was the case because I haven't seen that requirement in the docs (I probably just missed it). Anyway, I have recently found this thread which directly answers this question.
The first two things to know, from which all else flows, but seems a bit surprising at first:
1. Burst can only ever burst static methods, period, end of story. If you want this to happen outside of the special cases outlined below, just put [BurstCompile] on a static method and on its declaring type.* When you call this method, it will call the bursted version automatically, assuming burst compilation didn't fail.
2. Unless you try really hard, all C# called from bursted code is bursted.
https://forum.unity.com/threads/when-where-and-why-to-put-burstcompile-with-mild-under-the-hood-explanation.1344539/
#dots #ecs
👍6🔥1
Master Realtime VFX in Unity and Substance Designer! Learn How to Create a Fire AOE Orb!
I used this tutorial to create a fire orb for my game. It's 1 hour long, but covers everything in detail. If you are new to the shader graph, then I definitely recommend it.
https://www.youtube.com/watch?v=Cb3Zv9H1os4
#vfx #shadergraph
I used this tutorial to create a fire orb for my game. It's 1 hour long, but covers everything in detail. If you are new to the shader graph, then I definitely recommend it.
https://www.youtube.com/watch?v=Cb3Zv9H1os4
#vfx #shadergraph
YouTube
Master Realtime VFX in Unity and Substance Designer! Learn How to Create a Fire AOE Orb!
Hey hey! Welcome to our very first tutorial in real-time visual effects! I've been dying to share my knowledge and secrets with you all, and I'm so excited to finally be able to do it.
Together, we're going to dive deep into the world of real-time visual…
Together, we're going to dive deep into the world of real-time visual…
👍5🔥1
Unity UI Toolkit documentation code examples
We are actively adopting UI Toolkit for our editor tools. And it turns out to be pretty convenient.
Still a lot of concerns regarding using it in the runtime tho. Do you have any experience with it for in-game UI? How is it going? Would you recommend it? Would be happy to discuss in the comments.
Editor UI examples
Get started with UI Toolkit
Relative and absolute positioning C# example
Create a Custom Inspector
Runtime UI examples
Get started with runtime UI
And many more other examples how to do different stuff with it. Check the full list in the repo.
https://github.com/Unity-Technologies/ui-toolkit-manual-code-examples
#uitoolkit #sample
We are actively adopting UI Toolkit for our editor tools. And it turns out to be pretty convenient.
Still a lot of concerns regarding using it in the runtime tho. Do you have any experience with it for in-game UI? How is it going? Would you recommend it? Would be happy to discuss in the comments.
Editor UI examples
Get started with UI Toolkit
Relative and absolute positioning C# example
Create a Custom Inspector
Runtime UI examples
Get started with runtime UI
And many more other examples how to do different stuff with it. Check the full list in the repo.
https://github.com/Unity-Technologies/ui-toolkit-manual-code-examples
#uitoolkit #sample
GitHub
GitHub - Unity-Technologies/ui-toolkit-manual-code-examples: Unity UI Toolkit documentation code examples
Unity UI Toolkit documentation code examples. Contribute to Unity-Technologies/ui-toolkit-manual-code-examples development by creating an account on GitHub.
👍5🔥3
An unusual post for this channel and a note on why I haven't posted in a while. I had the pleasure of giving a talk at Digital Dragons about "The Controllers Tree," the architectural framework developed by some of the top-tier engineers at our company.
I didn't expect the venue to be completely packed. I was pleasantly surprised to see so many people interested in the architecture at the event.
And of course, thanks to all the engineers who participated in developing the framework.
It helps us to build and grow multiple of the biggest mobile games.
We hope to release the Controllers Tree package as an open-source solution soon, so stay tuned. I also hope the video of the talk will be posted by the organizers on YouTube soon, so I can share it here. Drop a comment if you happened to attend this conference too.
I didn't expect the venue to be completely packed. I was pleasantly surprised to see so many people interested in the architecture at the event.
And of course, thanks to all the engineers who participated in developing the framework.
It helps us to build and grow multiple of the biggest mobile games.
We hope to release the Controllers Tree package as an open-source solution soon, so stay tuned. I also hope the video of the talk will be posted by the organizers on YouTube soon, so I can share it here. Drop a comment if you happened to attend this conference too.
🔥20
[C#] Asynchronous processing and async/await
A great overview of how async/await works, from the differences between async and multithreading programming to explaining how async is compiled and operates under the hood. It's an excellent resource for interview preparation.
The content is in Japanese, but it's by the already legendary Annulus Games, and auto-translation does a good job.
https://annulusgames.com/blog/async-await/
#async #interview
A great overview of how async/await works, from the differences between async and multithreading programming to explaining how async is compiled and operates under the hood. It's an excellent resource for interview preparation.
The content is in Japanese, but it's by the already legendary Annulus Games, and auto-translation does a good job.
https://annulusgames.com/blog/async-await/
#async #interview
Annulus Games
【C#】非同期処理とasync/await - Annulus Games
今回の記事はasync/awaitについて。 C#に限らず、現在では多くのプログラミング言語が非同期処理を扱う
👍10🔥2
Instantly Boost Unity Game Performance With IL2CPP_USE_SPARSEHASH
Finally, another post on my blog. This investigation was time-consuming, and while I won't say I enjoy digging through generated C++ code, the results were worth the effort. Hit the fire emoji if you like this type of content and want me to write more of it.
The metadata in IL2CPP generated for each type and used for tasks like virtual method invocation is barely covered online. Not even the Unity documentation provides sufficient information. More crucially, you won't find details online about how the metadata is stored in memory or the existence of the define IL2CPP_USE_SPARSEHASH. In this post, I dive into the internals available in the generated C++ code to learn more about it and how we can significantly boost the performance of some operations in our games using this knowledge.
Here is a lifehack to improve performance using a concrete example of dependency resolution at the app start for all DI enjoyers. Of course, this isn't free, but performance is always about compromise.
https://gamedev.center/instantly-boost-unity-game-performance-with-il2cpp_use_sparsehash/
I've also posted this on Reddit, so I would appreciate it if you upvote it for all the effort put into this: a reddit post
#il2cpp #performance #optimization #IL2CPP_USE_SPARSEHASH
Finally, another post on my blog. This investigation was time-consuming, and while I won't say I enjoy digging through generated C++ code, the results were worth the effort. Hit the fire emoji if you like this type of content and want me to write more of it.
The metadata in IL2CPP generated for each type and used for tasks like virtual method invocation is barely covered online. Not even the Unity documentation provides sufficient information. More crucially, you won't find details online about how the metadata is stored in memory or the existence of the define IL2CPP_USE_SPARSEHASH. In this post, I dive into the internals available in the generated C++ code to learn more about it and how we can significantly boost the performance of some operations in our games using this knowledge.
Here is a lifehack to improve performance using a concrete example of dependency resolution at the app start for all DI enjoyers. Of course, this isn't free, but performance is always about compromise.
https://gamedev.center/instantly-boost-unity-game-performance-with-il2cpp_use_sparsehash/
I've also posted this on Reddit, so I would appreciate it if you upvote it for all the effort put into this: a reddit post
#il2cpp #performance #optimization #IL2CPP_USE_SPARSEHASH
gamedev.center
Boost Unity Game Performance With IL2CPP_USE_SPARSEHASH
Dive into IL2CPP internals & learn how to use IL2CPP_USE_SPARSEHASH to make your games faster. Unlock over 2x performance boost for operations that use metadata
🔥25👍4💯1
ECS Galaxy Sample: a project showing a large-scale simulation of several teams of spaceships fighting for the control of planets. This is a fully-automated simulation, but players can spectate using different camera modes. Players can also bring up a "Settings" menu during play to tweak some simulation parameters in realtime.
This sample aims to strike a balance between being simple and lightweight enough to be easy to learn from, and involving enough non-trivial ECS game code (AI, spatial queries, event-based logic, different unit/building types and roles, etc...) to make an interesting showcase.
https://github.com/Unity-Technologies/ECSGalaxySample
#ecs #dots #sample
This sample aims to strike a balance between being simple and lightweight enough to be easy to learn from, and involving enough non-trivial ECS game code (AI, spatial queries, event-based logic, different unit/building types and roles, etc...) to make an interesting showcase.
https://github.com/Unity-Technologies/ECSGalaxySample
#ecs #dots #sample
GitHub
GitHub - Unity-Technologies/ECSGalaxySample: ECS sample demonstrating an automated simulation of teams of spaceships fighting for…
ECS sample demonstrating an automated simulation of teams of spaceships fighting for the control of planets - Unity-Technologies/ECSGalaxySample
👍11🔥7
Chunk's Change Version
A detailed post on how .WithChangeFilter<T>() works in Entities
https://gametorrahod.com/change-version/
#dots #ecs
A detailed post on how .WithChangeFilter<T>() works in Entities
Then, there is a per-chunk number called ✏️ change version. How the chunk is considered "changed" in order to update this number is rather crude : Instantly when a query is executed related to that component and it has write permission. Then, chunks returned for that query will all get their ✏️ change version updated
It does not check whether system actually "change" the component's value with its work using the query. It just see the write dependency and thought the system "probably" changed that for all the matched chunks.
It is per chunk. There are other entities in the chunk that are not actually changed and still get iterated. Your logic must not be destructive to these entities. Try treating changed filter as optimization rather than branching logic, always imagine if the changed filter is removed, everything must still work like before but with worse performance
https://gametorrahod.com/change-version/
#dots #ecs
Game Torrahod
Chunk's Change Version
DOTS comes with a per-chunk versioning and a related filter feature. This feature can optimize processing the data only when it mattered.
👍3
List Add is way slower (almost 3 times) in
dotnet/runtime
This is an interesting discussion and investigation into why performance significantly drops on one of the platforms after optimization in net9.0. I always love reading how engineers solve complex problems. It's fascinating to see what changes under the hood can cause such big differences in performance and how they track down the issue.
https://github.com/dotnet/runtime/issues/101437
#performance
net9.0 preview 3 than with net8.0dotnet/runtime
This is an interesting discussion and investigation into why performance significantly drops on one of the platforms after optimization in net9.0. I always love reading how engineers solve complex problems. It's fascinating to see what changes under the hood can cause such big differences in performance and how they track down the issue.
https://github.com/dotnet/runtime/issues/101437
#performance
GitHub
List Add is way slower (almost 3 times) in `net9.0 preview 3` than with `net8.0` · Issue #101437 · dotnet/runtime
With the latest preview 3 (net9) there seems to be a major performance regression on MacOS 14.4 (M2 Pro) with lists. Given that they are one of the most used types, it should receive special treatm...
👍6🔥2
10 Unity Audio Optimisation Tips
There are a few posts covering audio optimization available. While it's true that this topic is usually overlooked since assets, noscripts, and rendering optimizations yield more significant performance gains, it's great to have such posts bookmarked, as they list a lot of high-quality tips. Moreover, now you know that sounds might also cripple performance.
https://gamedevbeginner.com/unity-audio-optimisation-tips/
#audio #optimization
There are a few posts covering audio optimization available. While it's true that this topic is usually overlooked since assets, noscripts, and rendering optimizations yield more significant performance gains, it's great to have such posts bookmarked, as they list a lot of high-quality tips. Moreover, now you know that sounds might also cripple performance.
https://gamedevbeginner.com/unity-audio-optimisation-tips/
#audio #optimization
Game Dev Beginner
10 Unity Audio Optimisation Tips
Learn the right way to optimise audio in your Unity projects with my 10 most useful audio optimisation tips…
👍4🔥2
Unity Shader Variants Optimisation and Troubleshooting
When using shaders from the asset store it might become challenging to control shader variants leading to increased build size and time to prewarm it. It's a good post to bookmark and get back to it during your project check ups.
https://dev.to/attiliohimeki/unity-shader-variants-optimisation-and-troubleshooting-28ci
#optimization #shader #shadervariants
When using shaders from the asset store it might become challenging to control shader variants leading to increased build size and time to prewarm it. It's a good post to bookmark and get back to it during your project check ups.
https://dev.to/attiliohimeki/unity-shader-variants-optimisation-and-troubleshooting-28ci
#optimization #shader #shadervariants
DEV Community
Unity Shader Variants Optimisation and Troubleshooting
Note: This blogpost is also available on Unity's official blog:...
👍5🔥5