Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Optimizing Trees &  Development: Video Devlog 19

Optimizing Trees & Development: Video Devlog 19

The nineteenth weekly video devlog of Deterrence. This week I finish optimizing trees and create a fully featured prefab painting tool.

A tower defense mixed with real-time strategy where you repel attacking sentient AI robots until they give up.

Making Trees Optimal

Continuing with CG Geek's Low Poly Tree tutorial from last week, we learned that the tree as is - is not optimal. The performance problem lies in how the tree is being rendered. When the tree is imported into Unity, the tree has hundreds of child objects for each branch and each object requires more processing power. I found that when combining meshes into one object, performance was better. So, the amount of vertices does not have as much of an impact on performance as the amount of meshes.

To make CG Geek's Low Poly tree "Game Ready", I found a way to instantiate all of the particle system branches as real objects. Then I would combine all objects together as one mesh. Now, when the tree is imported into Unity, we get one object that takes two materials. Performance is now optimal since there are much fewer draw calls.

Making Useful Tools for Development

I expanded on my prefab spawning tool to give it all the features I need to build maps faster. I found a really awesome four-part lecture by Freya Holmér that's jam packed with info on how to build tools in Unity. I turned my simple one click tool into a fully featured painting tool that works with the Unity Editor.

If you would like to follow me on my game dev journey, don't forget to subscribe or follow on social media!


Facebook - https://www.facebook.com/DeterrenceGame/
Twitter - https://twitter.com/DeterrenceGame
Discord Server - https://discord.gg/tH3qRhMau7
Indie DB - https://www.indiedb.com/games/deterrence

Recommended resources

Game Engines

See full guide
Unreal Engine 5 Best Practices cover
Editor pick

Unreal Engine 5 Best Practices

Amazon · Book

Written by multi-award-winning Unreal generalist Tyson J. Butler-Boschma, Founder and Creative Director of Toybox Games Studios, this book addresses common challenges you face when advancing your expertise in lighting, environment design, and cinematic storytelling.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

Discussion

Loading comments...