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

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024

ความคิดเห็น • 80

  • @xd_lead
    @xd_lead 4 หลายเดือนก่อน +3

    Epic games should take notes lol

  • @Dyzinel
    @Dyzinel 2 ปีที่แล้ว +2

    Excellent video!

  • @BulletGames-official
    @BulletGames-official ปีที่แล้ว +2

    Screen Scale is a type of blur or pixeled texture? Hope will you answer 🎉

  • @XadegamerOfficial
    @XadegamerOfficial ปีที่แล้ว +1

    Did you enable shadow?

    • @CGDealers
      @CGDealers  ปีที่แล้ว +1

      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

  • @arunachalpradesh399
    @arunachalpradesh399 ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      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

  • @Hamo0odi96
    @Hamo0odi96 7 หลายเดือนก่อน

    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  7 หลายเดือนก่อน

      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.

  • @dancogames12332
    @dancogames12332 ปีที่แล้ว +8

    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  ปีที่แล้ว +4

      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

  • @watercat1248
    @watercat1248 2 ปีที่แล้ว +5

    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 ปีที่แล้ว +1

      @@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.

  • @manupaliwal9248
    @manupaliwal9248 9 หลายเดือนก่อน

    Please can u make video on same topic but for unreal engine mobile game optimization. Pls!!😊

  • @Jimaniki
    @Jimaniki ปีที่แล้ว +3

    3:36 And what about URP Shaders ?

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      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!

  • @omkarpatil2094
    @omkarpatil2094 ปีที่แล้ว +2

    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  ปีที่แล้ว +1

      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

  • @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  ปีที่แล้ว

      Good luck! Let me know once you've tried it how it boosted your performance!

  • @J.g12344
    @J.g12344 ปีที่แล้ว +1

    bro can you make a asset for your fps controller 🎮 please...

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      No sorry our assets are copyrighted.

  • @AetherXIV
    @AetherXIV ปีที่แล้ว +3

    Excellent! Very specific and helpful

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      Glad it was helpful!

  • @Ez-_-69.
    @Ez-_-69. ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      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

  • @t0xangames207
    @t0xangames207 ปีที่แล้ว +5

    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  ปีที่แล้ว +1

      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.

  • @nwotyzarc
    @nwotyzarc ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      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?

  • @hodlgang4906
    @hodlgang4906 ปีที่แล้ว +2

    How did you implement the screen scale ?

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      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 หลายเดือนก่อน

    How do you add this lighting effect to the glove? When you move the camera the glove has a specular effect.

    • @CGDealers
      @CGDealers  หลายเดือนก่อน +1

      You put a directional light to lit only a specific object by using layers.

    • @Lucas-tx5bn
      @Lucas-tx5bn หลายเดือนก่อน

      @@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  หลายเดือนก่อน +1

      @@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 หลายเดือนก่อน

      @@CGDealers I hadn't thought about it, but in this case are you using a shader that unity already provides, or a custom shader?

  • @dimka_dev
    @dimka_dev ปีที่แล้ว +2

    Such a good video, thank you for the advice.

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      Your’re welcome!

  • @GamLopStudio
    @GamLopStudio 2 ปีที่แล้ว +1

    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 :)

  • @TripsoftNgoNghiaNgoc
    @TripsoftNgoNghiaNgoc 9 หลายเดือนก่อน

    my bake data occlusion is always missing when i play game how to fix it

  • @praisethesun2612
    @praisethesun2612 11 หลายเดือนก่อน +1

    VERY useful! Thanks!

    • @CGDealers
      @CGDealers  11 หลายเดือนก่อน

      You're welcome!

  • @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.

  • @flurinjenal374
    @flurinjenal374 7 หลายเดือนก่อน +1

    Nice, top!

    • @CGDealers
      @CGDealers  7 หลายเดือนก่อน

      Thank you! Cheers!

  • @rainwingp
    @rainwingp 4 หลายเดือนก่อน

    Great tutorial! Thank you so much.

    • @CGDealers
      @CGDealers  4 หลายเดือนก่อน

      You're very welcome!

  • @neilfosteronly
    @neilfosteronly ปีที่แล้ว +1

    How do you do tip 7?

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      Search the unity forums it has all the answers how to code this.

    • @neilfosteronly
      @neilfosteronly ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      @@neilfosteronly built-in render can work >?

    • @neilfosteronly
      @neilfosteronly ปีที่แล้ว

      @@GameOnBudget No it has to be URP. Maybe HDRP not sure I have never used.

  • @user-uk9er5vw4c
    @user-uk9er5vw4c ปีที่แล้ว +1

    great video

    • @CGDealers
      @CGDealers  ปีที่แล้ว

      Glad you enjoyed it

  • @fizzypeaches5611
    @fizzypeaches5611 10 หลายเดือนก่อน

    In the Screen Scale part, do you directly change Screen.SetResolution or do you use Dynamic Resolution?

    • @CGDealers
      @CGDealers  10 หลายเดือนก่อน

      We change it dynamic depending on the FPS and Hardware.

    • @PNKnews
      @PNKnews 8 หลายเดือนก่อน

      I think this might be the way to do it: th-cam.com/video/R7922Pchiq4/w-d-xo.html&ab_channel=MattMirrorFish

  • @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?

  • @flurinjenal374
    @flurinjenal374 7 หลายเดือนก่อน +1

    How do we set the resolution of our game as game developer? I'm thinking of having 80% resolution as standard.

    • @flurinjenal374
      @flurinjenal374 7 หลายเดือนก่อน

      I think I found it in your answer below, let me check and test it out.

  • @raploky
    @raploky ปีที่แล้ว

    Extremely helpful!

    • @CGDealers
      @CGDealers  ปีที่แล้ว +1

      Thanks buddy!