Top 10 Tips To Optimize Your Mobile Game - Unity 3D

  Рет қаралды 42,227

CG Dealers

CG Dealers

Күн бұрын

Пікірлер: 86
@t0xangames207
@t0xangames207 Жыл бұрын
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.
@CGDealers
@CGDealers Жыл бұрын
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!
@t0xangames207
@t0xangames207 Жыл бұрын
@@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.
@CGDealers
@CGDealers Жыл бұрын
@@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.
@dancogames12332
@dancogames12332 Жыл бұрын
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
@CGDealers
@CGDealers Жыл бұрын
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.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Жыл бұрын
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
@AetherXIV
@AetherXIV Жыл бұрын
Excellent! Very specific and helpful
@CGDealers
@CGDealers Жыл бұрын
Glad it was helpful!
@watercat1248
@watercat1248 2 жыл бұрын
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
@CGDealers
@CGDealers 2 жыл бұрын
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.
@watercat1248
@watercat1248 2 жыл бұрын
@@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
@CGDealers
@CGDealers 2 жыл бұрын
True that.
@VarunAiyar
@VarunAiyar Ай бұрын
Very helpful, thank you
@CGDealers
@CGDealers Ай бұрын
You're welcome!
@praisethesun2612
@praisethesun2612 Жыл бұрын
VERY useful! Thanks!
@CGDealers
@CGDealers Жыл бұрын
You're welcome!
@Jimaniki
@Jimaniki 2 жыл бұрын
3:36 And what about URP Shaders ?
@CGDealers
@CGDealers 2 жыл бұрын
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!
@rainwingp
@rainwingp 7 ай бұрын
Great tutorial! Thank you so much.
@CGDealers
@CGDealers 7 ай бұрын
You're very welcome!
@Dyzinel
@Dyzinel 2 жыл бұрын
Excellent video!
@dimka_dev
@dimka_dev 2 жыл бұрын
Such a good video, thank you for the advice.
@CGDealers
@CGDealers 2 жыл бұрын
Your’re welcome!
@GamLopStudio
@GamLopStudio 2 жыл бұрын
First video i got to explain perfectly... Thanks 😃
@CGDealers
@CGDealers 2 жыл бұрын
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 :)
@raploky
@raploky Жыл бұрын
Extremely helpful!
@CGDealers
@CGDealers Жыл бұрын
Thanks buddy!
@lockin222
@lockin222 2 ай бұрын
good advice thanks
@CGDealers
@CGDealers 2 ай бұрын
Glad it was helpful!
@BulletGames-official
@BulletGames-official Жыл бұрын
Screen Scale is a type of blur or pixeled texture? Hope will you answer 🎉
@BulletGames-official
@BulletGames-official Жыл бұрын
Please Answer ho to do Screen pixel -ed ?
@flurinjenal374
@flurinjenal374 10 ай бұрын
Nice, top!
@CGDealers
@CGDealers 10 ай бұрын
Thank you! Cheers!
@user-uk9er5vw4c
@user-uk9er5vw4c Жыл бұрын
great video
@CGDealers
@CGDealers Жыл бұрын
Glad you enjoyed it
@Jimaniki
@Jimaniki 2 жыл бұрын
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 :)
@CGDealers
@CGDealers 2 жыл бұрын
Good luck! Let me know once you've tried it how it boosted your performance!
@omkarpatil2094
@omkarpatil2094 Жыл бұрын
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?
@CGDealers
@CGDealers Жыл бұрын
Make 1 combined for Score and Timer and the buttons will be on separate one. So two in total.
@omkarpatil2094
@omkarpatil2094 Жыл бұрын
thank you so much@@CGDealers
@XadegamerOfficial
@XadegamerOfficial Жыл бұрын
Did you enable shadow?
@CGDealers
@CGDealers Жыл бұрын
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.
@XadegamerOfficial
@XadegamerOfficial Жыл бұрын
@@CGDealers Okay thanks, after backing my character is dark, please how can i solve it
@manupaliwal9248
@manupaliwal9248 Жыл бұрын
Please can u make video on same topic but for unreal engine mobile game optimization. Pls!!😊
@hodlgang4906
@hodlgang4906 2 жыл бұрын
How did you implement the screen scale ?
@CGDealers
@CGDealers 2 жыл бұрын
You need to write it custom for your game. We've created a custom solution for our game Counter Attack.
@GameOnBudget
@GameOnBudget Жыл бұрын
@@CGDealers can you share ?
@BulletGames-official
@BulletGames-official Жыл бұрын
​@@CGDealers How custom it ?
@Lucas-tx5bn
@Lucas-tx5bn 4 ай бұрын
How do you add this lighting effect to the glove? When you move the camera the glove has a specular effect.
@CGDealers
@CGDealers 4 ай бұрын
You put a directional light to lit only a specific object by using layers.
@Lucas-tx5bn
@Lucas-tx5bn 4 ай бұрын
@@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.
@CGDealers
@CGDealers 4 ай бұрын
@@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.
@Lucas-tx5bn
@Lucas-tx5bn 4 ай бұрын
@@CGDealers I hadn't thought about it, but in this case are you using a shader that unity already provides, or a custom shader?
@nwotyzarc
@nwotyzarc Жыл бұрын
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?
@CGDealers
@CGDealers Жыл бұрын
Yep light probes are for non static objects. You need to combine them with Reflection probes too.
@nwotyzarc
@nwotyzarc Жыл бұрын
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?
@TripsoftNgoNghiaNgoc
@TripsoftNgoNghiaNgoc Жыл бұрын
my bake data occlusion is always missing when i play game how to fix it
@Ez-_-69.
@Ez-_-69. Жыл бұрын
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
@CGDealers
@CGDealers Жыл бұрын
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.
@Ez-_-69.
@Ez-_-69. Жыл бұрын
@@CGDealers thank you very much! Appreciate it
@82Lead82
@82Lead82 7 ай бұрын
Epic games should take notes lol
@fizzypeaches5611
@fizzypeaches5611 Жыл бұрын
In the Screen Scale part, do you directly change Screen.SetResolution or do you use Dynamic Resolution?
@CGDealers
@CGDealers Жыл бұрын
We change it dynamic depending on the FPS and Hardware.
@PNKnews
@PNKnews 11 ай бұрын
I think this might be the way to do it: kzbin.info/www/bejne/iGicY2WGmM2cp5Y&ab_channel=MattMirrorFish
@arunachalpradesh399
@arunachalpradesh399 Жыл бұрын
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 .
@CGDealers
@CGDealers Жыл бұрын
The best way is to use auto detection of the users hardware and setup the texture resolution based on it.
@arunachalpradesh399
@arunachalpradesh399 Жыл бұрын
@@CGDealers how to do it, what is the name of the process, does unity support it
@neilfosteronly
@neilfosteronly Жыл бұрын
How do you do tip 7?
@CGDealers
@CGDealers Жыл бұрын
Search the unity forums it has all the answers how to code this.
@neilfosteronly
@neilfosteronly Жыл бұрын
@@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 .
@GameOnBudget
@GameOnBudget Жыл бұрын
@@neilfosteronly built-in render can work >?
@neilfosteronly
@neilfosteronly Жыл бұрын
@@GameOnBudget No it has to be URP. Maybe HDRP not sure I have never used.
@J.g12344
@J.g12344 Жыл бұрын
bro can you make a asset for your fps controller 🎮 please...
@CGDealers
@CGDealers Жыл бұрын
No sorry our assets are copyrighted.
@victor.novorski
@victor.novorski Жыл бұрын
How do I make the screen scale resolution? I can only find Canvas related videos not pixel reduced videos
@CGDealers
@CGDealers Жыл бұрын
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.
@victor.novorski
@victor.novorski Жыл бұрын
@@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?
@luluskuy
@luluskuy 2 ай бұрын
how to do screen scale man?
@CGDealers
@CGDealers 2 ай бұрын
Just ask ChatGPT and it will write a script for you. :)
@Hamo0odi96
@Hamo0odi96 10 ай бұрын
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?
@CGDealers
@CGDealers 10 ай бұрын
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.
@flurinjenal374
@flurinjenal374 10 ай бұрын
How do we set the resolution of our game as game developer? I'm thinking of having 80% resolution as standard.
@flurinjenal374
@flurinjenal374 10 ай бұрын
I think I found it in your answer below, let me check and test it out.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Жыл бұрын
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
@CGDealers
@CGDealers Жыл бұрын
You need to detect the hardware and setup your game settings based on that.
OPTIMIZE your Unity game using these performance tips | Tutorial
11:20
Sasquatch B Studios
Рет қаралды 24 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Optimization for web, XR & mobile games in Unity 6
40:47
Unreal Engine Christmas Level Design [Part 5] Vertical
Unreal Habitat
Рет қаралды
Create Massive World in 25 min -  Unreal Engine 5.5 and Gaea 2.0
25:27
Unity Code Optimization - Do you know them all?
15:49
Tarodev
Рет қаралды 200 М.
Optimize Your Games In Unity To 60 FPS And Above!
11:18
Awesome Tuts - Anyone Can Learn To Make Games
Рет қаралды 35 М.
Unity Performance Optimization - DevLog #9 for My Game, MiLE HiGH TAXi
10:12
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН