Hello, all!
I’m working on prototyping a game. In this game the player is in a multi-floor, multi-room building. In the game I want the player to be able to jump back and forth between two versions of the same building; one version is very well lit and organized, and the other version is very dark and scattered with debris. Besides the lighting and debris, the two buildings are identical (same floor layout, same walls, floors and boundaries). The switches between these two “maps” wouldn’t happen very often, but can happen on demand from the player (with a built in cool-down). The point is it’s not switching every few seconds, just at spaced out points in time.
I am trying to determine the best way of achieving this. I have a few ideas but I am looking for recommendations on which way (if any) would be best in your guys’/girls’ opinion and what holes if any exist in the different ideas I had.
[Idea 1]
I would have one map/building with all of the lighting and debris included. Upon switching between the two versions, all of the light gameobjects would be disabled and all of the debris objects would be enabled (and vice versa for switching back). My only concern with this method is the lighting - ideally in a game environment I feel like lightmapping is a great optimization method, however if I’m enabling and disabling lights on the fly it kind of invalidates the Lightmap. I considered maybe having two lightmaps (one for the light version of the building and one for the dark version of the building) and swapping them dynamically on the fly but I don’t know if this is possible and/or practical.
[Idea 2]
I could have two of the same buildings side by side (I’m not worried about the player being able to see the other because I don’t plan on having transparent windows or views out of the building). The layout of both buildings would be the exact same as I intend but each one would be set up with the lighting and assets I desire. Upon the call to “switch” the world, I would have a system in place to “teleport” the player to the corresponding location in the other building. This way I suppose could work but is prone to some bugs if the teleportation doesn’t happen exactly as it needs to (the player could somehow find themselves stuck or outside the map while teleporting). With this method only one Lightmap would be needed BUT the map would have twice as many asssts.
[Idea 3]
Two separate scenes, each with the same building set up with its two versions. It’d work the same as Idea 2 but instead of teleporting the player there would be a scene load during the switches. This is my least preferred way at a glance because the game is not very long and I feel like the constant loading would take away from the playing experience.
Ultimately I’m just wondering what you all think would be the best way to achieve this. I’m open to any discussions, recommendations, etc. to help me arrive at an answer.
Thank you!