How do I view multiple users on a real-world map in real time? (MMO)

0 votes
Hey everyone!

I am new to AppWarp, so the more detailed/basic the answer, the better :)

I'm currently trying to develop an iOS app in Swift with XCode (although I would also like to eventually have it on Android, so potentially I should be using something like Unity or Corona... anyway...)

I am looking for a way for users of the app to be able to view everyone else in that "room" (georegion) on a real world map (using Google not Apple maps) in real-time (like an MMO). I understand the concept of multicasting/broadcasting and interest management. The most basic functionality I came up with is every 5 seconds each user sends a message to the server with their lat/long co-ords. The server compiles this into a single chunk of text with all N locations and broadcasts this to every user's device in which the device places/updates the markers on a map.

There could potentially be other stationary non-user objects that also need to be updated too.

I understand this is a very crude/basic model, but at the moment I haven't got any other ideas.

Pretend it's like a soccer game, where the idea of the app is for everyone to have a birds eye view of the field in which they can see every other player's location in real time. (Updated every 2-5 seconds depending on server capabilities). Plus the ball of course.

What I'm confused about is how to implement this using AppWarp. I read the MMO Interest Management guide, but given it is written in Java, I am unsure how to implement this in iOS using Swift.

Right now I would be looking at the Indie FreePlan, so I would be initially limited to 2 million messages per month (hence the update frequency limit), but this is definitely something that could progress into one of the paid plans.

Tl;dr? Basically - how does agar.io do it?

Any suggestions/ideas would be awesome. Thank you in advance!
asked Sep 17, 2015 in AppWarp by swimsurfrhys (10 points)

1 Answer

0 votes

Hi,

Our MMO sample has two parts one is Server Side and the other one is Client Side. The server side coding has been done in Java and the client side was made using Unity. So, even if you are making your game in Swift, the same server side code will work. For the client side, you can take the reference of Unity Client code. 

As your game is an MMO, so combining the location of players in a single chunk may not be a good option as there is a imit on message size which a client can send or recieve. 

As you said, you may consider Unity to make your game going further, in that case you dont need to convert the Client side code of the sample to Swift to get started.

Let me know if you have any further queries.

Thanks.

answered Sep 17, 2015 by rajeev.etc (1,660 points)
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
...