Multiplayer chat

Discussion and feedback on Construct 2

Post » Wed Jun 17, 2015 3:35 am

I'm trying to build a chat system for one on my games, and I got it all figured out except the part with connecting to another host once current host leave.
You see, if you are in the chat room typing your fingers out, and current host leave, you are left in a dead room with no way to send your message to others... Even if you navigate away from the room and come back, you can't send any more messages to anyone; unless you restart the game and reconnect to server.

So the question: is there a way to reassign a new host, perhaps send a message to the signaling server and switch tp one of the players in the room? Isn't that something the server suppose to do automatically?
B
36
S
9
Posts: 63
Reputation: 2,225

Post » Wed Jun 17, 2015 4:53 pm

I would build chat app with firebase service. Here is a demo.
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Thu Jun 18, 2015 6:05 am

Is firebase just another hosting provider? I already have a server...
I am working on a Ajax, php, MySQL integration for the chat that I was going to communicate with the multiplayer plugin, since I don't want Ajax to send server request every few seconds; only at start of layout ( for chat history) and when user wright something.

I currently have several layouts in the game exchanging data with MySQL so I need to host the chat database on my server since I'll be requesting data from different tables.
B
36
S
9
Posts: 63
Reputation: 2,225

Post » Thu Jun 18, 2015 8:35 am

Firebase is a cloud data service. And it could broadcast data to all listeners (clients).

Ajax, php, MySQL only could polled requests from clients, server does not have ability to send notification to any clients, this is not the same with firebase, imo.
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777


Return to Construct 2 General

Who is online

Users browsing this forum: AnimH01, Refeuh and 8 guests