General Description
I want to build a tech demo about a game concept I am carrying around for quite some time now. A lot of influences from different sources shaped this, and I will try to hint on its sources using parentheses in case some reader might want to look that up. Also, I will italic text that relates to my core concept, which together will lead to the actual question.
Imagine up to four players, which act as some form of state funded investigators, and a couple of AI agents as more or less spooky adversaries, investigating a case of missing people. They enter a two-story single family house with basement, which looks perfectly normal from the outside. From the inside, it should look perfectly normal too. At first. (The idea comes from the book House of Leaves and from the game Control)
Upon investigating the house, they should be able to find that one closet, which extends far more than it should be. Upon closing its door and reentering it, it will change its size and content a bit. If done long enough, it will open up to something, that should never fit inside such a building (yes, a bit of SCP here, and the title-giver, Dr. Who's phone both). But stays the same from the outside.
Anyway, the task would be to find somebody gone missing in there, and maybe add a couple of AI actors that actively try to interfere or just being plain spooky (again, SCP, but mainly Phasmophobia). And escort them back to the outside.
From my own gaming experience I can tell that even stuff like that can grow old fast after you learned to predict how these non-spaces do work. So that is where the procedural generation should come in. If the houses do look a bit alike on the inside, that is okay, but I strive to avoid using a template and only switching out parts (that is how Payday 2 handles its maps, by having certain places which rooms get switched out upon replaying).
Core Problems so far
- The outside must fit to the initial inside and not change during the game
- The inside must fit to the outside at the beginning
- Both should be mostly unique every play-through, with the option of using a seed to recreate these if needed (random room creation is handled here: Procedural... house with rooms generator)
- The inside should only chance if no one "is looking" (like that quantum stuff from Outer Wilds)...
- ...but if somebody is "inside" and not looking, they might disappear into an off-room or get stuck in a closet which doors lead somewhere else.
- But it must be avoided to trap the whole player squad in such a changing environment
- also, the AI actors should be able to traverse that building up to some point.... and... and... crap.
The one question to answer?
If you were observant, you'll have noticed that I stopped my core problems list at one point, which boils down to my core question:
-> How can I keep an AI actor able to traverse such a construct?
That is not only relevant for the opposing agents, but also that person the players would need to rescue. While I could have them getting carried back to the outside by the players, it would be preferred to have them walk back to the outside behind the players.
I am aware that the "generate stuff like described and keep it playable" is a whole theme of its own, but for these aspects I do have at least a plan or something to try out first. If that fails, I still can place a new question here, for example..
But all I know about AI movement boils down to: create your level, compile a navmesh, use an algorithm of choice (mostly A*) to make your bot move properly. But when I switch out parts of the level and the rooms inside can be bigger than the outside, I fail to imagine how to apply existing path-finding to that situation.
Even worse, as far as I remember, most of the navmesh solutions need to be done once, before the level is playable. Now it is updating mid game, possible braking running path-finding tasks because somebody closed and opened a door. I am aware that real-time updating is a thing (just any voxel and build game should do it), but they too work with normal space.
I mean, if I imagine a navmesh, it is mostly a 2D plane, that is projected onto a 3D environment from above, with coordinates in two dimensions fitting to these of the 3D space. Now I have a chunk of space, that will violate the 2D mapping in such a way, that it taps into wormhole-theory or non-Euclidean spaces.
The engine-choice or ide/framework to go with is not fixed yet, but for the sake of "use something where most of the non-programming stuff is already available to some point", I first would try to use Unity... if that matters.