Hi, I’m making mining/crafting game, where the world generates as you walk through it.
It’s top down, so only 2 layers: Floor and Walls (Ex: No digging down or building up)
About 4000 blocks in the world right now, but camera only sees a handful at a time, depending on it’s angle.
Every block (except water) is using the exact same material. They are UV’d to a coloured texture lookup.
Blocks are about 600 tris cus of rounded edges & uv’d tex lookups. I figured it’s okay because not many are on screen at once.
Blocks are dynamic (Dynamic batching is enabled)
GPU instancing is turned on
If I try putting lots of grass in the scene, the game drops to an impressive 5fps.
So what am I doing wrong here? I’ve seen videos online of tens of thousands of animating objects moving around smoothly. Should I opt for simpler blocks with actual textures? Did I set up my batching or GPU instancing wrong? Should everything be toggled static on/off when they aren’t moving?
Thanks!
Note: I’ve tried the profiller but have a hard time understanding what to make of it or how to fix it, as I’m not terribly proficient with the unity editor itself.
You might be trying to batch but your stats show 10k batches with basically nothing saved. If all those blocks cast individual shadows (I can’t tell if they all do) that’s going to be homicidal on your rendering performance, plus I think shadows affect batching.