Some questions regarding turn based games

0 votes
Hi,
 
A couple questions related to turn based games:
1. Is it possible to create a turnRoom in the management console or its only possible using the SDK?
2. In general, what is the best practice? To hold a list of fixed rooms in the management console or create rooms dynamically via the API?
3. If the answer for 2 is to create rooms dynamically, I guess a lot of developers implement their own UI for displaying the available rooms. Is there a basic/recommended UI somewhere that I can use in my app? (Windows Phone 8).
4. Is there a built in API for requesting a rematch when a game ends?
 
Thanks!!!
Noam
related to an answer for: Does AppWrap support turn timeouts?
asked Mar 27, 2014 in Discuss & suggest API by noambehar1 (37 points)

1 Answer

0 votes
 
Best answer
Have you gone through the following? It answers your questions on rooms

http://appwarp.shephertz.com/game-development-center/basic-concepts/#rooms

In most casees people just use dynamic rooms. I think static rooms are only for chat room applications or if you're making a small virtual world sort of application.

Showing a list of rooms is not very beneficial in most cases. In most cases - players just want to start playing and using the matchmaking APIs is the best way to do that. I read the following posts in my case.

http://blogs.shephertz.com/2013/11/13/process-of-matchmaking-with-known-user-and-random-user-on-appwarp/

http://blogs.shephertz.com/2013/11/11/tutorial-to-make-multiplayer-games-in-windows-phone-with-appwarp/
answered Mar 28, 2014 by starabc (39 points)
selected Mar 28, 2014 by noambehar1
Thanks for the links.
I agree that we shouldn't bother the user with rooms/lobbies etc' - so the matchmaking API is actually to join a room with the isPrivateRoom property? this property makes it act as "matchmaking"?


What about rematches?

Thanks!!
Noam
That is a way of doing it if you want to play with a particular player. You can build your own logic as well (property based or number of user based).

http://appwarp.shephertz.com/game-development-center/matchmaking-basic-concept/

The following sample does matchmaking based on number of players

http://appwarp.shephertz.com/game-development-center/Cocos2d-xna-multiplayer-tutorial/
http://appwarp.shephertz.com/game-development-center/java-multiplayer-libgdx-tutorial/

There is NO "rematch" API. You can use the start/stop APIs to perhaps simulate the same.
Hi,

I've done everything as in the tutorial - I try to join a room after connected, and if there's no room exists - I create a new one. Only that I get to API callback after creating a new room. I think I should have gotten onSubscribeRoomDone?

Here's the code:
        public void onConnectDone(ConnectEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                // Successfully connected to the server. Lets go ahead and join the room.
                WarpClient.GetInstance().JoinRoomInRange(1, 1, true);
            }
            else
            {
                m_onlinePage.showResult("connection failed");
            }
        }

        public void onJoinRoomDone(RoomEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                string gameRoomId = eventObj.getData().getId();
                WarpClient.GetInstance().SubscribeRoom(gameRoomId);
            }
            else
            {
                // Room not found. creating one
                WarpClient.GetInstance().createTurnRoom("Room", "a", 2, null, 10000);
            }
        }

The code triggers the call "JoinRoomInRange(1, 1, true);" but I'm not getting any callback...
You'll get the onCreateRoomDone callback in your ZoneRequestListener. See how its done in
https://github.com/DhruvCShepHertz/XamarinMultiplayerBananas/blob/master/GoneBananas/iOS/GoneBananas/GameStartLayer.cs
Oh, that's working. Great!
The API is bit confusing as I was waiting on my NotificationListener on method "onRoomCreated".

I'll keep follow this example.
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
...