Quantcast
Channel: Photon Server — Photon Engine
Viewing all articles
Browse latest Browse all 1557

Photon server best practice unity implementation

$
0
0
Hello all,

Im using photon server to have a presistent world for an MMORPG, I dont have too much, just starting.
I can connect to the server from a gameobject creating a new thread and calling the peer.Service in an infinite loop.
So this object send an opcustom every time I press a key and send request to move the position of the object in the server and then gets this position in the response and update the position using properties and then setting the transform.position in the client because I cannor access directly to the gameobject from another thread.
Is this the best way to handle it?

Im also storing the x and y in a json file and loading this data if disconnect and connect again. Im going to store it in a db or something else, what do you recommend?

Well, thats working great for one player, now I want to connect with another player but how I need to handle this? I wanted to create / instantiate other players but again, I cant access the main thread.

What do you recommend to handle this scenario?
What is the best way to keep every player updated with the position of the others?

Thanks a bunch!

Viewing all articles
Browse latest Browse all 1557

Trending Articles