- Home /
Problems on Grid made Map
Hello everybody. So today i start to make an Advance Wars clone for Android and iOS, but right away at the start i found an issue, not one that i dont know how to deal with, but one that i dont know how to correctly deal with. With this post you will find a picture so lets identify some things: -Minimap on the upper left corner: Camera to texture with Unity Pro. - Rest of the HUD: Simple buttons with onGUI scripting. - Yellow grid: easily done with a proyector (i think). - Green Selection Square: I think its a solid 3d object with some glowing particle effecs, but not sure. - Squares: Squares with some texture/3d models on the upper side.
My question is: assuming my scenarios are 120x120 squares, how much impact in performance could i have when doing actual squares and instantiating them when the map is loaded? (i calculate about 20K draw calls maybe?) If not, in what way i could acomplish this with a smaller impact on performance?
If someone needs more explanation or examples i will gladly post them. Thanks in advance!
aparently i have to use some sort of Draw Call Batching on the tiles
Answer by Loius · Dec 23, 2012 at 09:45 PM
20k draw calls is too many, period.
Search for "Unity SpriteManager"; the class on the unity wiki is very helpful and you can build all your tiles in one place; they'll be batched into one draw call for you and there'll be about zero impact. Batching the world tiles will let you spend more resources on your particles and such.
as far as i can tell, Sprite$$anonymous$$anager is for batching 2D Sprites (quads) into one Draw Call. But will this work for 3D objects?
You can rotate the quads to face any direction you need, but if you need actual meshes, I don't know of any existing utility to batch those.
You can mix-n-match, though - doing the flat tiles as sprites should clear up enough of those draw calls to give you some breathing room, hopefully :)
Your answer
Follow this Question
Related Questions
Any useful detailed tutorials on game performance and draw calls for beginners in game development? 0 Answers
Performance/framerate issue 0 Answers
How to only show objects in range ? 2 Answers
Is RaycastHit an expensive operation vs something via JS? 1 Answer
What's killing my rendering performance? (pic included) 1 Answer