How do I link multiplayer with Firebase?

0 favourites
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • 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!

  • 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:

    Mine:

    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.

  • I could not see that images.

  • I could not see that images.

    Sorry about that, I fixed the images. Should be fine now

  • 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.

  • 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.

    I am not completely sure what do you mean. If you are referring to second action in the 3rd event:

    Set Text to Test_Message.Text

    That was a debug action I already removed where it sets a different text box from the chat box (a debug text box) to confirm that this event actually runs and that the problem is Firebase related not my C2 logic.

    Right now what I have is the same exact as what you see but all the "Test_T" lines with Set text to are all removed (they are only debug ones).

    Problem is, even if the sending should trigger receiving, that doesn't happen. Am I doing something wrong? I even went to the Firebase database and found NOTHING in it. The messages aren't added to the database at all.

  • I have no idea why it does not work, you might provide a very simple test capx to me to debug it.

  • I have no idea why it does not work, you might provide a very simple test capx to me to debug it.

    Sorry to be a bother and thanks a lot for your help. Here is the CAPX:

    https://www.dropbox.com/s/9hsbwo5akhlve ... .capx?dl=0

  • I could log the received message in console log. It is worked. And you can see the message data in dashboard before you close the app web page.

    Here is the minimum capx of simplemessage plugin.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I could log the received message in console log. It is worked. And you can see the message data in dashboard before you close the app web page.

    Here is the minimum capx of simplemessage plugin.

    When you say you saw the message in the console log is that in my CAPX? If so, do you have any idea why it isn't displaying the chat box?

    I tried your CAPX out and it produced an error as there is no API Key in the Firebase V3 for Firebase. So what I did is that I replaced all the information in the Authentication with my own project (API Key, Server Key, Storage Key, etc...) and tried to run the app. It ran, but still whenever I type anything it doesn't show up in the chat box. Would it be a problem with my Firebase?

  • Vallar

    Overwrite properties (API Key, Server Key, Storage Key,...) in rex_firebase_apiv3 by yours.

  • rexrainbow

    That is exactly what I did with your example, I changed everything with my own stuff and it didn't work.

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