[Plugin] Photon Cloud

Post your completed addons to share with the community

Post » Tue May 31, 2016 6:18 pm

Anyone sucessuflly using platform objects with photon? I've tried, but all the players except the one the player controls are floating a bit off the ground.
B
53
S
20
G
11
Posts: 434
Reputation: 11,230

Post » Tue May 31, 2016 11:35 pm

ReflextionsDev wrote:Anyone sucessuflly using platform objects with photon? I've tried, but all the players except the one the player controls are floating a bit off the ground.


I don't have any problems with that.
Can you send an example or a screenshot of your system ?
My Project:
OuterLand`
My Tutorial:
Multiplayer with Photon
B
22
S
9
G
9
Posts: 69
Reputation: 6,419

Post » Wed Jun 01, 2016 4:30 pm

Sirvoid wrote:
ReflextionsDev wrote:Anyone sucessuflly using platform objects with photon? I've tried, but all the players except the one the player controls are floating a bit off the ground.


I don't have any problems with that.
Can you send an example or a screenshot of your system ?


Sure, using your vanilla photon tutorial I have the issue. Here is a screenshot from each players perspective. Image
Image
B
53
S
20
G
11
Posts: 434
Reputation: 11,230

Post » Wed Jun 01, 2016 6:25 pm

ReflextionsDev wrote:
Sirvoid wrote:
ReflextionsDev wrote:Anyone sucessuflly using platform objects with photon? I've tried, but all the players except the one the player controls are floating a bit off the ground.


I don't have any problems with that.
Can you send an example or a screenshot of your system ?


Sure, using your vanilla photon tutorial I have the issue. Here is a screenshot from each players perspective. Image
Image


Set up Photon to send an event update when the following events occur:
- Player starts moving
- Player jumps
- Player starts falling
- Player stops, but is not jumping or falling (since a stop will trigger at the top of the jump arc)

Syncing those events should fix the issue.
Last edited by digitalsoapbox on Wed Jun 01, 2016 6:25 pm, edited 1 time in total.
B
51
S
28
G
10
Posts: 381
Reputation: 10,768

Post » Wed Jun 01, 2016 6:25 pm

Hi guys i´m trying to use this plugin but having troubles with it. Could you guys help me? I am makina a multiplayer quiz with Photon. When a player logs in he goes to a main room where he could find other spare players in order to invite. When he invites another player and the other accepts, both are taken to a new room, just for them. This works fine in multiplayer plugin, but when trying to make it in photon (I first leave room and then, when i am in lobby again), the room is created but some seconds later i get an error 1003/ Server closed connection.

Thank you for your help
B
8
S
2
Posts: 10
Reputation: 855

Post » Wed Jun 01, 2016 10:28 pm

digitalsoapbox wrote:Set up Photon to send an event update when the following events occur:
- Player starts moving
- Player jumps
- Player starts falling
- Player stops, but is not jumping or falling (since a stop will trigger at the top of the jump arc)

Syncing those events should fix the issue.


Unfortunately , that didn't seem to work either. I've tried across multiple devices and browsers.

Here is my .capx, taken from the tutorial for simplicity sake.
https://dl.dropboxusercontent.com/u/44188718/Temp/MultiPhotonTutorial.capx

You'll have to put in your own AppID for Photon.
B
53
S
20
G
11
Posts: 434
Reputation: 11,230

Post » Wed Jun 01, 2016 10:42 pm

ReflextionsDev wrote:
digitalsoapbox wrote:Set up Photon to send an event update when the following events occur:
- Player starts moving
- Player jumps
- Player starts falling
- Player stops, but is not jumping or falling (since a stop will trigger at the top of the jump arc)

Syncing those events should fix the issue.


Unfortunately , that didn't seem to work either. I've tried across multiple devices and browsers.

Here is my .capx, taken from the tutorial for simplicity sake.
https://dl.dropboxusercontent.com/u/44188718/Temp/MultiPhotonTutorial.capx

You'll have to put in your own AppID for Photon.


You don't need to send the X/Y position every tick, that's super-inefficient, especially when using the Platformer object. Send when you start/stop pressing keys instead. The example tutorial is the completely wrong way to do it. Let each local machine control all of the player Platformer objects, but set up player input to only directly control the player object assigned to the local machine. When the local player object receives input, send it as Photon events so other players receives each player input event and trigger them on the local machines. Think of it as client-side prediction: the player objects just receive start/stop information and occasionally send and receive position events when specific things happen (start moving, stop moving, jumping, falling, etc.). It's a lot less data to send as well so should be less affected by connection speed.

I'd planned on cleaning this up a bit before distributing it, and I probably will at some point, but if none of what I said above makes sense then check this out. It shows what I'm trying to explain above. https://dl.dropboxusercontent.com/u/14245368/C2/Examples/Photon_Multiplayer.capx
Last edited by digitalsoapbox on Wed Jun 01, 2016 11:03 pm, edited 5 times in total.
B
51
S
28
G
10
Posts: 381
Reputation: 10,768

Post » Wed Jun 01, 2016 10:47 pm

ReflextionsDev wrote:
digitalsoapbox wrote:Set up Photon to send an event update when the following events occur:
- Player starts moving
- Player jumps
- Player starts falling
- Player stops, but is not jumping or falling (since a stop will trigger at the top of the jump arc)

Syncing those events should fix the issue.


Unfortunately , that didn't seem to work either. I've tried across multiple devices and browsers.

Here is my .capx, taken from the tutorial for simplicity sake.
https://dl.dropboxusercontent.com/u/44188718/Temp/MultiPhotonTutorial.capx

You'll have to put in your own AppID for Photon.


Replace the int by a float in the Set x And Set y Event.
I will correct that in the tutorial.
My Project:
OuterLand`
My Tutorial:
Multiplayer with Photon
B
22
S
9
G
9
Posts: 69
Reputation: 6,419

Post » Wed Jun 01, 2016 10:50 pm

digitalsoapbox wrote:
ReflextionsDev wrote:
digitalsoapbox wrote:Set up Photon to send an event update when the following events occur:
- Player starts moving
- Player jumps
- Player starts falling
- Player stops, but is not jumping or falling (since a stop will trigger at the top of the jump arc)

Syncing those events should fix the issue.


Unfortunately , that didn't seem to work either. I've tried across multiple devices and browsers.

Here is my .capx, taken from the tutorial for simplicity sake.
https://dl.dropboxusercontent.com/u/44188718/Temp/MultiPhotonTutorial.capx

You'll have to put in your own AppID for Photon.


You don't need to send the X/Y position every tick, that's super-inefficient, especially when using the Platformer object. Send when you start/stop pressing keys instead. The example tutorial the completely wrong way to do it. Let each local machine control all of the player Platformer objects, but set up player input to only directly control the player object assigned to the local machine. When the local player object receives input, send it as Photon events so other players receives each player input event and trigger them on the local machines. Think of it as client-side prediction: the player objects just receive start/stop information and occasionally send and receive position events when specific things happen (start moving, stop moving, jumping, falling, etc.). It's a lot less data to send as well so should be less affected by connection speed.


yes but this is not the best way when someone like me have a bad connection :p

And I tried to make the thing the more easy possible to understand.
My Project:
OuterLand`
My Tutorial:
Multiplayer with Photon
B
22
S
9
G
9
Posts: 69
Reputation: 6,419

Post » Wed Jun 01, 2016 11:01 pm

Sirvoid wrote:yes but this is not the best way when someone like me have a bad connection :p


It sends less data and you're less likely to miss that data when it's sent. Even if you do, you'll receive a new event soon after which sets the correct position & movement state of other players. Photon also has a limit on how often you can send events, so unless you want to hit the limit quickly sending less data is better.
B
51
S
28
G
10
Posts: 381
Reputation: 10,768

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: justifun and 5 guests