Everyday Unity – Telegram
Everyday Unity
1.11K subscribers
157 photos
59 videos
42 files
2.36K links
A game developer and tech lead in a top grossing company posting Unity, programming, and gamedev related stuff that I find interesting
Website: https://gamedev.center

Most used tags are:
#performance
#shader
#interview

Author: @alexmtr
Download Telegram
Dialog System

Hyperbolica dev tells about the dialog system based on a custom noscripting language. He even created highlighting rules for Notepad++. Could be very convenient when dialogs are written and added to the game not by a programmer. You should consider time needed to create such system and amount of time you could save by removing the need in developer to integrate text assets.

https://youtu.be/DlL_20x0QH8

#dialog #dialogsystem
Unity-Style-Guide: This article contains ideas for setting up a projects structure and naming convention for noscripts and assets in Unity

Can be used as a base for your own conventions. It also has a good quote: "Arguments over style are pointless. There should be a style guide, and you should follow it."

https://github.com/justinwasilenko/Unity-Style-Guide

#codestyle #naming #preprocessor
Channel photo updated
The Unity Shaders Bible.
Learn shaders in Unity, starting with the basics and finishing with advanced concepts. The book includes a detailed explanation of languages like Cg, HLSL, ShaderLab, and Shader Graph.
More than nine years of experience and techniques used in such noscripts like Star Wars GD, Nom Noms, and Super Studio Frozen 2, exposed in a single book.

https://learn.jettelly.com/course/unity-shader-bible/usb-chapter-1/preface/

#shader #book #shadersbible
GitHub - asc-community/HonkPerf.NET

Benchmarks show it allocates less than standard LINQ. And the author claims on habr.com that it works great in Unity. Ideally should be benchmarked there too on IL2CPP build.

https://github.com/asc-community/HonkPerf.NET

#linq #optimization #gc
You might be thinking about shader performance wrong

Another rant on how memory access is slow, but has absolutely stunning animations quality, which the author made in Unity. Not really sure if this approach is faster than doing the same in some video editor, but definitely looks awesome

https://youtu.be/7YPPFIqUN84

#gpumemory #performance
An interesting benchmark of multiple Where vs && in Linq

#linq #performance
Intro to Jobs/Burst/DoD.

How performance of a common MonoBehaviour approach can be improved by x200 with jobs and burst. Of course it's kind of artificial example, but on the large scale performance gains look awesome. And the author is a real "heavyweight" engineer from Unity, definitely worth checking his other posts.

https://medium.com/@jasonbooth_86226/intro-to-jobs-burst-dod-66c6b81c017f

#jobs #burst #performance #dod
Stalling a GPU

- Remember that a shader is more like a bunch of jobs than serial GPU code, even though the syntax looks like serial code
- Avoid introducing extra dependencies between those jobs, and understand the dependencies you have as they can hint to additional optimizations
- The cost of certain operations can be completely masked by this parallelism.
- The cost of all texture samples are not the same

https://medium.com/@jasonbooth_86226/stalling-a-gpu-7faac66b11b9

#shader #optimization
How to unit test a class that uses static API

Unit tests validate code in isolation, but if it uses statics you cannot mock this dependency, therefore a subject under test cannot be properly isolated and unit tested. This trick makes the code testable, as well as introduces an important principle that improves your architecture by making it cleaner and more flexible.

https://gamedev.center/how-to-unit-test-a-class-that-uses-static-api/

#testing #cleancode #architecture #testrunner
👍1