Hey guys,
Recently I have been working on a board game with 2 Players where I have placed 5 scrolls on the board and if a player crosses the scroll he has to answer the question written in the scroll. So first Player 1 rolls the die he moves on the board and player 2 rolls the die and he moves.
Basically, if Player 1 encountered a Scroll, he will be opened on the new scene in unity where he will see questions written on it and has to answer them in that turn. If he is not able to answer correctly he will be stuck there and player 2 turns will come.
So anyone has an idea how can I implement this as I have to switch back and forth between the scene i.e player 2 scene is on board and when player 1 turns come the unity scene should change to the scroll scene where he tries to answer a question in the next round. After he attempts the answer scene should switch back to the main game scene where player 2 is there and player 2 plays the round.
I hope I was clear enough to give you an intuition where am I stuck. If not please let me know I will explain again.
Even if it is different lighting you can still change a heck of a lot of that. It’s only baked stuff which gets tricky.
Each player has their own state data (position on the board, resources, attributes, whatever) and the game also has some shared game state data (who’s turn it is, what part of the turn it is, and so on). Then instead of changing scenes you have different GameObjects in one scene which are turned on and off depending on what’s happening. The user interface content is changed to represent the current game and player state data whenever something relevant changes.
So, when Player 1’s turn begins, the UI content is updated to show that Player 1 is now in control, and it’ll show their resources, attributes, etc., and anything that’s not relevant at the start of a turn is disabled. If Player 1 enters a space where they need to answer a question then a GameObject in the UI is activated which contains the question display, which gets populated with the selected question. That gets disabled again once the question is answered.
Of course that’s a pretty high level overview of the approach. There are a lot of details you’ll need to work out, but hopefully that gives you enough of an idea that you can start looking into those things.
If you’re not already familiar with them I recommend learning about events, eg: UnityEvent.
Like most Unity SDKs they are clunky as hell I would recommend using a lightweight service bus instead. But it depends on how event driven you are. If you just have a few events I guess UnityEvents work just fine.
For someone who is asking this type of question, just sticking to the built-in defaults until they have an actual need for something else is a perfectly decent approach.
Really dude. Always monkey wrenching your enterprise paradigm and offer bogus advice thinking yer all smart and stuff. Totally bad advice to OP. Microsofts docs should be nuked if there is any clunky SDK’s about.