How do I link multiplayer with Firebase?

Get help using Construct 2

Post » Sat Jul 23, 2016 7:25 pm

Well nothing you are saying is really impossible.

As I mentioned earlier, the most important step is to define for yourself what information each player will need from the server, what they need to provide to the server and when. If you can make a clear plan, then get working! As Jomo said, Firebase is more suitable for Client-Server, but if that is too hard to work with then it is definitely possible with the multiplayer plugin. When you get started and work through putting it together, you will run into more specific problems that people will be able to help you with rather than just trying to imagine the whole thing in your head at the moment.

Basically - try it and learn!
Mistakes were made.
B
52
S
26
G
111
Posts: 1,623
Reputation: 62,667

Post » Mon Jul 25, 2016 8:51 am

Thanks for the motivation boost :). I just sometimes find it hard to start. I did try the local storage idea, but it seems local storage is controlled by the browser and limited to 5MB and in some cases to 50MB which I believe won't be enough for this type of game. Unless I am mistaken. I'll try further and see what can come up with though.

@rexrainbow is there any chance of a guide or a tutorial that exists somewhere on how you did that CAPX with Firebase? The persistent world demo?

EDIT: I am thinking a real time MUD might be a bit complicated, perhaps something like Kingdom of Loathing is easier to make using Firebase and Construct 2?
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Mon Jul 25, 2016 9:09 am

@Vallar

I do not have time to write completed tutorial for that capx of persistent world demo, because that I am busy to make new plugins or maintain them, sorry.
You might try to contact to @jomo who is a C2 teacher and had wrote some tutorials before.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Mon Jul 25, 2016 10:08 am

You can try to make a prototype to lower down risk with limiting your goal to about 50 people simultaneously online. Then think about how to scale it up in later versions.

I found some points to address in the last discussions:
1. C2 MP uses webrtc, which might be blocked by some firewall.
2. You will need more knowledge about how to make a network game before you going from arcade/console games to network game.
Here is one book of my favorite (written in Japanese, Chinese version is also available)
http://www.amazon.co.jp/%E4%B8%AD%E5%B6 ... B0050QL3S2
3. Anyways, a 50 to 100 player would be a good starting point.
Providence University, lecturer.

Tatung University, lecturer.



Consultant per question: USD$15 / time

Consultant by month: USD$300 / month

Customized project: USD$2500 / capx
B
78
S
17
G
4
Posts: 197
Reputation: 7,738

Post » Mon Jul 25, 2016 4:46 pm

jomo wrote:You can try to make a prototype to lower down risk with limiting your goal to about 50 people simultaneously online. Then think about how to scale it up in later versions.

I found some points to address in the last discussions:
1. C2 MP uses webrtc, which might be blocked by some firewall.
2. You will need more knowledge about how to make a network game before you going from arcade/console games to network game.
Here is one book of my favorite (written in Japanese, Chinese version is also available)
http://www.amazon.co.jp/%E4%B8%AD%E5%B6 ... B0050QL3S2
3. Anyways, a 50 to 100 player would be a good starting point.


Thanks for your reply. That is the target actually, start with a MVP to see how far I can go then think about scaling it.

I have read my way through the C2 MP tutorials and I understand the basics, and duplicated the Chat example too. As for the book recommendation, unfortunately that page is completely in Japanese and I couldn't understand anything (I am guessing the book isn't available in English). I don't read either languages would there be any book in English that you can recommend? Perhaps even tutorials or something that can assist with using Construct 2 even?

Thank you very much in advance.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Tue Jul 26, 2016 2:20 am

To build a network game on some new platform, the 1at thing is to make a chatroom and now you've made it. And next you can try to build a 2-player version (one uses wasd, the other uses arrow keys) with several sub systems implemented. Then you'll think about how to organize a room/world, ramp up Max players numbers gradually.

Every network game has different bottlenecks and you'll never know what they are before you implement part of it. Moreover, those problems are usually resource dependent which means money can solve your problems ,usually. For example, Counter Strike has 20 for its max players, while a text turn-based mud allows more than 200. If the designer pays for a better server, those numbers could be change.

No matter you choosed MP or firebase, you'll need a always-on Host/Server build by C2. By far this architecture is in unknown water, I never heard anyone who had run this kind of system for some time. If you have any info or news, we'll certainly be happy to hear that.

I don't have other book or article to recommend currently, I'll be aware of this topic and share some info if I find something.

Start your prototype today! :)
Providence University, lecturer.

Tatung University, lecturer.



Consultant per question: USD$15 / time

Consultant by month: USD$300 / month

Customized project: USD$2500 / capx
B
78
S
17
G
4
Posts: 197
Reputation: 7,738

Post » Tue Jul 26, 2016 7:07 pm

jomo wrote:To build a network game on some new platform, the 1at thing is to make a chatroom and now you've made it. And next you can try to build a 2-player version (one uses wasd, the other uses arrow keys) with several sub systems implemented. Then you'll think about how to organize a room/world, ramp up Max players numbers gradually.

Every network game has different bottlenecks and you'll never know what they are before you implement part of it. Moreover, those problems are usually resource dependent which means money can solve your problems ,usually. For example, Counter Strike has 20 for its max players, while a text turn-based mud allows more than 200. If the designer pays for a better server, those numbers could be change.

No matter you choosed MP or firebase, you'll need a always-on Host/Server build by C2. By far this architecture is in unknown water, I never heard anyone who had run this kind of system for some time. If you have any info or news, we'll certainly be happy to hear that.

I don't have other book or article to recommend currently, I'll be aware of this topic and share some info if I find something.

Start your prototype today! :)


Thanks a lot for the advice and the encouragement. You are right on all accounts. At the moment I am trying to recreate the chat app using Firebase. While I understand little of it, I tried on my own and wasn't able to reach much. But looking at BigMap V3 example I was duplicated the exact same actions (using my own settings) but I am unable to get messages to display.

Here are the two actions:

Rex's actions:
Image

Mine:
Image




Currently, I am able to list all users without a problem. Change a user's display name on the Firebase database and pull it to display it (aside from the normal register and login).

I thought at first it might be something with Construct 2 so I tested my actions offline and they work normally (not using Firebase to send and receive messages). Any idea what I am doing wrong?

NOTE: I am posting here as I think if I post another thread it will be spammy and since we are on the same topic I thought it is better to use this thread.
Last edited by Vallar on Wed Jul 27, 2016 7:31 am, edited 1 time in total.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Tue Jul 26, 2016 11:02 pm

I could not see that images.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Wed Jul 27, 2016 7:31 am

rexrainbow wrote:I could not see that images.


Sorry about that, I fixed the images. Should be fine now
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Wed Jul 27, 2016 8:38 am

Action in event 3 is sending message only, it will trigger event 4 to display received message.
Designer does not need to display message in event 3, because event 4 in sender will also be triggered. It is different from official MP, which the sender will not receive his message.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Resslx and 33 guests