It's better to put all those settings in your game. Settings -> Graphics and let the user tweak them manually. Also you will need to detect the phone/tablet hardware when the game runs and set the quality to match the hardware.
You can also set the resolution to 50%. I don't know how to do it with coding but with visual scripting, you use the unit called "Screen, Get Height" and "Screen, Get Width", then divide them by 2, then use "Screen, Set Height" and "Screen, Set Width". It will make your game more blurry but it will run sooooooo much better. I mean modern phones have super high resolutions so it's no that bad. The iphone XS Max has a 1242x2688. That is higher than 1080p and think about this. The Nintendo Switch is only 720p. Your game doesn't need to run at full 1242x2688 resolution considering how small the screen is compared to PC monitors and the size of the switch screen
1:53 I advise you to use lightmap compression when baking light, and set it to High or Normal Quality. This will significantly reduce the weight of the lightmap.
It depend on what kind of game you are making. Compressing lightmap for FPS is not a good option. Better to reduce the size than compressing. By compressing you will get a lot of artifacts and color incorrections which in an FPS game is very, very noticable and unplesent for the player. For top down games - sure!
@@CGDealers at very low compression quality there are artifacts, at normal or high levels they are not noticeable. For example, my lightmap without compression weighs 20.7 megabytes, and after High Quality compression it began to weigh 2.7 megabytes. There were no artifacts to be seen.
@@t0xangames207 At high there are still artifacts in the color spectrum. If you are making FPS game and you literally can stand in front of that wall and cover you entire screen it's very visible.
i have few more tips as well 1. use less polygon wean you can 2. use lod in the order to lower the quality in the far away objects 3. wean your object is not moving adding this as statics objects 4. use less polygon wean you can 5. have the option to lower your quality stuff that im not so sure 1. 3:17 use always mobiles shaders wean you can yes in theory that will be good idea if you create i mobile game but what if created a game for pc or other platforms or use if use URP ? 2. 2:35 always use sprite atlas wean you can i don't know if that is good idea because you do that the texture resolution i going large that means if you change the texture i will become even blurrier
I'm talking only about mobile games. So the stuff that you are not sure 1. and 2. works for mobile not for PC. For PC you have a lot more resources, so you don't need to do that.
@@CGDealers yes pc and consoles have way more resources that is for true but i still believe the tips but to increased your performance also heavin better performance is effective every platform like for example if do good optimization for my game they will be able to play the with less powerful computer and the powerful computer i will able to play with better performance or with better performance in the max settings this for PC ass for console the have very specific hardware unlike computer and mobile so i thing the best way for consoles is to know research the console architecture for the specific console you want to create the game in that way will able to take advantage in the order to take advantage for full protection
Tried to explain as much as possible in few minutes. Keep in mind that those are very broad but it gives you idea where to touch in order to boost the performance. I've been developing Counter Attack for the last 5-6 years. Did tons of tests until I've reach to that point. Of course this is indie optimizations with the tools you have out of the box in Unity. You always can get further with custom rendering pipeline etc., like in COD Mobile, but you need big team for that :)
I'm using built-in rendering as a lot of tests on the Unity Forum shows that Built-in in some cases (Which is ours) has slightly better performance than URP on mobile. However I'm sure with the new unity 2022+ you can have better performance with URP if you tweak the shaders right for your mobile device!
These are great suggestions. Thank you. I do 1 question regarding the last tip. Suppose for my game I have TWO UI elements that update regularly, eg. I have a timer UI updating every second, and a score UI updating every frame, along with some static UI like a pause button and mute button. Do I here make 3 canvas, 1 for Score, 1 for timer and 1 for buttons? Or do I just make 2 canvases, 1 with regularly updating UI and 1 with static UI?
2k resolution for texture is too high, i only keep 1k max if targetting for high end phone and generally 512 for targetting mid range phone. the biggest problem of texture size is not fps but overall size of the game. going from 512 to 1024 texture size increase almost 30% of the size of the game. for short game its ok .
How to set up the lighting in a game where everything is baked and no object or player gets real time lighting? Just put light probes all over the place so illuminate my object from every angle and then hit bake?
I'm making a 3d stylized game. The assets already have the shadows drawn into the cracks etc. I just want to illuminate them evenly 100% because the textures look perfect like that. How would you set this up?
How should I add shadows to my game with as much less performance decrease as possible, i am making a cooking 3d game, it has only one room but even then when I turn on shadows it gets like 20-30 fps in my realme 6
You need to bake the shadows and after that use shadow mask feature with mixed lightning baked/realtime and setup distance for the shadows. In that case you will have realtime shadows + baked shadows.
@@CGDealers I understand, in this case this directional light is in real time? Do you use this same technique on the weapon? I downloaded your game and the graphics are great and well optimized. Thanks for answering.
@@Lucas-tx5bn yes the light is working on the weapon and gloves only for optimization. The rest is baked and i use lightprobes for third person characters.
@@CGDealers Ok I figured it out, but couldn't find on any forums. In URP you need to add using UnityEngine.Rendering.Universal; to a script. Then you can add [SerializeField] private UniversalRenderPipelineAsset myPipeline; With myPipeline you can set the render scale. I use a Slider for this example: myPipeline.renderScale = renderScaleSlider.value; Using UnityEngine.Rendering.Universal and then having at least one UniversalRenderPipelineAsset to edit is the main thing. Each Low, Medium, and High Quality settings are a UniversalRenderPipelineAsset .
Screen scale is % based which is pixel related. For example if your game is running on 1920x1080 and it's 30FPS due to the rendering, you can make it /2 and boost the fps. Only if the problem is due to the GPU taking too much time to render a lot of pixels for weak mobile device.
@@CGDealers I know how it works, but I can't find a way to make it work. Like is it the Resolution & Presentation DPI changed or is it an overlay camera? How do I make that happen?
I cannot buy the course for Unity on the Udemy website because it is not available on the Unity engine, only on the Unreal Engine. Can you give me this course that you explained in the video, but it is specific to the Unity engine?
You can get it on Skillshare: www.skillshare.com/en/r/user/coldwave?gr_tch_ref=on The subscription is for the complete website. So you will be able to watch other unity courses too.
How do I make it so the graphics are better/worse depending on which device you are playing the game on. But how do I do it where the player cannot change the graphics, but where they are pre-set for each device so that they all run the game at 60FPS
You can also change the settings of quality to low in Edit > project settings > quality from that you can disable shadows if you set it as low
It's better to put all those settings in your game.
Settings -> Graphics and let the user tweak them manually.
Also you will need to detect the phone/tablet hardware when the game runs and set the quality to match the hardware.
You can also set the resolution to 50%. I don't know how to do it with coding but with visual scripting, you use the unit called "Screen, Get Height" and "Screen, Get Width", then divide them by 2, then use "Screen, Set Height" and "Screen, Set Width". It will make your game more blurry but it will run sooooooo much better. I mean modern phones have super high resolutions so it's no that bad. The iphone XS Max has a 1242x2688. That is higher than 1080p and think about this. The Nintendo Switch is only 720p. Your game doesn't need to run at full 1242x2688 resolution considering how small the screen is compared to PC monitors and the size of the switch screen
1:53 I advise you to use lightmap compression when baking light, and set it to High or Normal Quality. This will significantly reduce the weight of the lightmap.
It depend on what kind of game you are making. Compressing lightmap for FPS is not a good option. Better to reduce the size than compressing. By compressing you will get a lot of artifacts and color incorrections which in an FPS game is very, very noticable and unplesent for the player. For top down games - sure!
@@CGDealers at very low compression quality there are artifacts, at normal or high levels they are not noticeable. For example, my lightmap without compression weighs 20.7 megabytes, and after High Quality compression it began to weigh 2.7 megabytes. There were no artifacts to be seen.
@@t0xangames207 At high there are still artifacts in the color spectrum. If you are making FPS game and you literally can stand in front of that wall and cover you entire screen it's very visible.
Excellent! Very specific and helpful
Glad it was helpful!
i have few more tips as well
1. use less polygon wean you can
2. use lod in the order to lower the quality in the far away objects
3. wean your object is not moving adding this as statics objects
4. use less polygon wean you can
5. have the option to lower your quality
stuff that im not so sure
1. 3:17 use always mobiles shaders wean you can
yes in theory that will be good idea if you create i mobile game but what if created a game for pc or other platforms or use if use URP ?
2. 2:35 always use sprite atlas wean you can
i don't know if that is good idea because you do that the texture resolution i going large that means if you change the texture i will become even blurrier
I'm talking only about mobile games. So the stuff that you are not sure 1. and 2. works for mobile not for PC. For PC you have a lot more resources, so you don't need to do that.
@@CGDealers yes pc and consoles have way more resources that is for true but i still believe the tips but to increased your performance also heavin better performance is effective every platform like for example if do good optimization for my game they will be able to play the with less powerful computer and the powerful computer i will able to play with better performance or with better performance in the max settings
this for PC ass for console the have very specific hardware unlike computer and mobile so i thing the best way for consoles is to know research the console architecture for the specific console you want to create the game in that way will able to take advantage in the order to take advantage for full protection
True that.
VERY useful! Thanks!
You're welcome!
Excellent video!
Such a good video, thank you for the advice.
Your’re welcome!
Great tutorial! Thank you so much.
You're very welcome!
Very helpful, thank you
You're welcome!
First video i got to explain perfectly... Thanks 😃
Tried to explain as much as possible in few minutes. Keep in mind that those are very broad but it gives you idea where to touch in order to boost the performance. I've been developing Counter Attack for the last 5-6 years. Did tons of tests until I've reach to that point. Of course this is indie optimizations with the tools you have out of the box in Unity.
You always can get further with custom rendering pipeline etc., like in COD Mobile, but you need big team for that :)
Thank you so much for this video ! That should help me to improve performance from 25-40 to ??? (i will write the result after finish all your tips :)
Good luck! Let me know once you've tried it how it boosted your performance!
Please can u make video on same topic but for unreal engine mobile game optimization. Pls!!😊
Epic games should take notes lol
good advice thanks
Glad it was helpful!
3:36 And what about URP Shaders ?
I'm using built-in rendering as a lot of tests on the Unity Forum shows that Built-in in some cases (Which is ours) has slightly better performance than URP on mobile. However I'm sure with the new unity 2022+ you can have better performance with URP if you tweak the shaders right for your mobile device!
Extremely helpful!
Thanks buddy!
Screen Scale is a type of blur or pixeled texture? Hope will you answer 🎉
Please Answer ho to do Screen pixel -ed ?
great video
Glad you enjoyed it
Nice, top!
Thank you! Cheers!
These are great suggestions. Thank you.
I do 1 question regarding the last tip.
Suppose for my game I have TWO UI elements that update regularly, eg. I have a timer UI updating every second, and a score UI updating every frame, along with some static UI like a pause button and mute button.
Do I here make 3 canvas, 1 for Score, 1 for timer and 1 for buttons? Or do I just make 2 canvases, 1 with regularly updating UI and 1 with static UI?
Make 1 combined for Score and Timer and the buttons will be on separate one. So two in total.
thank you so much@@CGDealers
Did you enable shadow?
I've baked them. Also for the character shadow I'm using fake circle with script that make it small/big based on the distance if the player jumps.
@@CGDealers Okay thanks, after backing my character is dark, please how can i solve it
How did you implement the screen scale ?
You need to write it custom for your game. We've created a custom solution for our game Counter Attack.
@@CGDealers can you share ?
@@CGDealers How custom it ?
2k resolution for texture is too high, i only keep 1k max if targetting for high end phone and generally 512 for targetting mid range phone. the biggest problem of texture size is not fps but overall size of the game. going from 512 to 1024 texture size increase almost 30% of the size of the game. for short game its ok .
The best way is to use auto detection of the users hardware and setup the texture resolution based on it.
@@CGDealers how to do it, what is the name of the process, does unity support it
How to set up the lighting in a game where everything is baked and no object or player gets real time lighting?
Just put light probes all over the place so illuminate my object from every angle and then hit bake?
Yep light probes are for non static objects. You need to combine them with Reflection probes too.
I'm making a 3d stylized game. The assets already have the shadows drawn into the cracks etc.
I just want to illuminate them evenly 100% because the textures look perfect like that.
How would you set this up?
my bake data occlusion is always missing when i play game how to fix it
How should I add shadows to my game with as much less performance decrease as possible, i am making a cooking 3d game, it has only one room but even then when I turn on shadows it gets like 20-30 fps in my realme 6
You need to bake the shadows and after that use shadow mask feature with mixed lightning baked/realtime and setup distance for the shadows. In that case you will have realtime shadows + baked shadows.
@@CGDealers thank you very much! Appreciate it
bro can you make a asset for your fps controller 🎮 please...
No sorry our assets are copyrighted.
How do you add this lighting effect to the glove? When you move the camera the glove has a specular effect.
You put a directional light to lit only a specific object by using layers.
@@CGDealers I understand, in this case this directional light is in real time? Do you use this same technique on the weapon? I downloaded your game and the graphics are great and well optimized. Thanks for answering.
@@Lucas-tx5bn yes the light is working on the weapon and gloves only for optimization. The rest is baked and i use lightprobes for third person characters.
@@CGDealers I hadn't thought about it, but in this case are you using a shader that unity already provides, or a custom shader?
How do you do tip 7?
Search the unity forums it has all the answers how to code this.
@@CGDealers Ok I figured it out, but couldn't find on any forums.
In URP you need to add using UnityEngine.Rendering.Universal; to a script.
Then you can add [SerializeField] private UniversalRenderPipelineAsset myPipeline;
With myPipeline you can set the render scale. I use a Slider for this example:
myPipeline.renderScale = renderScaleSlider.value;
Using UnityEngine.Rendering.Universal and then having at least one UniversalRenderPipelineAsset to edit is the main thing. Each Low, Medium, and High Quality settings are a UniversalRenderPipelineAsset .
@@neilfosteronly built-in render can work >?
@@GameOnBudget No it has to be URP. Maybe HDRP not sure I have never used.
In the Screen Scale part, do you directly change Screen.SetResolution or do you use Dynamic Resolution?
We change it dynamic depending on the FPS and Hardware.
I think this might be the way to do it: ruclips.net/video/R7922Pchiq4/видео.html&ab_channel=MattMirrorFish
How do I make the screen scale resolution? I can only find Canvas related videos not pixel reduced videos
Screen scale is % based which is pixel related. For example if your game is running on 1920x1080 and it's 30FPS due to the rendering, you can make it /2 and boost the fps. Only if the problem is due to the GPU taking too much time to render a lot of pixels for weak mobile device.
@@CGDealers I know how it works, but I can't find a way to make it work. Like is it the Resolution & Presentation DPI changed or is it an overlay camera? How do I make that happen?
I cannot buy the course for Unity on the Udemy website because it is not available on the Unity engine, only on the Unreal Engine. Can you give me this course that you explained in the video, but it is specific to the Unity engine?
You can get it on Skillshare: www.skillshare.com/en/r/user/coldwave?gr_tch_ref=on
The subscription is for the complete website. So you will be able to watch other unity courses too.
How do I make it so the graphics are better/worse depending on which device you are playing the game on. But how do I do it where the player cannot change the graphics, but where they are pre-set for each device so that they all run the game at 60FPS
You need to detect the hardware and setup your game settings based on that.
how to do screen scale man?
Just ask ChatGPT and it will write a script for you. :)
How do we set the resolution of our game as game developer? I'm thinking of having 80% resolution as standard.
I think I found it in your answer below, let me check and test it out.