I'm currently working with a dungeon game which is similar to Dungeon Keeper by Mythic Entertainment. I'm using Unity and developing this game for Ipad 2 and above. Player can modify his dungeon, and I'd written a dungeon generator which creates it. In this case, I can't use lightmaps, because the dungeon has been created dynamically and player can tweak it. I also devised a way to combine separate game objects in a single mesh, so imagine that the entire dungeon (except special objects such as pillars, statues and mobs) is the single mesh. There's many point light sources (10-15 and above) on the stage, but Unity don't allow to use more than 8 light sources per object.
So, if all dungeon cells are separated objects, I can use the diffuse or even vertex-lit lighting, but if the entire dungeon is a single mesh, there's the hardware limit appears.
Ways to solve this problem I'd divised:
- Use separated geometry (tried) - bad, because it harms berformance because there's many-many-many drawcalls (16-17 fps on Ipad 4).
- Use deffered shading (tried) - bad, because it harms performance even more than separated geometry.
- Use a custom shader (haven't tried) - I don't know how.
- Don't unite all cells in the single mesh but unite groups of cells to reduce the number of separated objects (haven't tried)
- Use the light manager (haven't tried) - I don't know how.
How can I deal with it?