I kinda know this is a silly question, but if someone could answer this definitively it would set my mind at ease.
Say I’ve built a lot of floor tiles from cubes, with six sides (which saves time and adds detail when those tiles reach the side of, say, a platform ).
Assuming all the tiles are sharing the same material (and assuming I use this material in many other places if possible) and if most of the time the only side of this tile that’s seen is the top face, would this be a horrifically wasteful way to build levels?
Follow-up question: …and if this isn’t how a Unity game similar to Lara Croft and the Guardian of Light (MiikaHweb - Game : Lara Croft and the Guardian of Light) would be built, are there any suggestions for better practices?
(Aside from building the whole thing in Max/Maya/Blender as that’s horrifically inefficient… Also, let’s pretend the awesome ProBuilder doesn’t exist for this question).
What are the best practices for building a tile-based action game?
They do affect performance, if there is a face that won’t be visible to the camera then it should not exist and even if you combined meshes they will still be an extra cost if they are not visible and will not be visible and maybe they will lead to flickering depending on the shaders, renderer and camera settings.
If you consider only the vertex count which will be 24 for the 6 faces versus 4 for only one face (it will be 24 since each face will have 4 vertices due to the 90 degree angle and normal calculation and not 8 vertices in total) which means 6 times more costly than a quad even if you combined them plus you shouldn’t always combine everything) “bad practice” since this will force the camera to draw all the geometry if no occlusion culling is used and which means more cost per frame than what is needed so optimization should be also done wisely.
this is one of the things we considered when we designed GameDraw, we developed something that works to make your model efficient but yet easy to use, there are tools that allow you to create geometry in a similar way to GameDraw but unfortunately they don’t take care of extra vertices and faces and most likely you will be left with a lot of extra load so I do recommend you read the optimization tips above plus you don’t need to always combine and merge meshes unless the things you combine will be visible to the camera at the same time combining the whole scene to 1 drawcall means that the whole scene will be drawn all the time which means more overhead in that drawcall, keep the drawcall count low but don’t over reduce it as you don’t want objects not visible to the camera be considered in that draw call the same goes to materials as well.
I will be more than glad to write a blog post about it if you like