- Home /
Need advice on the best way to load new rooms when a player interacts with (opens) a door
I'm working on a game based on the board game (basically copying) Betrayal at House on the Hill (now I understand there are legal implications don't worry im not selling the game or giving it away to anyone except close friends, this is really just a passion project/learning project).
If you've never played the game, the main premise is that every time you exit a room that doesn't have another room connected to it, you draw a room tile from a pile of room tiles.
I'm trying to figure out the best way to accomplish this interaction. Obviously I can just generate the room when the player interacts with (opens) a door, but the question is really how should I spawn the room in? What's the best way? Should i have prefabs of every room, and spawn the prefab at the door? Should I have a scene of every room & load the scene (I don't think so, as players need to be able to see every room, or at least every room connected to the room they're currently in).
Answer by Llama_w_2Ls · Nov 02, 2020 at 10:43 AM
If you can code this, a prefab with a random room generation script would work well. However, if you were to load new scenes every time someone opened a door, all the players in the room would also change scene without warning (assuming your game is multiplayer) so I wouldnt recommend that.
If you cant generate random room tiles, I think pre-made prefabs would be a nice way to go. @unity_PVQXbxGZyEPONg
Your answer
Follow this Question
Related Questions
What are some good scripting habits? 3 Answers
Identifying Prefabs without using strings? 1 Answer
Composite Design Pattern in Unity, Redundant? 1 Answer
LoadLevelAdditive destroy some textures 0 Answers
Light probs in additive loading 0 Answers