[Plugin] Photon Cloud

Post your completed addons to share with the community

Post » Fri May 22, 2015 5:02 am

Hi, I still do not fully understand with this plugin. I want to see documentation of how it works. If someone can make it please let me know
B
12
S
2
G
1
Posts: 9
Reputation: 768

Post » Fri May 22, 2015 8:59 am

The plugin is very straight forward to use, just check the example .capx at the beginning of the thread.
B
44
S
11
G
4
Posts: 507
Reputation: 7,348

Post » Fri May 22, 2015 10:04 pm

ThePhotons wrote:
matrixreal wrote:we still wait for the new capx (probably with some fixing bugs)
because the first one on the main page not working
thanks

Can you be more specific, what exactly does not work for you, which errors do you get.


hi,
i just download your plugin and your example .capx
and export to html and upload it but that not work
that why we would like the new .capx that you use for testing on this
http://demoauthphoton.site44.com/c2-dem ... index.html
B
36
S
10
G
3
Posts: 701
Reputation: 4,799

Post » Mon May 25, 2015 11:06 am

@matrixreal
Sorry, we can't help you until you explain what is not working.
Run project from editor and check browser console for errors and other info.
The capx file is the same except that actual app id set before export.
B
5
S
2
Posts: 133
Reputation: 899

Post » Mon May 25, 2015 12:39 pm

I checked the examples and tried the plugin and everything seems to work great. But I'm a bit stuck on one thing. What is the best way to continuously track the positions and rotation adn bullets of 4 players? As i can tell from the The Pool example it only sends events on click... Some more examples or tutorials would be awesome.

So far i tried to send the rotation every 0.2 seconds of one character (ActorNr1) using Photon Set Actor Photon.MyActorNr custom property "Rotation" "player.Angle" wich seems to work fine. As ActorNr2 can see the changes in rotation if i read the property change.

Or are there any better way to sync positions and rotation in realtime without sending to many messages/events?
Follow my progress on Twitter
or in this thread Archer Devlog
B
27
S
11
G
12
Posts: 686
Reputation: 8,624

Post » Tue May 26, 2015 8:18 am

Never mind. I got it working. Works great! Another question though. Is there any good way dealing with lag compensation?
Follow my progress on Twitter
or in this thread Archer Devlog
B
27
S
11
G
12
Posts: 686
Reputation: 8,624

Post » Wed May 27, 2015 5:20 am

WTF it's working on ejecta .... wonderfull i can't believe but need some tricks ;)
anyway thanks
now starting to build a multiplayer game with ejecta ;)
B
36
S
10
G
3
Posts: 701
Reputation: 4,799

Post » Wed May 27, 2015 12:37 pm

tunepunk wrote:Never mind. I got it working. Works great! Another question though. Is there any good way dealing with lag compensation?

Neither plugin nor Photon js SDK have special features for lag compensation (but some other Photon SDKs do have built-in ping measurement and server time updates).
You may try to implement lag measurement by yourself sending event to "All" receivers (such event goes to sender as well) and calculate round trip time in event receive handler. Note that every event goes to the server first and then broadcasted by server to all destinations.
B
5
S
2
Posts: 133
Reputation: 899

Post » Wed May 27, 2015 2:06 pm

ThePhotons wrote:
tunepunk wrote:Never mind. I got it working. Works great! Another question though. Is there any good way dealing with lag compensation?

Neither plugin nor Photon js SDK have special features for lag compensation (but some other Photon SDKs do have built-in ping measurement and server time updates).
You may try to implement lag measurement by yourself sending event to "All" receivers (such event goes to sender as well) and calculate round trip time in event receive handler. Note that every event goes to the server first and then broadcasted by server to all destinations.


Thanks for the reply.

The approach you mentioned. As I understand... If i fire a bullet, It won't actually fire until the server recieved the message and sent it back to me? So i could be experiencing a small delay. On the other hand, the recievers would probably also have a small delay, in best case, around same as mine.

I managed to work around some of the stuff. I'm now sending the XY position of an object in one event every 0.2 second while the object is moving, but managed to get the receiving result smooth by using lerp expression to get rid of the choppy movement. And did some final adjustments to the XY position when the object stopped moving. If it stopped anytime between those 0.2 second intervals, it will now display the correct end position.

I guess sending event data every tick isn't optimal and would generate too many messages being sent i suppose?
Follow my progress on Twitter
or in this thread Archer Devlog
B
27
S
11
G
12
Posts: 686
Reputation: 8,624

Post » Fri May 29, 2015 1:54 pm

tunepunk wrote:The approach you mentioned. As I understand... If i fire a bullet, It won't actually fire until the server recieved the message and sent it back to me?

That may work if lags are approx. the same for all clients. I did not mean exactly this approach, but rather way to calculate lag time which can be used for compensation.

Yes, you should try to send as few as possible position updates and use interpolation. In extreme case like bullets, you need only one message with initial position and velocity which are enough to reproduce same trajectory on all clients.
B
5
S
2
Posts: 133
Reputation: 899

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Lancifer and 3 guests