one player can't join room on second game.

0 votes

Good day, I'm new to AppWarp. After trying my game in two player mode. The two players was able to connect for the first game. But on the the second game, one player can join a room immediately while the other can't. returns an onConnectDone: false Your help would be appreciated. Thank you.

 

 

            if (target.getY()<=0){
                if (Target.a1 == 1) healthGreenm -= 0.1f;
                else if (Target.a1 == 2) healthRedm -= 0.1f;
                else if (Target.a1 == 3) healthPinkm -= 0.1f;
                else if (Target.a1 == 4) healthBluem -= 0.1f;
                if (healthBluem<=0 && healthGreenm<=0 && healthPinkm<=0 && healthRedm<=0){
                    //handleLeaveGame();
                    WarpController.getInstance().stopApp();
                    onGameFinished(WarpController.GAME_LOOSE, true);
                    return;
                }
            }

 

 

    public void onGameFinished(int code, boolean isRemote) {
        scorem = 0;
        if(isRemote){
            prevScreen.onGameFinished(code, true);
        }else{
            if(code==WarpController.GAME_WIN){
                //world.state = World.WORLD_STATE_NEXT_LEVEL;
            }else if(code==WarpController.GAME_LOOSE){
                //world.state = World.WORLD_STATE_GAME_OVER;
            }
        }
        //WarpController.getInstance().handleLeave();
        WarpController.getInstance().stopApp();
    }

 

asked Jan 12 in Android by pmaccreation (10 points)
edited Jan 14 by pmaccreation

1 Answer

0 votes
Hi,

Greetings!!!

Could you please share your detail use cases and sample project with us. It will help us to provide better support to you from our end.

Regards,

Priyanka Singh

App42 Team
answered Jan 13 by priyanka.singh (186 points)
Hi, I added some of my codes that I think is important to this issue. Basically there are two players playing against each other and once it is game over the two of them should leave the room but what is happening is one of the players can't join the room immediately while the other can.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...