AR passing same object through different cameras - unity3d

I've set up a network lobby allowing both users to join the same room (multiplayer). I am using Vuforia with the networking Identity to allow objects to appear from a card. However, once both users enter the same room only one can view the object from the card. Both users are not able to see each other's object which is a problem as well.
I am wondering is it possible to see both objects and if yes can someone guide me or help me out, please.
Thank you

Related

Flutter webrtc for simulcast

I am trying to create an application like Unacademey.It is a learning-platform for the preparation of really tough exams which are conducted in India. like IIT or NEET.So I need to create a UI where the teacher will broadcast himself and Students can see the lecture. also if the student has any confusion then he can ask on the same screen.
So basically, as far as I researched I want to share my screen, so that teacher can show the questions. and also he is able to draw the solution and explanation. And also share his video and audio. and also on the same screen, a Q&A will be there for any type of communication. 
I have created an end to end peer connection.
One user can transmit audio and video to another user.
But this is not my requirement. I want to broadcast my live screen and also record them.
and I didn't find any solution over the internet. and also, the Full document is also not provided in the pub.dev.
Please help me if you can.
I also looked at the concept of WebSockets.
But I am still stuck.
If I ask my question in one line then."HOW CAN I GO ONLINE WITH WEBRTC"
Please reply. I am eagerly waiting for your reply.
Thank you.

Create anonymous highscorelistor in unity

I have simple game on Google Play and Apple App Store that I have created in Unity. Now I am thinking about creating a global high score, so if you are in top 10 for example you can enter a made up user name.
The thing is I do not want the users to sign in since I want the game to be easy to access. One user can also enter a new username each time a record is beaten. So you can for example have the first three positions.
In principle, the app should read the high score from database and one should be able to write to it with {userID, new_score}, but no data is connected to any particular user. I am used to work with Firebase, what would be the easiest way to achieve this?
Thanks,
Erik
Well, the fact that you don't have data connected to any particular user do not means that you can't store the highscores. Cause one user can beat himself.
So if your database (I don't know if it's realtime or firestore) knows which are the top scores, when a user (indpendently of his ID) beats the score threshold, you can give him the option to put a name on that highscore, and update your database with this new score.
I will also recommend to bind users with data, his highscore or the name it's using to register the highscore, but you can achieve the same result without it.
You could try having a read and create only set of records, where write requires a valid anonymous auth key. I haven't tried that setup with Anonymous only auth before though.
Otherwise you could also try setting up a cloud function to validate and write the high score records.

Creating 2vs2 room with friends in Unity with PUN

I would like to create a game mode 2vs2 with our friends. I have no idea where to start off. How can we send them notification regarding some of our friends is looking for party. I think this is probably we would have to take care of through push notification from our server and then once other player joins the room how can we create room properties so that both of us remain in the same team. Do we need to create a private room in that case or what ?
When working with PUN and Photon Cloud, you need to connect to a master server first (PhotonNetwork.ConnectUsingSettings). Then create a room or join existing. PhotonNetwork.JoinOrCreateRoom should work in your case. Players should share same room name before creation or joining a room. Notify them outside Photon by any means you like.
Inside a room, player custom properties can be used to mark which team player belongs to. Assets\Photon Unity Networking\UtilityScripts\PunTeams.cs script goes with PUN package. Use it as is or as a template for your own teams implementation.
Don't forget set max player = 4 when creating a room to prevent extra players getting into room if more than 4 player know its name or via room matchmaking.
Follow doc.photonengine.com for more info, documentations and tutorials.

Track online users in real time in order to play a two-player quiz

I am willing to create a two-player quiz game, in real time. For this I need to track when users are on my quiz's page and when they leave it. Basically, I need some kind of lobby, where players gather and from where my script picks two random players who should face each other in the game.
As many players would switch from online to offline in a very short time, I prefer not to use the classic 'update player status to database and then retrieve at a given interval the list of online players'. Currently, I am toying with the idea of using Comet Push, and have studied a little bit PubNub.
The actual quiz game I believe it is pretty easy to solve: use of classic Comet publish() to send answers and subscribe() to check the other user's status. But the thing that bothers me is how do I get that specific list with online users?
I tried to publish() a user_id when a user goes to the lobby, but how do I notify all the other users when this user goes offline? How do I display in the lobby the total number of connected users together with their names?
It's the first time I face Comet and its logic isn't entirely clear to me.
Thank you for your help!
You might want to try out Pusher and our (I work for Pusher) presence functionality. The presence channels let you easily implement room/lobby-style functionality and should meet your criteria.
You get an initial list of users subscribed to the channel when you subscribed
You are informed whenever a user subscribes (enters) and unsubscribes (leaves) the channel (room/lobby)
This way you don't need to implement this functionality yourself. It's part of the solution Pusher provides.

XMPP multiplayer gaming: should I store opponents as roster contacts?

I've read all 484 pages of Professional XMPP and read countless forum threads regarding rosters + XMPP and this question is still something I am struggling to solve. I'm looking for insight on best practices, so I at least know which direction to go in.
I'm building a cross-platform (web, iOS & Xbox), turn-based board game. Every player can have up to 100 different matches active at any given moment -- so they could easily skip from one game where it's not there turn to one where it is.
The game will feature a lobby where your list of active games are displayed, along with the name and online status of each opponent for that game (you may have up to 3 opponents, 4 total players per game).
Additionally, each player will have a friends list accessible from a different area which also lists online status.
I am using XMPP behind the scenes, completely transparent to the players, no one will ever sign in with a Jabber client or anything of the sort. I have complete control over how the information is displayed and utilized.
The main aspects I am using XMPP to solve are: notifications when an opponent has made a move, seeing my friends online statuses, and seeing my opponents online statuses, and in-game text chat.
So here's where I start having trouble: obviously your friends list will be contacts in your roster, so you can see their online status. But what about opponents? These are usually random opponents you will only play a single match with and never again -- yet your game with them may last up to 2 weeks.
Keeping in mind that everything is behind the scenes (ex: automatic subscription confirmations, etc) -- would the best course of action be to add each opponent to another group in your roster while the game is in progress and then remove them after the game is complete? That way you get presence notifications when that player is online? Or is this a case where PubSub could be utilized?
I've also considered using multi-user chat so I'd always have access to every users online status without subscriptions, but that seems far from efficient when there could be up to 20k players online at any given moment. Definitely sounds like a battery hog on mobile devices as well.
My other solution is to used share roster lists. Create a roster list for each game and assign that list to each player. Then delete the shared roster list once the game is complete.
I would choose Pubsub here. Of course, this means that you have to do some server side work too.
Send a directed presence to the opponents. This will allow them to see your presence.
I would consider using a multi-user chat for each game, and your own extension to the MUC protocol to handle game-state messages (opponent has made a move). The user can have a roster of their friends at the "global" level, but can still communicate with their opponents (and receive presence) using the MUC level (unless they decide to then add them as a friend).
See also: Advantages of Pubsub versus MUC
I agree that using MUCS (instant) would be better in this scenario. If you need to cleanup pubsub nodes of unwanted subscribers, it will definitely be a pain in the ass.