Hot answers tagged

2

You call out of libgdx into custom java methods. It would take some work but i'm sure it's possible. Take a look in the Android SDK in the demos folder for demo-realtime and hook up a way to call out of libgdx into the hosting android Activity. I posted some code here that you can use or any way you prefer. It looks like the Intents they are launching are ...


2

You'll need to create your own random number generator object and synchronize it on all clients. Also make sure the order is deterministic even with lag if two clients shoot at roughly the same time the order of RNG polling might be reversed on some clients due to network lag if packets arrive in the wrong order. The other option is to build an identical ...


2

if (PhotonNetwork.isMasterClient) photonView.RPC ("SendMessageRPC", PhotonTargets.All, "Hello there!"); [PunRPC] void SendMessage (string message) { chatBox.AddMessage (message); } The above is basically how to send a message, with you needing to impliment a GUI or UI for a chatBox and a script that has a public void function that is called ...


1

So here I go figuring it out all by myself. It basically will not work because the photon server sdk v3.x does not have support for it. Once photon releases photon server sdk v4 it will work.


1

Yes photon can handle it. Btw a master server(what you meant with running photon in a dedicaded server) is whole differen thing. Master Server is a dedicated server which you run on your own machine and you are all able to edit the photon way you want. From what i understand you are trying to make a server(actually a photon room) which stays 24/7 online, no ...


1

I would try to assume that the reason for this is that the new coordinates of the second player's movement are transferred from the master to the client a little bit later than the player on the client actually collides master's player on his side. The possible solution to the problem depends on many factors and may be different. In my case, I divided the ...


1

I just asked to the Photon's forum, and I got the answer. The point is it's not. Setting autoCleanUpPlayerObjects will not transfer ownership to new master client automatically. To do that, you must create GameObject with PhotonNetwork.InstantiateSceneObject, not PhotonNetwork.Instantiate.


1

I solved this problem by using RPC. Remove whole OnPhotonSerializeView code and add new RPC Function like this: [PunRPC] void UpdateZombieTransform(Vector3 pos, Quaternion rot) { syncPos = pos; syncRot = rot; } And in Update function, paste this code: if(!targetNetworkPlayer.IsLocalPlayer) { transform.position = Vector3.Lerp(transform.position,...


1

The optional Listener::onAvailableRegions() callback only gets called, when you pass RegionSelectionMode::SELECT to the Client constructor. This approach is useful when you have special criteria for which region you want to choose or when you already know your preferred region. If you simply want to connect to the region with the lowest ping of all available ...


1

What I suggest you do is to simulate the change client-side, using the same calculation on server-side, and send request to the server at the same time, using a timestamp to know what value it is. Then, when the server answers, with its own, checked value, compare it to the value you had computed at that timestamp, and if it is incorrect, change it. You ...


1

Make a CmdPullCard command for the host, send the command from the player, check if the card has been already pulled before, if not send the card string to the player. (If you're unsure on how to do this, read up on your Unity Networking). So, something like this: var num = -1; string card = ""; [Command] CmdPullCard(){ While(card!=""){ //check if the ...


1

Alright, since this question seems like it was answered in the comments, let's turn that into an actual answer shall we? Photon Unity 3D Networking (PUN) works by connecting people to each other instead of to a server for gameplay implementation. So, in short, it works with P2P networking. The most popular example I can think of is Call of Duty Modern ...


1

After a lot of searching I found this link: https://developer.ibm.com/answers/questions/323592/watson-sdk-photon-networking-unity-conflict.html As per the above link, I deleted the websocket-sharp.dll and all the errors were gone. I checked my project to see if it was working properly and so far it seems to be working fine. Will update if I find any issue. ...


1

Unity's physics engine, NVIDIA's PhysX, is not deterministic. You're not going to get the same physics simulation twice even on the same machine because the physics engine was just not made to work that way (for good reasons)[1]. The solution? You'll need to update the positions and other physics attributes periodically on the clients from whatever client/...


1

I'm not sure how your code is failing (you only say it doesn't do the right behavior, not what the actual observed behavior is), but I can see what looks like two issues. A better explanation of what is actually happening would help a lot. One, you don't have any code to react to the collision. If the food is not being consumed when the player hovers over ...


1

Use : if (PhotonNetwork.isMasterClient){ generate bounds run RPC } master client is the first player who joined the room .


1

You don't need to continuosly sync the position of your bullets, you only need to know when and where a bullet was fired. This should be fine for most cases: [PunRPC] private void Fire(Vector3 pos, Vector3 dir) { Instantiate(Resources.Load("Bullet"), pos, dir); if(this.photonView.isMine) { this.photonView.RPC("Fire", PhotonTargets....


Only top voted, non community-wiki answers of a minimum length are eligible