Private Game state?

Game development with Board Game Arena Studio
Post Reply
User avatar
pasko92
Posts: 6
Joined: 05 January 2018, 15:15

Private Game state?

Post by pasko92 »

Hello,

I am developing a game in which I am using "multipleactiveplayer" state. It starts with a state "PrivateState1". The active player does something and what I need to do next is move this player to another private state called "PrivateState2" which is kind of a "game" state. It's purpose is simply to do something small and then redirect the player back to "PrivateState1" (because I need to refresh the args of this state and also refresh the UI).

So my question is if there is something like a Private Game state which doesn't rely on the player to do something but just does something on its own and then changes the private state.

I was able to achieve it with "PrivateState2" simply doing an automatic ajax call in the .js file but according to the documentation we shouldn't trigger ajax calls programmatically.

Any ideas?

Thanks in advance!
User avatar
pasko92
Posts: 6
Joined: 05 January 2018, 15:15

Re: Private Game state?

Post by pasko92 »

Ok, I just saw how it is being handled in some other games. They remain staying in "PrivateState1" and when they do something on the server they trigger "notifyPlayer" and then update whatever needs to be updated on the UI. In this case, we just stay in the same state.

I've already implemented it in that way and it works fine for now. So just wanted to write it here in case someone else is facing this issue.
Post Reply

Return to “Developers”