Hidden movement with highlighting possible moves

Game development with Board Game Arena Studio
Post Reply
User avatar
vurtan
Posts: 57
Joined: 13 June 2020, 19:54

Hidden movement with highlighting possible moves

Post 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
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: Hidden movement with highlighting possible moves

Post by Tisaac »

Read the documentation : the _private field exists precisely for this purpose
User avatar
vurtan
Posts: 57
Joined: 13 June 2020, 19:54

Re: Hidden movement with highlighting possible moves

Post 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.
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: Hidden movement with highlighting possible moves

Post 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.
User avatar
vurtan
Posts: 57
Joined: 13 June 2020, 19:54

Re: Hidden movement with highlighting possible moves

Post 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 :)
Post Reply

Return to “Developers”