Zombie mode questions

Game development with Board Game Arena Studio
Post Reply
User avatar
quietmint
Posts: 265
Joined: 31 July 2017, 00:28

Zombie mode questions

Post by quietmint »

Can someone explain how zombie mode should work? When a player has their turn skipped (out of time), what's supposed to happen at that moment? If I understand the docs correctly, my zombieTurn function should get called immediately, where I'll do the steps to end the zombie's turn and continue the game. This isn't working for me in studio. Despite clicking skip turn and seeing a message that the player is skipped, he stays the active player and the game is stuck. It appears my zombieTurn is not called. What's wrong?

My zombie function is quite simple:

Code: Select all

    public function zombieTurn($state, $active_player)
    {
        $this->gamestate->nextState('zombiePass');
    }
My states include these:

Code: Select all

    3 => array(
        "name" => "playerStart",
        "description" => clienttranslate('${actplayer} must take an action.'),
        "descriptionmyturn" => clienttranslate('${you} must take an action.'),
        "type" => "activeplayer",
        "action" => "stPlayerStart",
        "possibleactions" => array( "act" ),
        "transitions" => array( "ask" => 10, "execute" => 80, "zombiePass" => 98 )
    ),

    98 => array(
        "name" => "playerEnd",
        "description" => '',
        "type" => "game",
        "action" => "stPlayerEnd",
        "updateGameProgression" => true,
        "transitions" => array( "playerStart" => 3, "gameEnd" => 99 )
    ),
 
(My function stPlayerEnd simply changes the active player and goes back to state #3, or ends the game on win condition.)
User avatar
DrKarotte
Posts: 279
Joined: 22 September 2015, 23:42

Re: Zombie mode questions

Post by DrKarotte »

I have read somewhere in the studio doc that the zombie mode cannot be tested in studio, it doesn't work there. This might have changed with the last update.

The zombie mode transition must be possible in every active player state, it is not sufficient to set this only in the first state of a player turn as a player can quit the game at every moment.
vincentt
Posts: 247
Joined: 01 September 2017, 17:25

Re: Zombie mode questions

Post by vincentt »

Hi,

Did you had your answers?
I am trying to test my Zombie function but I am having the same behaviour.

Thanks a lot!

Vincent
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Zombie mode questions

Post by Een »

This has actually changed with the last update, since you can now play a game with two different studio accounts:

- Create two studio accounts, dev et devzombie
- Log in with dev0
- Log in with devzombie0 (private window or other browser)
- Start a game between these two players
- Quit the game with devzombie0
vincentt
Posts: 247
Joined: 01 September 2017, 17:25

Re: Zombie mode questions

Post by vincentt »

Thanks Een.
It means that we need to register twice :D

I will ask my codevelopper to leave a game then :D

I will put that in the pre-release checklist then, as it still says that it can be tested in preprod only

Thanks a lot!
User avatar
quietmint
Posts: 265
Joined: 31 July 2017, 00:28

Re: Zombie mode questions

Post by quietmint »

The same worked for me with multiple of my own studio accounts, eg. quietmint0 and quietmint1 in two different windows.
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Zombie mode questions

Post by Een »

Woops, I thought it didn't work so I didn't even test the simple solution then. Sometimes, the things we think we know... :roll:
Thanks for checking!
vincentt
Posts: 247
Joined: 01 September 2017, 17:25

Re: Zombie mode questions

Post by vincentt »

Damn, when I tested it with my account vincentt0 and vincent8 it didn't work... so maybe my function has an issue...

I will test it then and keep you posted!
User avatar
DrKarotte
Posts: 279
Joined: 22 September 2015, 23:42

Re: Zombie mode questions

Post by DrKarotte »

Did you solve the problem?

I seem to have a similar problem. When I added the zombie mode in my actual game I tested it in studio as described (2 windows), and it worked fine when one player quit the game.

But now in the release there seems to be a problem when a player is out of time and skipped. Then it keeps to be his turn, the game gets stuck (at least in some tables). There is no error message like "Zombie mode not supported in this state" or like that which usually appears when something is wrong in the code.

Is there any differencebetween zombies who actively quit by hitting the quit button and those who are skipped after they have run out of time?
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Zombie mode questions

Post by Een »

Post Reply

Return to “Developers”