Position-Based-Dynamics: A PBD fluid in unity running on the GPU
Position based dynamics is a method used to simulate physical phenomena like cloth, deformation, fluids, fractures, rigidness and much more. The key process in PBD is to simulate the object as a set of points and constraints. Forces are applied to the points to move them and then the constraints make sure the points wont move in a way that violates the simulation.
https://github.com/Scrawk/PBD-Fluid-in-Unity
#simulation #fluid
Position based dynamics is a method used to simulate physical phenomena like cloth, deformation, fluids, fractures, rigidness and much more. The key process in PBD is to simulate the object as a set of points and constraints. Forces are applied to the points to move them and then the constraints make sure the points wont move in a way that violates the simulation.
https://github.com/Scrawk/PBD-Fluid-in-Unity
#simulation #fluid
GitHub
GitHub - Scrawk/PBD-Fluid-in-Unity: A PBD fluid in unity running on the GPU
A PBD fluid in unity running on the GPU. Contribute to Scrawk/PBD-Fluid-in-Unity development by creating an account on GitHub.
👍2
Terrain Scanner Effect
An interesting approach is used to achieve the scanner effect: spawn a transparent sphere with an intersection shader and scale it over time.
https://youtu.be/9DshpqhKDz0
#shadergraph #scan
An interesting approach is used to achieve the scanner effect: spawn a transparent sphere with an intersection shader and scale it over time.
https://youtu.be/9DshpqhKDz0
#shadergraph #scan
YouTube
Unity Shader Graph - Terrain Scanner Effect Tutorial
Let's see how to create a Terrain Scanner effect in Unity! With the help of Shader Graph this tutorial shows an approach to scanning terrains in games similarly to Death Stranding or No Man's Sky! Enjoy folks!
00:00 Intro
01:07 Scene Overview
01:37 Particle…
00:00 Intro
01:07 Scene Overview
01:37 Particle…
👍3
Supercharge Your Game with Unity ECS: Scaling from 3 to 5000 Characters
The video is in Japanese, but it's made by the one and only Keijiro and has subnoscripts.
Shows how using [BurstCompile] and jobs improves performance in the sample by a lot.
https://www.youtube.com/watch?v=zn3m6ZFppdQ
#ecs #dots
The video is in Japanese, but it's made by the one and only Keijiro and has subnoscripts.
Shows how using [BurstCompile] and jobs improves performance in the sample by a lot.
https://www.youtube.com/watch?v=zn3m6ZFppdQ
#ecs #dots
YouTube
Unity ECS で高速化!とりあえずキャラを 5,000 体出してみよう!
Unity ECS (Entity Component System) チュートリアルの第2弾です。前回はパフォーマンスの話を敢えて避けましたが、今回はいよいよ最適化に取り組んでみたいと思います。前回は3体だけだった人形を 5,000 体にまで増やしてみましょう。 ECS なら大丈夫!前回のチュートリアルはこちら...
👍3💩1
Improvements to Unity shader files in Rider 2023.2
TL;DR: More autocompletion in Rider when working with shaders, which is always great and should help a lot, especially developers who are new to writing shaders.
https://blog.jetbrains.com/dotnet/2023/07/25/improvements-to-unity-shader-files-in-rider-2023-2/
#shader
TL;DR: More autocompletion in Rider when working with shaders, which is always great and should help a lot, especially developers who are new to writing shaders.
https://blog.jetbrains.com/dotnet/2023/07/25/improvements-to-unity-shader-files-in-rider-2023-2/
#shader
The JetBrains Blog
Improvements to Unity shader files in Rider 2023.2 | The .NET Tools Blog
With the release of Rider 2023.2 just around the corner, it’s time to take a look at all the new features we’ve added for Unity shader files. This release builds on the existing support for ShaderL
👍5🔥1
Mechanics and tricks from Platformers applied to Endless Runners to improve experience
The author describes multiple platformer mechanics and provides code samples for them. I believe such mechanics are must have in a platformer game nowadays, and I definitely gonna implement all of them in a kinematic character controller I develop for my own roguelike game with platformer mechanics.
The list of mechanics:
- Early Fall: Player descends as soon as jump button is let go ending jump early.
- Jump Buffering: When the character is already in the air pressing jump moments before touching the ground will trigger jump as soon as they land.
- Predict Ground Collision: When the character is already in the air pressing jump and there is a platform near and below, it can jump as it is already on the ground.
- Coyote Time: Jump still triggered a few frames after running off a ledge.
- Catch Missed Jumps: If a player doesn’t quite make a jump either lift them up a few pixels or change the collision mask so their feet don’t hit the wall.
https://arielcoppes.dev/2023/04/10/platformer_techniques_in_endless_runner.html
#platformer
The author describes multiple platformer mechanics and provides code samples for them. I believe such mechanics are must have in a platformer game nowadays, and I definitely gonna implement all of them in a kinematic character controller I develop for my own roguelike game with platformer mechanics.
The list of mechanics:
- Early Fall: Player descends as soon as jump button is let go ending jump early.
- Jump Buffering: When the character is already in the air pressing jump moments before touching the ground will trigger jump as soon as they land.
- Predict Ground Collision: When the character is already in the air pressing jump and there is a platform near and below, it can jump as it is already on the ground.
- Coyote Time: Jump still triggered a few frames after running off a ledge.
- Catch Missed Jumps: If a player doesn’t quite make a jump either lift them up a few pixels or change the collision mask so their feet don’t hit the wall.
https://arielcoppes.dev/2023/04/10/platformer_techniques_in_endless_runner.html
#platformer
Ariel Coppes [Game Developer]
Mechanics and tricks from Platformers applied to Endless Runners to improve experience
There are multiple mechanics and tricks from Platformer games that can be applied in Endless Runners as well. I want to share here what am I doing for the game I am working on and how.
👍5
This media is not supported in your browser
VIEW IN TELEGRAM
Platforming Tips and Tricks
As a game developer it is your job to make the character move as the player wants, NOT how the player inputs controls. Even if you think your niche is having a very hard game that only makes it more important that your controls are forgiving.
The post also contains a playable demo with these tricks implemented.
http://www.davetech.co.uk/gamedevplatformer
Repo of the demo: https://github.com/DavidStrachan/GM-Perfect-Platforming-Paragon
#platformer
As a game developer it is your job to make the character move as the player wants, NOT how the player inputs controls. Even if you think your niche is having a very hard game that only makes it more important that your controls are forgiving.
The post also contains a playable demo with these tricks implemented.
http://www.davetech.co.uk/gamedevplatformer
Repo of the demo: https://github.com/DavidStrachan/GM-Perfect-Platforming-Paragon
#platformer
👍5
This media is not supported in your browser
VIEW IN TELEGRAM
kyubuns/AppIconChangerUnity: Change the app icon dynamically in Unity (iOS only)
https://github.com/kyubuns/AppIconChangerUnity
#icon #ios #native
https://github.com/kyubuns/AppIconChangerUnity
#icon #ios #native
👍4
Unity VFX Graph VS Particle System
A good comparison of these tools in case you haven't used VFX graph yet.
https://youtu.be/XSdXvhLjVEk
#particle #vfxgraph
A good comparison of these tools in case you haven't used VFX graph yet.
https://youtu.be/XSdXvhLjVEk
#particle #vfxgraph
YouTube
Unity VFX Graph VS Particle System - Comparing
Today, in Unity, we have a side-by-side of the Visual Effect Graph and the Particle System. Let's see the differences between this two when it comes to creating VFX for Games in Unity!
*ASSET STORE SALE* : https://assetstore.unity.com/?aid=1100l3Jhu
💥Patreon:…
*ASSET STORE SALE* : https://assetstore.unity.com/?aid=1100l3Jhu
💥Patreon:…
👍3
Three tricks with Dictionary
Tricks are:
Custom key comparer,
TryGetValue,
GetValueOrDefault
These methods can help avoid custom workarounds when working with dictionaries
https://steven-giesel.com/blogPost/53090b7c-d594-4b55-b513-60bcc7b36f35
#dictionary
Tricks are:
Custom key comparer,
TryGetValue,
GetValueOrDefault
These methods can help avoid custom workarounds when working with dictionaries
https://steven-giesel.com/blogPost/53090b7c-d594-4b55-b513-60bcc7b36f35
#dictionary
Steven-Giesel
Three tricks with Dictionary
In this short blog post, I want to showcase two nice tricks you can do with everybody's favorite data type: the dictionary.
It is a versatile data structure, and we can make it even more versatile!
It is a versatile data structure, and we can make it even more versatile!
👍5
How to instantiate a prefab in ECS?
It's interesting how such a big post needed to describe so simple action as instantiation. And it doesn't even touch the topic of using a hybrid approach, for instance to connect entity to Animator so your instantiated object can be animated using Mecanim and triggered from ECS.
https://coffeebraingames.wordpress.com/2023/07/28/how-to-instantiate-a-prefab-in-ecs/
#dots #ecs
It's interesting how such a big post needed to describe so simple action as instantiation. And it doesn't even touch the topic of using a hybrid approach, for instance to connect entity to Animator so your instantiated object can be animated using Mecanim and triggered from ECS.
https://coffeebraingames.wordpress.com/2023/07/28/how-to-instantiate-a-prefab-in-ecs/
#dots #ecs
COFFEE BRAIN GAMES
How to instantiate a prefab in ECS?
Reddit is my main social media of choice. I just really like text content more and I can choose to stay in topics or communities that I like and eventually run out of content to consume as compared…
👍3
SHOULD YOU DO EARLY ACCESS?
Basically the EA path is high risk, and slightly higher reward. Don’t do EA because you need “feedback.”
https://howtomarketagame.com/2023/07/27/should-you-do-early-access
#marketing
Basically the EA path is high risk, and slightly higher reward. Don’t do EA because you need “feedback.”
https://howtomarketagame.com/2023/07/27/should-you-do-early-access
#marketing
👍2
8 TIPS to get MORE WISHLISTS!
1. Take part in the Steam fest
2. Make sure the game is polished
3. Provide a really good tutorial to teach players how to play the game
4. Implement analytics, especially for tutorial to track at which step users drop the game
5. Use Cloud Diagnostics (a Unity service for errors and crashes)
6. Add an in-game feedback form
7. Boost wishlists a week before the fest
8. Do livestreams during the fest
https://www.youtube.com/watch?v=-cnjCyYCxxc
#marketing
1. Take part in the Steam fest
2. Make sure the game is polished
3. Provide a really good tutorial to teach players how to play the game
4. Implement analytics, especially for tutorial to track at which step users drop the game
5. Use Cloud Diagnostics (a Unity service for errors and crashes)
6. Add an in-game feedback form
7. Boost wishlists a week before the fest
8. Do livestreams during the fest
https://www.youtube.com/watch?v=-cnjCyYCxxc
#marketing
YouTube
8 TIPS to get MORE WISHLISTS!
🎮 Play the FREE Demo! (and wishlist) https://cmonkey.co/dinkyguardians_steamwishlist_steamfestivaladvice
❤️ Watch my FREE Complete Course https://www.youtube.com/watch?v=AmGSEH7QcDg
🌍 Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn…
❤️ Watch my FREE Complete Course https://www.youtube.com/watch?v=AmGSEH7QcDg
🌍 Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn…
👍3
This media is not supported in your browser
VIEW IN TELEGRAM
noio/games.noio.planter: The plant simulation from Cloud Gardens as a Unity package for level design.
https://github.com/noio/games.noio.planter
#vegetation
https://github.com/noio/games.noio.planter
#vegetation
👍6
Optimize struct performances using StructLayout
I ran a simple benchmark that passes structs as an argument: one uses StructLayout.Sequential and another StructLayout.Auto.
I intentionally ordered fields in a way that makes them have padding.
And result is (the formatting in mobile clients sucks):
It can be avoided by using 'ref' parameter so no copying occurs. I've also thrown readonly structs to the test.
https://www.meziantou.net/optimize-struct-performances-using-structlayout.htm
#optimization #struct #layout #ref
I ran a simple benchmark that passes structs as an argument: one uses StructLayout.Sequential and another StructLayout.Auto.
I intentionally ordered fields in a way that makes them have padding.
And result is (the formatting in mobile clients sucks):
| Method | Mean | Ratio |
|------- |---------:|------:|
| Auto | 298.6 us | 1.00 |
| Seq | 359.0 us | 1.20 |
Obviously copying struct that is bigger due to the padding to pass it as an arg is slower. But this operation is so quick that it might be a problem only on a very hot path.It can be avoided by using 'ref' parameter so no copying occurs. I've also thrown readonly structs to the test.
| Method | Mean | Ratio |
|------------- |---------:|------:|
| Auto | 318.5 us | 1.00 |
| Seq | 398.7 us | 1.25 |
| AutoRef | 254.5 us | 0.80 |
| SeqRef | 299.7 us | 0.94 |
| AutoReadonly | 312.9 us | 0.98 |
| SeqReadonly | 390.5 us | 1.22 |
As you can see passing both structs by ref is definitely faster. But Auto is again faster than Sequential. While readonly structs don't have any performance benefits according to this benchmark. To make sure a defensive copy of a readonly struct is avoided, I've also added 'in' parameter to the arg and now we can see that structs are not copied anymore and performance is on par with the 'ref' parameter| Method | Mean | Ratio |
|--------------- |---------:|------:|
| Auto | 299.9 us | 1.00 |
| Seq | 369.1 us | 1.23 |
| AutoRef | 245.1 us | 0.82 |
| SeqRef | 305.7 us | 1.02 |
| AutoReadonly | 309.1 us | 1.03 |
| SeqReadonly | 369.6 us | 1.23 |
| AutoReadonlyIn | 255.4 us | 0.86 |
| SeqReadonlyIn | 303.4 us | 1.02 |
I performed all these benchmarks in .NET. It would be very interesting to look at it in Unity using IL2CPP, whether it affects performance in C++ or not.https://www.meziantou.net/optimize-struct-performances-using-structlayout.htm
#optimization #struct #layout #ref
Meziantou's blog
Optimize struct performances using StructLayout
A struct type is a value type that is typically used to encapsulate small groups of related variables. It is often used for interop with native DLL ([DllImport]). Structs are also used for performance reasons. Value types are allocated on the stack so it…
👍4
Designing a Realtime Combat System. This article is about melee combat foremost.
A great list of combat mechanics, how and when each of them should be used or not. Must help a lot when designing combat in your game.
https://howtomakeanrpg.com/a/designing-a-realtime-combat-system.html
#combat #platformer
A great list of combat mechanics, how and when each of them should be used or not. Must help a lot when designing combat in your game.
https://howtomakeanrpg.com/a/designing-a-realtime-combat-system.html
#combat #platformer
Howtomakeanrpg
Designing a Realtime Combat System | How to Make an RPG
Combat in action RPGs seems simple; avoid enemys attacks while dishing out your own but even a simple system is made up of many design decisions! In this article I'll cover the most important decisions you need to make when designing combat. I don't see many…
👍1
Speed up the build process of your Unity projects
It's a great post with practical steps based on real experience. I can confirm that these steps are helpful, as I had been working on the same project when these approaches were introduced.
It would be also interesting to read more about splitting the code base into multiple projects and how to properly handle the build process in that case as no references were provided in the post.
https://medium.com/@wondrous_aqua_toad_341/speed-up-the-build-process-of-your-unity-projects-a4e3f048c32f
#build
It's a great post with practical steps based on real experience. I can confirm that these steps are helpful, as I had been working on the same project when these approaches were introduced.
It would be also interesting to read more about splitting the code base into multiple projects and how to properly handle the build process in that case as no references were provided in the post.
https://medium.com/@wondrous_aqua_toad_341/speed-up-the-build-process-of-your-unity-projects-a4e3f048c32f
#build
Medium
Speed up the build process of your Unity projects
This tutorial will show approaches to improve the build time of Unity projects. From Client architecture, PlayerSettings, and Approaches si
👍3🔥1
Dependency injection
The author clearly shows how dependency injection helps make code more maintainable and testable.
https://youtu.be/J1f5b4vcxCQ
#pattern #di
The author clearly shows how dependency injection helps make code more maintainable and testable.
https://youtu.be/J1f5b4vcxCQ
#pattern #di
YouTube
Dependency Injection, The Best Pattern
Try using the attachment service at https://www.patreon.com/codeaesthetic
You'll also find deleted scenes, song names and more
You'll also find deleted scenes, song names and more
👍3
Developing SWIFT, Part 1: Combat & Gameplay Mechanics
The breakdown of combat and gameplay design decisions in a competitive melee combat action game
https://80.lv/articles/developing-swift-part-1-combat-gameplay-mechanics/
#gamedesign #combat
The breakdown of combat and gameplay design decisions in a competitive melee combat action game
https://80.lv/articles/developing-swift-part-1-combat-gameplay-mechanics/
#gamedesign #combat
80LV
Developing SWIFT, Part 1: Combat & Gameplay Mechanics
The developers of SWIFT have shared a massive, 2-part breakdown, discussing all the aspects of the game. In the first part, the team has talked about general gameplay and combat mechanics. Visit us tomorrow to learn more about environments, characters, and…
👍2🔥2
Use string.Equals with StringComparison.OrdinalIgnoreCase parameter instead of manually adding ToLower()/ToUpper() for better performance and cleaner code.
#string #performance
#string #performance
👍11
Everyday Unity
https://catlikecoding.com/unity/tutorials/noscriptable-render-pipeline/lights/ #srp #lighting
Custom SRP 1.0.0
How to upgrade the old SRP tutorial to Unity 2022. Some of these fixes I had to do myself when I followed this series a long time ago but using Unity 2021. It's great that Jasper supports the series and shared the update.
I personally recommend this series as it not only shows steps how to implement your own rendering pipeline, but gives an idea how some parts of rendering work in general.
https://catlikecoding.com/unity/custom-srp/1-0-0/
#srp
How to upgrade the old SRP tutorial to Unity 2022. Some of these fixes I had to do myself when I followed this series a long time ago but using Unity 2021. It's great that Jasper supports the series and shared the update.
I personally recommend this series as it not only shows steps how to implement your own rendering pipeline, but gives an idea how some parts of rendering work in general.
https://catlikecoding.com/unity/custom-srp/1-0-0/
#srp
Catlikecoding
Custom SRP 1.0.0
Unity Custom SRP 1.0.0 tutorial, modernization.
👍4