Since AppWarp server supports connections from android, ios, wp7, j2me and now websockets – communication is truly cross-platform. This means users playing the browser flavor of your game can interact in real-time even with users who are on the corresponding native flavors.
A simple example is provided to help you in getting started. It is a simple version of the classic Tag game. Once you’ve entered a name and joined the virtual world – you are asked to pick an environment. In the backend – these are actually different virtual rooms created from AppHq. The first user to join a room is given the role of a policeman and the second one to join is given the role of a robber. The number of users in the room is easily determined using the getLiveRoomInfo api and by tracking the onUserJoined/LeftRoom events exposed from the SDK. Once the robber has joined, the game starts and the policeman is given 60 seconds to catch the thief.
Both endpoints pass each other their coordinates through the updatePeers api using which they can track the others positions on their user interface. Once the thief detects that the policeman’s coordinates overlap with his own – the game gets over.