What service do I do for Real Time multiplayer(not turn based)

0 votes
I'm new to this SDK. I use unity3D. I've checked the docs for the services but I can't find multiplayer service or random match making service. I only saw buddy service and social service. How do you make a real time multiplayer or random match making game with App42? Thanks!
asked Dec 13, 2014 in App42 Cloud API-BaaS by slicedstudios (15 points)

1 Answer

0 votes
Hi slicedstudios,
 
For storing users data on cloud you can use our App42Cloud API's. Buddy service provides a way to post a message on cloud and then receive that message on other end but they are not real time and is pull based.
AppWarp solution is suited for this kind of application and can be implemented on cross platform for multiplayer messaging. You can use both together for storage and messaging purpose hand in hand.
For details please visit.
 
answered Dec 14, 2014 by naresh (350 points)
I don't want messaging and storage, I want a multiplayer game. An example "Call Of Duty" you can play online
@slicedstudios, you'll have to use AppWarp service. With AppWarp you'll be able to send UDP or TCP messages, create rooms and more.
Hi Sliced Studios,

As m.casula said, you should check out AppWarp. AppWarp is meant for creating real time multiplayer games. It has support for TCP, UDP and WebSockets and has all features like Rooms, Lobby, Matchmaking, etc

Since you are using Unity, you can start by checking out dev center for unity http://appwarp.shephertz.com/game-development-center/unity3d-game-developers-home/

Thanks
Hi, I downloaded the Appwarp SDK but know know how to start. How do you initialize it and how do you make a random match making system?
Hi, We have every thing documented. Explaining everything in a comment is quit difficult for me. I request you to check out our dev center. I gave you the link in above comment. You can also find samples in our dev center.
can you at least explain what API do I use?
You can start by calling initialize API. And then you need to add Listeners. AppWarp uses observer pattern. These observers will receive responses and notifications. Once you have created and added listeners and initialized WarpClient with API key and secret key, you can call connect method.

Then you need to join a room. Use joinRoom() API. But to also receive notifications for events in that room you also need to subscribe to that room. For this use subscribeRoom() API

Once you are inside a room, start sending messages by calling sendChat method. All the chat messages and responses of API will be received in listeners.

I highly recommend you to read the documentation and check out samples. Skipping it can mislead you.
Hi, I tried the docs and know how to join lobbies now but don't know how to make it random and make it only between 2 people.
Use joinInRange() method. It accepts minimum and maximum number of users required as arguments
Thanks, do you know how to test the game in unity3d so I can test if the multiplayer system actually works
You can build your game and run one instance in editor and another as the executable
One more question, does the game automaticly join if you have public void JoinRoomInRange(int minUserCount = 1, int maxUserCount =     2, bool maxPreferred = true)
and how can you code the opposition gameObject to be your opposition?
Yes! Calling joinRoomInRange will automatically add you in a room if available. You can uses sendChat to exchange information in string format or sendUpdatePeers to exchange information in binary format. Using any two this method you can send position of player to the opposite players
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
...