Hi, I’m working on a dungeon crawler game and facing some problems.
My target is mobile plateform so I have to take care about performances.
Here’s a basic setup of a dungeon in the attached image
What’s on yellow are level attached to the persistant level.
As I’m working for mobile, I tryied to use precomputed visibility but it doesn’t work with this kind of setup because as you can see on the cell exemple on this image, precomputed visibility draw a grid of cells and ignore the geometry, so if the player is in the right cell (ie close to a wall), the engine draws what’s behind the wall.
So I tryied to use level streaming instead. Trigger boxes hide/show level rooms when they overlap the player.
It works but now my problem is about AIs because they should be able to move between rooms. I see two options:
1 - I put the AI in their starting level room but, if the AI follow the player and his starting room is hidded/unloaded, then the AI disappear because he is a part of the room.
2- I put the AI in the persistant level but, because their starting level room are hidded/unloaded, they fall in the void.
What I’m doing now is doing a line trace under every AI on tick and freeze their movement component while there’s no hit and unfreeze while there’s a hit but that’s not good for performance.
Then here are my questions:
- Can I use precomputed visibilty with this setup and avoid other actor/meshes/etc to be drawed when the player is close to a wall?
- What is the best way to use streaming level with AIs?
- Should I tryied another setup for my dungeon?
Thanks for helping.