I’ve been doing a bit of forum reading, and it appears as if I might be in for a very large reality check fairly soon…
In my project, my environments are very “non-uniform”, in that the sprites are placed in a sort of “freeform” mode, and not on any sort of grid, as a tile map could do.
To make matters worse, there are a lot of sprites that use custom materials. Most of the sprites in my project also use normal maps as a secondary texture. Therefore, I have just been placing these environment objects wherever I needed them, as separate game objects.
My plan was to enable/disable large chunks of these environment game objects whenever the player leaves a specific area, and then enable them again once the player comes back, but I fear this would only be a bandaid…
From what I am reading, it sounds like this may not be the best choice, performance-wise. At the moment, I’m looking at about 1400 game objects in the scene, with ~25% or so disabled at any given time (a lot more than this once the scene becomes larger). When all is said and done, however, I’m likely to have tens of thousands of environment sprites, each its own game object and with its own sprite renderer and (possibly) custom material.
I do have a few sprites that I could place into a tileset, but it would only be 2-3 individual sprites per tile set, at most, since the custom materials I am using vary greatly, and there are quite a few.
Just for reference, with the above number of game objects while using this disable/enable method, my FPS in an actual build varies anywhere from 400-800 FPS, depending on where the player happens to be. I will also mention that this is all running on a very powerful system. I do have a mid-tier laptop, which will be used for testing purposes later.
Some other things to mention here - the project’s resolution will be 1280x720, without the capability of changing it. The largest sprite at the moment is no larger than 512x512, with many environment sprites being smaller than this. I’m also going to be packing most of my sprites into sprite atlases in later builds, but have not done so yet.
Am I in for a rude awakening here, or can this still be done using game objects while using sprite atlases to minimize draw calls?