Page 1 of 1

Zombie mode questions

Posted: 20 August 2017, 01:22
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.)

Re: Zombie mode questions

Posted: 20 August 2017, 09:54
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.

Re: Zombie mode questions

Posted: 09 February 2018, 22:22
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

Re: Zombie mode questions

Posted: 12 February 2018, 17:06
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

Re: Zombie mode questions

Posted: 12 February 2018, 19:55
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!

Re: Zombie mode questions

Posted: 16 February 2018, 01:25
by quietmint
The same worked for me with multiple of my own studio accounts, eg. quietmint0 and quietmint1 in two different windows.

Re: Zombie mode questions

Posted: 16 February 2018, 10:05
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!

Re: Zombie mode questions

Posted: 16 February 2018, 13:20
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!

Re: Zombie mode questions

Posted: 07 April 2018, 11:35
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?

Re: Zombie mode questions

Posted: 20 April 2018, 10:50
by Een