Unity Performance Optimization - DevLog #10 for My Game, MiLE HiGH TAXi

  Рет қаралды 10,126

Cassius John-Adams

Cassius John-Adams

Күн бұрын

Пікірлер: 61
@BrinkHouse
@BrinkHouse 3 жыл бұрын
Great work, some very creative problem solving here! If you haven’t already I’d love to see a way to have the hero taxi cast it’s shadow on buildings where you’d expect to see it, such as passing in front of a sun lit building. Also, maybe a gradient texture layer applied to the buildings that causes them to get darker as you go lower, suggesting to the player that the amount of light falls off realistically as you go ‘deeper’. Look forward to the next update!
@CassiusJohnAdams
@CassiusJohnAdams 3 жыл бұрын
Thanks for the compliments. These suggestions are wonderful! Thank you for sharing your ideas. I think both are possible in very performative ways too. I can utilize the same strategy on the Taxi's shadows as I did for the buildings (but more accurate), and making things darker as the player goes lower should be manageable as well. Really appreciate the feedback and suggestions. Stay tuned to see these implemented. 👍
@onerimeuse
@onerimeuse 2 жыл бұрын
Just Shazamed the song. Veeeeery clever choice for those wondering, High Performance - Frozen
@KamranWali
@KamranWali 2 жыл бұрын
The game is looking super awesome and fun to play. Really like it when devs shares their tips on saving performance. Kudos to you for that. Those are some really clever ideas for saving performance. Keep it up! :)
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Glad you enjoy it!
@josiahjack455
@josiahjack455 Жыл бұрын
Ok I'm going to definitely be looking to the LOD debug settings, thanks for pointing that out! Also game looks very compelling.
@thietduy
@thietduy Жыл бұрын
always love learning new things every day :D thanks!!!
@tomazravljen8984
@tomazravljen8984 Жыл бұрын
Looks good and great optimisations 👍 Just make sure you are not in violation of any patents regarding the Taxi game. Patent might have already expired, but there is a reason there aren't so many taxi games with arrow on top :D
@hernandonj
@hernandonj 2 жыл бұрын
Thanks to you! Awesome job! Keep going!
@GameDevEFacil
@GameDevEFacil 2 жыл бұрын
I have a city in which I use an Area Detector (colision enter/exit) that turns on and off a group of objects related to that area. Turning on and off just one object with many childs is cheaper than turning all objects one by one. Also by limiting my view distance I could severely reduce polycount and drawcalls, also used almost every tip you're using (at least the ones that apply) Great vid, keep it up
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
I haven't had a chance to run more recent experiments on the enabling/disabling of either unparented or childed objects. How much cheaper have you found it to be when disabling via a child hierarchy vs unparented? Earlier in development I was limiting my view distance as well, but for me it relied too much on heavy fog so the distant disabled objects wouldn't be noticed. At something like 400 units away, fog was 100%. But I was able to get around it with a bunch of optimizations. Generally I'm topping out at about 2M tris, 2k drawcalls and usually between 180 setpass calls - with lower averages. My current battle is with the physics engine which, as of this writing, is still chewing up anywhere from 1-3ms and I need it to top out at about 2ms. Thanks for watching!
@jjohn1234
@jjohn1234 3 жыл бұрын
Great! Enjoyed the video! Good luck with the game
@CassiusJohnAdams
@CassiusJohnAdams 3 жыл бұрын
Thank you!
@scsmmedia
@scsmmedia 2 жыл бұрын
Fantastic work Cassius. Lots of innovation and thinking outside the box there!
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Thanks @smstrong. I started putting the outline for this together just a day or two after we spoke on Discord about some video updates for MiLE HiGH TAXi. :)
@starburstdragon
@starburstdragon 3 жыл бұрын
So cool game - thx for sharing optimizations tricks
@daryladhityahenry
@daryladhityahenry 2 жыл бұрын
Wow.. You're crazy but awesome! Hahahah. Thanks for sharing all of these. It's really wonderful to see this crazy optimization.
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
My pleasure!
@DevDunkStudio
@DevDunkStudio 3 жыл бұрын
Remember this game from a while back, great performance update, thanks! If you got the humble bundle, trying the bakery for shadows might be nice
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Yeah, I may pick it up just to experiment with (it's 50% off at the moment). But I am concerned about the memory consumption of shadow images since my memory budget is 4GB and I'm pretty much topping that out already. Thanks for the tip.
@DevDunkStudio
@DevDunkStudio 2 жыл бұрын
@@CassiusJohnAdams I think you can manage them per object instead of for the whole scene, so you could bake big/important structures and do the rest real time.
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
@@DevDunkStudio Sounds like what I would need. Thanks for the info, I'll be sure to check it out.
@x.955
@x.955 3 жыл бұрын
keep going
@rdfairfax
@rdfairfax 2 жыл бұрын
Thank you so much! I was able to get 60,000 objects in 1 scene. This video has saved my project!
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Amazing job! 60k objects is no small feat. I'm so happy to hear that the videos have helped you out :)
@rdfairfax
@rdfairfax 2 жыл бұрын
@@CassiusJohnAdams I wish listed your game I can't wait to play it. It's very exciting to see an indie developer finish a product and release a game!
@TrentSterling
@TrentSterling 2 жыл бұрын
Awesome optimizations! I need to inspect how many audio clips Ive been playing. Hadn't considered or profiled that!
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Thank you. It's definitely worth investigating concurrent AudioClip counts if you're looking to squeak out some extra CPU cycles.
@paulbunyangonewild7596
@paulbunyangonewild7596 2 жыл бұрын
' . ' it didnt look all that amazing in the editor,but seeing it playing like that at the end..... and how cohesive it all was......... it looks so polished, so nice. its like if they made a crazy taxi future, exactly like it. im blown away.
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Thanks for the comment. There's a few things happening in gameplay that don't happen in the editor, which is maybe why it looks more polished in-game. For example, in Editor the quality of some things, such as mesh, are set to "low" so I can work more quickly. When the game spins up, they switch to higher quality mesh, etc. There's also post-processing and different lighting in-game which makes a noticeable difference. Lastly, the sounds, music, and voices help make things a bit more cohesive (still working on that stuff). Glad to hear you think it's all meshing together well during play mode! :)
@kamel3d
@kamel3d 2 жыл бұрын
Very nice video but avoide this kind of editing where you rase music volume when you are not speaking you could keep same level for the bg music or make the parts of your voice closer to each other so the video would be shorter too, that can be good time optimisation :)
@teachercheung
@teachercheung 2 жыл бұрын
This is a professional scare optimization. I think there should be a better work flow on pipeline this optimizations in toolings.
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Absolutely. I think there should at least be a native plugin for atlassing because that alone can save so many different types of resources, and usually at very little (cpu, memory) cost.
@HehasChinese
@HehasChinese 2 жыл бұрын
Subscriber n°1000 :D
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
1000 indeed. Thanks for the sub! :)
@AzainUsman
@AzainUsman Жыл бұрын
Are you using DOTS ?
@gleaner3485
@gleaner3485 2 жыл бұрын
It's not just a devlog, it's definitely a great tutorial! Thanks for sharing! Would you please teach me how did you manage to reduce the drawcalls of pegestrian or cars? (I mean I have hundreds of customized characters with many materials and extra meshes like hat/glasses/clothes however I don't know how to optimize them)
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Thanks for watching and commenting. In a word: "Atlassing" In my case, I have hundreds of pedestrians but only about 60 are unique. I went with a set of 4k textures (or maybe 8k) to make up a single Material for all 60 because the textures/mesh are atlassed. That way there were a few batching options available to me. If my memory serves, I went with GPU instancing for the pedestrians. The "cost" of preparing large sets of Materials and passing them along to the GPU can be expensive (Draw Calls, SetPasses), so I needed to reduce that "cost". Originally, not only were my pedestrians all using separate Materials, they weren't using the same settings on the Shader and a few used different shaders all together. I had to refactor them all ("MA_TextureAtlas" helped me a lot - it's free) and the process took at least 2-3 days. I use this strategy frequently including: - Pedestrians/passengers - Vehicles - Billboards - Buildings - All the dynamic objects around the city Take consideration of the size of your pedestrians' textures and whether or not they need to be that large. If they're 2k and you notice no difference if they're 1k instead, you can then atlas and get 4 pedestrians into the 2k textures. If you can get by on 512px, then you can get 16 pedestrians into the 2k textures if atlassed. And so on. The _potential_ downside here is that if you only see a few pedestrians at a time then you'll be consuming memory for larger textures when you may not need to. But if there's a bunch of pedestrians around then the memory footprint won't be much different, if any different at all. The vast majority of my game fits into probably about 10-15 Materials. All that said, don't get stuck on the number of draw calls unless you're sure the quantity is slowing you down. Reduced Set Pass is usually more important IMO. You can have large numbers of draw calls, but if they're being sent efficiently in a fairly low number of Set Passes, consider that a win. Also, if it makes sense in your game, don't forget Occlusion Culling (profile both with and without in a build - not the editor). There's no point in processing pedestrians behind static objects like walls and sending that to the GPU. Hope some of this helps. Let me know if you have specific questions and I'll try to answer as best I can.
@gleaner3485
@gleaner3485 2 жыл бұрын
@@CassiusJohnAdams Thank you for taking the time to answer my question. That's so kind of you I really appreciate it! I'll just try atlas method first to see if there's another question. I believe it'll help me a lot! Wishing you the best and plenty of success in your game development.
@kronenapp2918
@kronenapp2918 3 жыл бұрын
The approach of faking the traffic in the background makes it look far more interesting in my eyes.
@CassiusJohnAdams
@CassiusJohnAdams 3 жыл бұрын
Yeah, I think so too. It just seemed too empty above and below before I added them.
@josiahjack455
@josiahjack455 Жыл бұрын
Static objects aren't static in the build by the way. The more you know.
@Raccoon5
@Raccoon5 2 жыл бұрын
I think you have very fun and interesting devlog on your hands. The cheap sounding music with variable volume, in my opinion, cuts down on the quality. Keep up the good work:)
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Thanks for the constructive feedback. I thought the music in this video was a significant improvement over the last devlog, but perhaps I'll need to keep searching. For this vid I used different editing software which I'm still figuring out (had problems with audio). Hopefully that'll all be sorted by my next video. Thanks again!
@Raccoon5
@Raccoon5 2 жыл бұрын
@@CassiusJohnAdams Awesome for improving your craft. I just found you via KZbin, so this was my first exposure to your content 😁 I totally get the "5 days in" fatigue :D
@cassiusadams8044
@cassiusadams8044 2 жыл бұрын
@@Raccoon5 Thanks! I will admit, I don't like making KZbin vids and would rather spend my time gamedev'n. But quite a few people have wanted to see what I'm up to, how I'm doing it, etc. So I make these videos for them and others in hopes my sometimes unusual/unorthodox way of approaching problems gives them ideas for their own games. Plus I always liked watching "behind the scenes" videos for movies - why not games :) PS Welcome to my channel. Hope to see you again.
@anilo1
@anilo1 2 жыл бұрын
Did you use the DOTS Sample to build the game?
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
No, I didn't use the DOTS sample in the game. I imagine you're referring to the Megacity Demo? Unfortunately I wasn't aware of it when I started making this game. More recently, I've started to use some Jobs and Burst for the vehicles though.
@everything-bagel
@everything-bagel Жыл бұрын
Did you try prototyping in UE? If so how did it compare to Unity for optimization?
@CassiusJohnAdams
@CassiusJohnAdams Жыл бұрын
I have never installed or used UE so I can't make a comparison for optimization. I get the impression that UE is more performant, but Unity does have DOTs (which I'm not using though).
@everything-bagel
@everything-bagel Жыл бұрын
@@CassiusJohnAdams It would be interesting to see how your scene would work with UE’s Nanite system, which was designed to handle high complexity/geometry. Their Matrix demo handles tons of meshes, and reminded me of your scene. Thanks for the video!
@AhmadRaza-ph9dv
@AhmadRaza-ph9dv 7 ай бұрын
game link?
@stfm
@stfm 2 жыл бұрын
Amplify Impostor is 50% off at the moment.
@cihadturhan
@cihadturhan Жыл бұрын
Hey, I know this video is old but I’m just wondering why you never mentioned instancing. AFAIK you can render hundreds of thousands of objects without any performance drop even on mobile.
@CassiusJohnAdams
@CassiusJohnAdams Жыл бұрын
It depends on the kind of instancing you're referring to. There's instancing of the materials happening on the GPU. If you mean mesh instancing on the GPU (caching?), I didn't really get to doing that in this project. But there is a fair amount of batching happening. Maybe I mentioned some of those in the other videos.
@cihadturhan
@cihadturhan Жыл бұрын
⁠@@CassiusJohnAdamsyes, I meant geometry batching as it’s more convenient. Anyways, I liked the progress you made so far. It’s fun to watch
@usmanmemon
@usmanmemon 2 жыл бұрын
Why spend years making a game which doesn't really have a good gameplay. But don't abandon the game just add more gameplay features. Those gameplay feature can be simple to highly exotic eg. Player getting out of the taxi.
@CassiusJohnAdams
@CassiusJohnAdams 2 жыл бұрын
Well, because I enjoy making it and learning of course :) "Good gameplay" is completely subjective, so neither of us can make an objective determination as to what good gameplay is. Just what we personally find enjoyable. For me, it mostly aligns with the types of video games that were common in the late 90's and early 2000s. So my game tries to fit into the style and feel of that era. As for the extra features, first I need to finish the game and avoid scope-creep. Then I can consider expanding the types of things one can do within the game beyond the current scope of the game. :)
@usmanmemon
@usmanmemon 2 жыл бұрын
@@CassiusJohnAdams I hope you will have a great success. 👍
Unity Performance Optimization - DevLog #9 for My Game, MiLE HiGH TAXi
10:12
Watch This Before Working on a Big Game in Unity
18:44
John Leorid
Рет қаралды 300 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 51 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,1 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 25 МЛН
I Made a Game About a Flying Squirrel - Devlog
10:17
Codeer
Рет қаралды 199 М.
Git Gud At Crazy Taxi Techniques And Execution Tips
19:37
MashPotatoTower
Рет қаралды 13 М.
I Paid Devs on Fiverr to Make an Open World Game
8:33
Minimunch
Рет қаралды 451 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
Top 10 Tips To Optimize Your Mobile Game - Unity 3D
8:06
CG Dealers
Рет қаралды 41 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 203 М.
Unity Optimization : reducing 3D objects' draw calls
14:53
about game making
Рет қаралды 73 М.