2

I was wondering how to implement "sharing" tango's spatial information with other tango to create a multiplayer game. I just can't figure how to start. I found this demo by Johnny C. Lee, and without the VR stuff, is just what I need to do.

https://play.google.com/store/apps/details?id=net.johnnylee.multiplayervr&hl=es_419

I need to place an object in the space in one tablet, and get the other tables see it on their own space, and to see each other position too.

Please, anything helps. I really need some advice here.

Thank you, and sorry for my bad english.

3 Answers3

0

You want to share an area definition file between all participants - given they all have this file loaded and are in that area, that will handle in scene objects - to see positions, you need to exchange pose between participants using ADF relative pose information - then everybody has the same coordinates - do NOT send device start relative coordinates to others, as every device start is unique.

Mark Mullin
  • 1,340
  • 1
  • 9
  • 21
0

What I'm doing is setting up a phase of game play prior to the actual game beginning where the players walk around their game space and the device records which floorplan areas they can reach. it also keeps track of which samples are floor, walls or irregular.

I have not implemented multiplayer yet but the plan is to allow each player to walk around their game space as described, to create a footprint of where they can get to and then create a multiplayer play area where everybody's game space is mutually compatible. some players would have portions of their game space marked as not usable in order to keep their larger areas compatible with players with smaller areas.

With this approach the only information being shared between players is very generalized and less prone to privacy concerns.

  • 3
    Thank you! We ended up doing this by sharing ADF between the Tangos. Also we wrote [an article](http://goo.gl/5NFKtT) about a small issue with the ADF Importing/Exporting on Unity. We hope is worth checking! Also if someone was wondering about the game, here is [the link](https://goo.gl/au0p2p) to the store, so you can test it – josefalanga Sep 28 '15 at 15:32
  • The link to the article is dead :( – Pierre Baret Sep 08 '17 at 18:29
0

You need to learn more about ADF: https://developers.google.com/tango/apis/unity/unity-codelab-area-learning.

According to the Tango docs, ADF (area description file) could be shared with other users, though there is no API that can do it for you.

I would make users follow these steps in order to be at the same page in Augmented Reality:

  1. User who is starting the game should create ADF and upload it to the cloud.
  2. Users who are connecting to game should load ADF and localize.
  3. After localization users should be able to access their coordinates in the same coordinate space as ADF creator.
  4. User should share his/her coordinates with other users through the Internet.
  5. Any actions that user does or any objects that are created should also be shared.

The only problem is it is now quite clear how to make ADF improved by the all users. Let's say all of them have area learning enabled and they have improved version of ADF, how should they update existing ADF without conflicts? Who is taking priority in updating ADF?

Vadym Myrgorod
  • 456
  • 1
  • 4
  • 11