Integration with Photon Cloud: Multiplayer

Discuss game development design and post your game ideas

Post » Wed May 08, 2013 2:16 am

@DarkevilPT
Thanks for your compliments!

It's up to the Scirra and Photon teams whether it becomes an official addon.

Good luck with Constructing your game. Please feel free to ask if you need help with using my PhotonClient behavior.

@scidave
Thanks for your excitement and stamp of approval! It means a lot, coming from someone who's put so much time and effort into developing a CC networking plugin.

You're quite right - my aim has been to make a high-level plugin that makes it possible for someone who doesn't want to get their hands dirty with sockets and servers to make a multiplayer game.

@MrOtton
I'm waiting for people to try it out and give me feedback before I develop it further ;)
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sat May 11, 2013 2:12 am

@velojet can you change the runtime.js a bit for me?

I don't need movements in-game.
I need them to appear both in-game (not like in your demo which player 1 can move from the outside of the game to it insides borders, i need it to show him already in some fixed position which I'd like to define on construct).
I don't need to set nicknames in-game (yet (registered members later).).

All I need is to get both connected and some message appears when player 1 is connected Like > Player 1 Connected.
For Player 2 is connected or awaiting for player 2 to establish connection.

When both are connected is up to me to code and instructions.

Can you aid me in this simple script?

Scripting its not my best, since I'm trying to make a game where registered clients get connected after challenging each other they need to enter inside the "arena" with their own created nicknames.

Its based on a game by turns.


[quote="runtime.js"]
jQuery('#join').click(function () {
if (_this.isConnectedToMaster()) {
_this.createRoom(game.name);
_this.joinRoom(game.name);
// Ensure nick has 3 chars max
//
// CDIGO PARA QUANDO ACEITA O DESAFIO E ENTRA NA ARENA! (em vez de ser nome click tnh de refazer)
// if ((game.myPlayer.nick = jQuery('#nick').val()).length > 3) {
// game.myPlayer.nick = game.myPlayer.nick.substring(0, 3);
// }
}
});
[/quote]
How to change this to not have a click event? How get already joined? When opened the link the first two for example.
DarkevilPT2013-05-11 03:55:37
B
5
S
1
Posts: 16
Reputation: 957

Post » Sat May 11, 2013 10:41 am

@DarkevilPT
What action/event, condition or expression do you need to be added to my PhotonClient behavior?

[QUOTE=DarkevilPT]... All I need is to get both connected and some message appears when player 1 is connected Like > Player 1 Connected.
For Player 2 is connected or awaiting for player 2 to establish connection. When both are connected is up to me to code and instructions ...[/QUOTE] Can't you use the existing condition 'New web player has joined' for that?

Give me an example of what additional action, condition or expression you want to put into your C2 game that you can't put at the moment.

I'll be happy to add it for you :)
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sat May 11, 2013 12:16 pm

@Velojet right now.. I just wanna understand why when I put MyPlayer on the construct visual and export it, it doesn't appear at the start of the game and I need to click some keyboard move key to make it appear.
I have it all set Visible. I think it is something in runtime.js.

I guess they are already connected since they reach the server.. I haven't tested it yet. I'm still trying to adapt.

http://darkevilpt.byethost7.com/tugafighterdev/

Update: Ha and why when moving top it stops after a while? (I don't need them moving but I see that happening...).DarkevilPT2013-05-11 12:19:26
B
5
S
1
Posts: 16
Reputation: 957

Post » Sat May 11, 2013 6:11 pm

[QUOTE=Velojet]
@MrOtton
I'm waiting for people to try it out and give me feedback before I develop it further ;)[/QUOTE] Sadly everything I can think of requires a lobby to make sure it plays right, but I'll see what I can do for an adjunct game eventually. Gotta get off my butt for that though :P

Personally I think you should make a thread for the Photon plugin in the Plugins subforum, as people are more likely to see it there and know it exists. A lot of people want to do multiplayer and this plugin should make it accessible to them. Some people would be scared off with the first page talking about potential and having to read through 12-17 pages to find your work.

I know I wouldn't have known about it if you didn't plug it in another thread, and I occasionally browse the plugin forum for anything neat

---
Edit: Tried installing it from your link on page 13, but I get this error:


Using r129Thndr2013-05-11 18:29:38
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Sat May 11, 2013 7:29 pm

[QUOTE=Thndr] [QUOTE=Velojet]
@MrOtton
I'm waiting for people to try it out and give me feedback before I develop it further ;)[/QUOTE] Sadly everything I can think of requires a lobby to make sure it plays right, but I'll see what I can do for an adjunct game eventually. Gotta get off my butt for that though :P

Personally I think you should make a thread for the Photon plugin in the Plugins subforum, as people are more likely to see it there and know it exists. A lot of people want to do multiplayer and this plugin should make it accessible to them. Some people would be scared off with the first page talking about potential and having to read through 12-17 pages to find your work.

I know I wouldn't have known about it if you didn't plug it in another thread, and I occasionally browse the plugin forum for anything neat

---
Edit: Tried installing it from your link on page 13, but I get this error:


Using r129[/QUOTE]
@Thndr Did you un-checked the minify script option before exporting? Or it happens on loadout? It works for me on r128.2
http://i.imgur.com/9yhGIt1.pngDarkevilPT2013-05-11 19:33:09
B
5
S
1
Posts: 16
Reputation: 957

Post » Sat May 11, 2013 9:06 pm

[QUOTE=DarkevilPT]
@Thndr Did you un-checked the minify script option before exporting? Or it happens on loadout? It works for me on r128.2
http://i.imgur.com/9yhGIt1.png[/QUOTE]
That's an error from starting up C2 after installing it.
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Sat May 11, 2013 11:19 pm

@Thndr Well that's wierd.. are you sure the files here are ok?
C:\Stuff\Programas\Construct 2\exporters\html5\behaviors\photonclient

Maybe it is not compatible with Windows 64 bits.
Can't help you :X
B
5
S
1
Posts: 16
Reputation: 957

Post » Sun May 12, 2013 12:53 am

[QUOTE=Thndr]Personally I think you should make a thread for the Photon plugin in the Plugins subforum, as people are more likely to see it there and know it exists. A lot of people want to do multiplayer and this plugin should make it accessible to them. Some people would be scared off with the first page talking about potential and having to read through 12-17 pages to find your work ...[/QUOTE]Yes, I am planning to make a separate thread. As I mentioned, I'm awaiting feedback from people who try it out, so I can first weed out any glitches. Particularly, I'd like reports from Taurian, who started this thread, and bertelmonster2k from Photon/ExitGames.
[QUOTE=Thndr]... Tried installing it from your link on page 13, but I get this error: ...[/QUOTE]@Thndr
PhotonClient is a behavior, so it needs to be installed in the behaviors folder.

[QUOTE=DarkevilPT]I just wanna understand why when I put MyPlayer on the construct visual and export it, it doesn't appear at the start of the game and I need to click some keyboard move key to make it appear. ...
Update: Ha and why when moving top it stops after a while? (I don't need them moving but I see that happening...).[/QUOTE]@DarkevilPT
Check your server installation. It's giving 404 errors for:
darkevilpt.byethost7.com/tugafighterdev/photon/Photon-Javascript_SDK.js
darkevilpt.byethost7.com/tugafighterdev/css/photon_client-inputs.css
darkevilpt.byethost7.com/tugafighterdev/cloud-app-info.js
darkevilpt.byethost7.com/tugafighterdev/inputs_header.txtVelojet2013-05-12 00:54:56
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sun May 12, 2013 2:42 am

[QUOTE=Velojet][QUOTE=DarkevilPT]I just wanna understand why when I put MyPlayer on the construct visual and export it, it doesn't appear at the start of the game and I need to click some keyboard move key to make it appear. ...
Update: Ha and why when moving top it stops after a while? (I don't need them moving but I see that happening...).[/QUOTE]@DarkevilPT
Check your server installation. It's giving 404 errors for:
darkevilpt.byethost7.com/tugafighterdev/photon/Photon-Javascript_SDK.js
darkevilpt.byethost7.com/tugafighterdev/css/photon_client-inputs.css
darkevilpt.byethost7.com/tugafighterdev/cloud-app-info.js
darkevilpt.byethost7.com/tugafighterdev/inputs_header.txt[/QUOTE]

Ok about that @Velojet the construct 2 and your plugin don't create those files so I need to move them from your own demo to my exported game is that it?

Edit: Yeah I uploaded those files but haven't edit them yet its 3am here... I'll be checking this tomorrow.

Update: @Velojet Check http://darkevilpt.byethost7.com/tugafighterdev/
Its exactly has your plugin demands it.. But I need your help somehow..
I don't understand scripting and I wanted to know if you can change it to when I join that page it get connected to Player 1 without having to (Isset Join)
Otherwise i'll need to make major changes to this.
To keep it simple: When Joined Link Checked if Player 1 is Already Taken if not it joins, else checks if Player 2 (WebPlayer) is taken if not it joins otherwise the game party is full he can't join.
DarkevilPT2013-05-12 03:25:05
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 2 guests