Is it possible to use Firebase to set up Multiplayer

Get help using Construct 2

Post » Tue Aug 02, 2016 1:59 pm

Hello, everyone :3

Is it possible to use Firebase to set up a multiplayer system? I'm making a multiplayer game and had some problems with the Multiplayer object and got no answers in here :/

Anyway, I'm using it to make the account system and it's working properly, but I'm asking myself what is possible to do with Firebase? What are its limits? If anyone with experience with it could answer me, I'd be very grateful ^^
Riding the Rainbow for all the eternity
B
10
S
5
Posts: 31
Reputation: 934

Post » Tue Aug 02, 2016 4:30 pm

Rex has few plugs to set that up.
It probably won't be as fast as multiplayer.
Image ImageImage
B
172
S
50
G
184
Posts: 8,444
Reputation: 116,107

Post » Tue Aug 02, 2016 5:19 pm

newt wrote:Rex has few plugs to set that up.
It probably won't be as fast as multiplayer.


I'm using his plugin :3 I'm having issues with the multiplayer and I don't know why. I tried a lot of things, but it keeps giving me the same issues: the sprite of the peer is created and destroyed infinitely, and the peer can't control the sprite, only watch the host move. I deleted all the multiplayer structure and am starting over. Besides it corrected some, it already presented some of the older bugs.
Riding the Rainbow for all the eternity
B
10
S
5
Posts: 31
Reputation: 934

Post » Tue Aug 02, 2016 5:51 pm

Are you following the tutorial or are you trying to make your own system?

Have you completed the tutorial and understood each part? It is pretty critical that you understand the concepts in the multiplayer tutorials before building your own system - you won't get very far otherwise.

I mention this because generally speaking, it is not the multiplayer plugin that is buggy, and if you don't understand the concepts Firebase won't help you either... you'll find even less support here, and run into similar issues. Just trying to save you from some headache ahead of time.

From your general description, it sounds like you're possibly not associating peerID's correctly.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Aug 03, 2016 1:41 pm

oosyrag wrote:Are you following the tutorial or are you trying to make your own system?

Have you completed the tutorial and understood each part? It is pretty critical that you understand the concepts in the multiplayer tutorials before building your own system - you won't get very far otherwise.

I mention this because generally speaking, it is not the multiplayer plugin that is buggy, and if you don't understand the concepts Firebase won't help you either... you'll find even less support here, and run into similar issues. Just trying to save you from some headache ahead of time.

From your general description, it sounds like you're possibly not associating peerID's correctly.


Yep. I read all the 4 tutorials and learned a lot from them. On my first try I "copied" it event by event, changing the necessary to my project. I'll put the images in the end of the post. I agree that it's not the plugin, I'm quite sure that's something that I'm doing wrong, but just know that's not the plugin doesn't help me at all :/

On this Event Sheet the problems are: the Sprite isn't created at random position, just on the same corner of the screen; It's behaviors are not activated and the other things on the container of the Sprite are not created; as the peer, the sprite keeps being created and destroyed, which makes it looks like it's flashing.

1 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing
2 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing
3 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing
4 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing
5 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing

I couldn't solve this problems so I decided to make a try by myself. I deleted all the multiplayer structure and tried to make it again, but only seeing the general structure of the thing, not copying it all. Now the Sprite is created at random and the other objects of the container are created as well; all the behaviors works properly; the only issue is that that only aplies to the host. The Sprite that the peer can see keeps "flashing" and it's not an actual controlable thing, it's just an image of what the host is doing with his Sprite, so the peer can't shoot or control it - just it's angle, but since the angle controls to where the Sprite goes and it's not afecting the movement as the peer, it's doing nothing. Here's mine structure:

1 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing
2 - https://drive.google.com/file/d/0BzI4Lq ... sp=sharing

But before we proceed, please answer me something that isn't that clear to me: if I want to put the game on a dedicated or semi-dedicated server, I'll have to set my own signalling server, right? I know that Scirra made a signalling system and it's for sale if I want to buy it, but it's something that I must know since it'll cost something.

Anyway, I appreciate that you guys are trying to help me. This is something that I really like on the comunity.
Riding the Rainbow for all the eternity
B
10
S
5
Posts: 31
Reputation: 934

Post » Wed Aug 03, 2016 7:22 pm

Before I dive into your screenshots, can you post a capx? A regular problem is hard enough to diagnose by screenshots, multiplayer is even harder.

A signalling server and a host are two completely different things. You normally would not need your own signalling server, as long as you think Scirra will exist/provide this service.

A dedicated host is generally what people think of when they think "server". You will need your own server and can be as simple as run your game 24/7 in a browser tab on that server to be a dedicated host.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Aug 03, 2016 8:33 pm

oosyrag wrote:Before I dive into your screenshots, can you post a capx? A regular problem is hard enough to diagnose by screenshots, multiplayer is even harder.

A signalling server and a host are two completely different things. You normally would not need your own signalling server, as long as you think Scirra will exist/provide this service.

A dedicated host is generally what people think of when they think "server". You will need your own server and can be as simple as run your game 24/7 in a browser tab on that server to be a dedicated host.


Here it is. I don't have the .capx of the first try, since I deleted it to redo from zero.

Thanku :3
Riding the Rainbow for all the eternity
B
10
S
5
Posts: 31
Reputation: 934

Post » Mon Aug 08, 2016 3:09 am

Didn't mean to leave you hanging. Baby decided he wanted to pop out two weeks early :o

Have you made any progress? Also I couldn't open your capx right away, due to plugins that needed installing.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Mon Aug 08, 2016 11:25 am

oosyrag wrote:Didn't mean to leave you hanging. Baby decided he wanted to pop out two weeks early :o

Have you made any progress? Also I couldn't open your capx right away, due to plugins that needed installing.


No problem ^^ Congrats! Hope you enjoyed your sleep nights LOL

I decided to give a time to this project to get some more experience, so I can do this correctly. I've a lot of ideias that I want to take out of paper. Thank you for your effort to help me :3
Riding the Rainbow for all the eternity
B
10
S
5
Posts: 31
Reputation: 934


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests