Integration with Photon Cloud: Multiplayer

  • Honestly I duno what I am doing with this plugin, but you do find useful things when just playing around.

    Because of that, Idecided to experiment with another layout and such.

    1 layout has tiled movement, the other has 1px movement.

    When switching layouts, it sends the move update, but each player sees their respective layout's update.

    What could solve this is that each layout is a new room, so only those in the same room. To make it a more solid experience it could ask to join "layoutname_CURRENTROOMID" and if that fails, then joins "layoutname_RANDOMROOM".

    So in summary:

    Room Management-

    Actions:

    -Join Room specific (ROOM/CURRENTROOM VARIABLE)

    -Join Room random/not-full (Photon handles the random room thing to search for a non-full room, and if it doesn't exist then creates a new room.)

    -Leave Room

    Conditions:

    <font size="1">-Triggers for On-Join and On-Leave</font> (Never-mind, already implemented)

    -Trigger for when requested room is full (Works for both Join Room Specific and when Join Room random/not-full does not find an existing not-full room)

    Variable:

    -Room

    -Room Player limit (might have to be a seperate config file, but I don't see why C2 couldn't edit/make it at export)

    Player Management-

    Actions:

    -Update Player (Updates position and variables on the player's entity.)

    -Send Update Request (Sends an update that requests the other players in the same room to update. Maybe redundant)

    I know that currently it's set as a test, but due to the problem with 2 layouts (each seeing the current layout's movement rules), probably shouldn't have hardcoded variables into the behavior that could cause issues and let the game handle things like that.

    Photon Management-

    Variable:

    -Current Messages per second (This allows us to see how many messages are being sent and is reference-able if we want to have things trigger based on this number.)

    =====

    With all this, I could create an online "village" made of multiple layouts.

    <font size="1">The movement style would not matter because with UPDATE PLAYER, you could even make it a Zelda2 style platformer as long as the player keeps the others up to date. Since all the action would be happening locally it could cause some issues with unscrupulous player manipulation; however, it would be the simplest way to make many games.</font>

    One player enters a house, layout changes from "village" to "house1"

    Photon has player leave ("village_" & photon.ROOM#) upon loading the new layout and joining ("house1_" & photon.ROOM#). I do not know how liberal the usage of rooms for Photon Cloud is, but this is the simplest solution to prevent players in different layouts from causing cross updates that are very bad.

    If there is a specific room limitation, then of course then you would have to make the game force all players into the new layout (kinda like Borderlands when you change zones)

    With more control in C2, I feel the collision and movement behaviors would be unneeded as well.

  • DarkevilPT

    Sooo, here's the dl.dropboxusercontent.com/u/100382533/GameDev/photoncloudTest.modified.capx. The chat is limited, I haven't tried to fix that yet. :)

  • Thndr

    Thanks for taking the time to put down your very useful suggestions for further development.

    Photon Cloud does offer room-based management, which I haven't currently implemented in my PhotonClient behavior. Once the ExitGames team is in a position to join in, then we can tackle your suggestions.

  • Thndr That is good stuff to add!

    MrOtton Thank you a lot for that Multiplayer Chat via Photon Cloud Plugin by Velojet I'm going to study your code Hope it works!

    (Check it Out!)

    Velojet As always thank you for giving us this plugin and keep updating and looking on ways to help us, really is good stuff.

    Multiplayer side is the best. Hope you can give us more with the help of the ExitGames team.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hopefully you can hear back from those guys soon. If not I suggest screwing around with it some more.

    Also wouldn't it be better as a Plugin instead of a behavior? Maybe you could have both, with the Plugin being the backend stuff and the behavior tracking the data of the objects you want the player to manipulate.

  • Also wouldn't it be better as a Plugin instead of a behavior?t was a plugin before it was a behavior! The first version (PhotonPlayer) that I published in this thread was a plugin. But the further I went ahead with the development, the more obvious it seemed that it should be a behavior that could be attached to a sprite/player, because the essential ability that a sprite/player needs have in a multiplayer game is to communicate with other sprite/players. So as it moves, it transparently broadcasts that move to remote clients, without the C2 developer having to code a 'move' message (which then has to be decoded by the remote client).

  • Well I understand that. Hopefully you can get it worked out so it doesn't seem so limiting.

  • Any updates? :D

  • Any updates? :D

    The ExitGames/Photon team appears to have concluded that there's not enough interest in their JavaScript SDK and in my use of it in a C2 plugin, so are focussing their efforts in more profitable directions.

    Taurian (the OP) also appears to be pursuing other interests.

    No-one here seems to have developed my C2 demo in any direction.

    So (with some reluctance), I'm turning my development efforts to other projects that have been gathering dust on my workbench.

    I'll pass the multiplayer/Photon baton to jayderyu and awarmenhoven, who've got a very promising project underway. Good luck, guys!

  • Kind of a catch 22. There isn't much development, so there can't be much interest.

    How will people interested in something if they can't do much with it? Plus most people looking for the plugin will look in the plugins forum, as this thread about 10 pages long or so before you posted the photon cloud plugin.

    I say release the plugin with open source on the plugin forum with the OP saying you're not longer supporting it and that it provides a base for anyone else to modify it to work better.

    -----

    That said, the Bubble Server seems to be pretty ambitious and I'll track that for now :)

  • Thndr

    I have to agree with Thndr here. back when I first heard about Photon for JS I tried it out. The tool set was very in adequate. Photon Cloud aside, Photon JS couldn't even make full use of Photon at all.

    It was bizaar reading Photon replies to Velotjet on their own forums. "not enough interest so we aren't focusing on js". Sorta a dumbfounding concept. Oh well. Not much can be done about it now. Just time to move on.

    Thanks for the encouragement. I will update as news comes in. Right now we are only tinkering some of the design to java script. We are working on solidifying the inter client/server/node messaging before getting the game features going.

  • ... I say release the plugin with open source on the plugin forum with the OP saying you're not longer supporting it and that it provides a base for anyone else to modify it to work better ...Thndr

    Excellent suggestion! I will carry it out.

  • Does it always work ?

    I want to use it for my next project , and I hope It will be big ,

    I just want to know if your example always work

    Cheers

  • Yus , Got it workeing ...

    Um , another question , To update the game , you just export to html5 and remplace the files on the http server by the exported ones on the html server ?

    Also , is it compatible with the newest versions of C2 ?

  • Yus , Got it workeing ...ood! Pleased to hear!

    To update the game , you just export to html5 and remplace the files on the http server by the exported ones on the html server ?us.

    Also , is it compatible with the newest versions of C2 ?us.

    Let's know if you have any probs.

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