[Plugin] Photon Cloud

  • 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.

  • 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 ?

  • > 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.

  • >

    > > 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.

    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.

  • 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

  • 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.

  • >

    > 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

  • >

    > 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.

  • >

    > >

    > > 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.

  • 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.

  • >

    > 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.

    I don't want to modify the tutorial to keep it easy to understand but I add a commentary in the capx to warn than it send a lot of data

  • 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

    Thanks for the help! I had tried sending it less frequently and lerping to compensate, but still had the floating issue and this is a lot better.

    Out of curiosity, is there any specific reason you set the max players at 4? I'm guessing to not overfill the array, but you could expand that. Or does C2 send the full array if values are not used, and bandwidth is wasted?

    Another topic, the next logical step for multiplayer games is to have a server database / user accounts. As far as I can tell this isn't do-able with photon. Theoretically you could do this with sql databases, but I'm not sure how secure that would be? What do you all think is the best option for this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the help! I had tried sending it less frequently and lerping to compensate, but still had the floating issue and this is a lot better.

    Out of curiosity, is there any specific reason you set the max players at 4? I'm guessing to not overfill the array, but you could expand that. Or does C2 send the full array if values are not used, and bandwidth is wasted?

    Another topic, the next logical step for multiplayer games is to have a server database / user accounts. As far as I can tell this isn't do-able with photon. Theoretically you could do this with sql databases, but I'm not sure how secure that would be? What do you all think is the best option for this?

    The array doesn't really play into the player count, I just set it at 4 because I was testing Photon for a game with a maximum # of 4 players. You should be able to increase it to any arbitrary number without having to make any other changes to support more players. With how it works now, if Photon finds room but they're all maxed out at 4 players, it creates a new room. If you increase the player count per room, it'll allow more players to join any available rooms before creating a new one.

    As for DB/user accounts, I'll just be using Steam, which solves that issue. Otherwise you'll also need to do some server-side scripting to interface with the DB/custom user accounts.

  • The array doesn't really play into the player count, I just set it at 4 because I was testing Photon for a game with a maximum # of 4 players. You should be able to increase it to any arbitrary number without having to make any other changes to support more players. With how it works now, if Photon finds room but they're all maxed out at 4 players, it creates a new room. If you increase the player count per room, it'll allow more players to join any available rooms before creating a new one.

    As for DB/user accounts, I'll just be using Steam, which solves that issue. Otherwise you'll also need to do some server-side scripting to interface with the DB/custom user accounts.

    Steam would work for usernames, though I haven't really see a game use it to keep track of in game data, (levels, items, etc). If we still had clay.io that would likely work, but as far as I know we don't really have a replacement for that. The problem with steam for me is if I want cross platform games, I can't use a steam DB on iphone.

  • 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

    This is due to a bug in leaving room logic in Photon js SDK. Fixed. Please download updated Scirra SDK version 4.0.0.1.

    Thanks for report.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)