Integration with Photon Cloud: Multiplayer

Discuss game development design and post your game ideas

Post » Sun May 12, 2013 5:57 am

@DarkevilPT
It's best if you can tell me what actions(events), conditions and expressions are missing from my PhotonClient behavior that you need to use in editing your event sheet, in order to get your game to work the way you want.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sun May 12, 2013 3:06 pm

Hmmm, are you going to add the ability to make your own "join" and "disconnect" buttons? I suppose that you're still waiting for the exitgames team to join the development? :)
B
3
G
1
Posts: 6
Reputation: 462

Post » Sun May 12, 2013 10:04 pm

@MrOtton
Good questions! I'm following the ExitGames Photon Cloud JS SDK examples, where the 'Join' and 'Leave' buttons are embedded in the index.html web page (my PhotonClient runtime modifies the C2 index.html to enable this). The effect is to remove from the C2 edittime the ability to modify those buttons.

And you're right - I am still waiting for the ExitGames team to join in, so we can tackle such issues.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sun May 12, 2013 10:09 pm

[QUOTE=Velojet] @DarkevilPT
It's best if you can tell me what actions(events), conditions and expressions are missing from my PhotonClient behavior that you need to use in editing your event sheet, in order to get your game to work the way you want.[/QUOTE]

@Velojet
I would tell you.. but I guess I don't know how to explain in the way your want.
For example lets call this the conditions:
- Set a Multiplayer Players Limit on Construct 2.
- Define the max chars for the nickname on Construct with special chars like "-@kev!-".
- Let us be the ones creating the "Join" - "Disconnect" Buttons on Construct 2 side.

A chat for a MP example? Is it possible to players chat between them?
While connected I want to send a message to the other player which appear for them both on screen?
This would help to know if they are both well connected and answering besides their movements.

Well this is all I can remember for the moment.. Idk if this helps..
I'm changing the game a bit.DarkevilPT2013-05-12 22:20:29
B
5
S
1
Posts: 16
Reputation: 957

Post » Sun May 12, 2013 10:45 pm

@Velojet Thanks for answering my questions! :) This is an awesome Plugin and I'm looking forward to further development :)

@DarkevilPT I actually added a chat to Velojet's example file (including connect/disconnect messages) I can provide the capx if you want to :)
B
3
G
1
Posts: 6
Reputation: 462

Post » Mon May 13, 2013 1:41 am

[QUOTE=MrOtton] @Velojet Thanks for answering my questions! :) This is an awesome Plugin and I'm looking forward to further development :)

@DarkevilPT I actually added a chat to Velojet's example file (including connect/disconnect messages) I can provide the capx if you want to :)[/QUOTE]
@MrOtton Yeah I'd Love it! Please! I'm Learning a lot with Scirra. I guess others would love this too plz share.DarkevilPT2013-05-13 01:42:10
B
5
S
1
Posts: 16
Reputation: 957

Post » Mon May 13, 2013 8:40 am

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:
-Triggers for On-Join and On-Leave (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.
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.

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.Thndr2013-05-13 08:45:43
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Mon May 13, 2013 5:00 pm

@DarkevilPT

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

B
3
G
1
Posts: 6
Reputation: 462

Post » Mon May 13, 2013 8:34 pm

@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.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Tue May 14, 2013 2:27 am

@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.DarkevilPT2013-05-14 02:42:07
B
5
S
1
Posts: 16
Reputation: 957

PreviousNext

Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 1 guest