Page 1 of 1

Hidden movement with highlighting possible moves

Posted: 26 June 2021, 19:21
by vurtan
Hi everyone,

currently I develop a small game. Regarding the movement it's similar to play a disc from the reversi tutorial.
But I have some difference and currently not know how to solve it:

- The position of each player is only known to themself. So they don't know where the others are.
- All players are active at the same time (therefore I use "setPlayersMultiactive"

In the tutorial of reversi each time the "playerTurn" game state is entered, the "argPlayerTurn()" returns the possible location to place a disc, which are then highlighted.

I would like to do the same but only give the current player his possible fields and not showing the possible move of the other one (which is that what I currently get).

I believe I can do it with notifications but I'm not sure if that is the way it is supposed to do.
Any hints or ideas are very much welcome.

All the best
Helmut

Re: Hidden movement with highlighting possible moves

Posted: 26 June 2021, 21:13
by Tisaac
Read the documentation : the _private field exists precisely for this purpose

Re: Hidden movement with highlighting possible moves

Posted: 27 June 2021, 09:20
by vurtan
Thanks for your reply. I read about the _private field before, but was incertain about the "performance impact" in multipleactiveplayer.
But I will check it out.

Re: Hidden movement with highlighting possible moves

Posted: 27 June 2021, 10:13
by Tisaac
vurtan wrote: 27 June 2021, 09:20 Thanks for your reply. I read about the _private field before, but was incertain about the "performance impact" in multipleactiveplayer.
But I will check it out.
Well you have no other choice, if you want separated args, you need to send each players different data.

Re: Hidden movement with highlighting possible moves

Posted: 28 June 2021, 13:22
by vurtan
Yes you are completely right. I know use the _private field and set it for each player individually. And it works like it should :)