[PLUGIN] Chat (with SocketIO)

Post your completed addons to share with the community

Post » Tue Dec 27, 2011 3:13 pm

[QUOTE=mars1985] Do you know of any other capx examples of multi connection?[/QUOTE]

No, sorry. There are only 2 plugins for network now, the other is zack's socket-io.rexrainbow2011-12-27 15:15:52
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Tue Dec 27, 2011 5:08 pm

I have been playing around with your plugin and I was able to make the spirit jump for both connected users by simply adding simulate jump on data received. Kind of cool.

Here is a my .capx example of a platform sprite jumping. Every time "return" is clicked the sprite jumps in real time.

http://dl.dropbox.com/u/23433797/ChatJumper.capx

I am basically trying to eventually replicate something similar that was done in ImpactJS using ImpactConnect that uses socket.io and node.js.

Multiplayer Example Video:
http://www.youtube.com/watch?v=zEppdr0EX7s

Github: https://github.com/cdreier/impactConnect

I like construct2 much better than ImpactJS.
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

Post » Tue Dec 27, 2011 11:51 pm

Using Chat plugin in real-time application might be dangerous, this plugin does nothing for synchronize with time.rexrainbow2011-12-28 03:10:53
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Fri Dec 30, 2011 7:46 am

Update:

Room moderator is the client who enter the chat room earliest in the chat room.
Room moderator can set the maximum member count of the chat room. 0 is infinity.
"Condition:Am I room moderator?" can let current client know if it is the room moderator.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sat Dec 31, 2011 4:03 pm

A nice feature you may already be working on would be to assign a user name. You could do this on page load or before entering or even the first thing typed.

Here are some cool examples:
http://liveballs.nodejitsu.com/
https://github.com/LearnBoost/socket.io/blob/master/examples/chat/app.js
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

Post » Sat Dec 31, 2011 4:21 pm

[QUOTE=rexrainbow] Update:

Room moderator is the client who enter the chat room earliest in the chat room.
Room moderator can set the maximum member count of the chat room. 0 is infinity.
"Condition:Am I room moderator?" can let current client know if it is the room moderator.[/QUOTE]

Is there an updated .capx example for these new features?
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

Post » Sun Jan 01, 2012 3:55 am

@mars1985

You need to set a user name in "action:Connect", See the snapshot, in the first red square. The user name is "Guest".
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sun Jan 01, 2012 2:19 pm

Thanks for the info and the screenshot!
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

Post » Mon Jan 02, 2012 1:51 am

@mars1985

For "Condition:Am I room moderator?", you can use it to send a "start" message (or other control message), since there is only one "room moderator" in the clients.

"Action: Set max member count" can be put in any client, but only the "room moderator" can really change the max member count. You can add "set max member count to 1" then try to create 2nd client, you can see some messages both in server and client.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Mon Jan 02, 2012 4:31 pm

I am going to do some testing and set this up on a VM Friday - I may be asking you some question then. haha

I know how to modify and run Node.js / Socket.io application normally but I've never used anything like Construct before as the content creator.

I would like to try to reproduce something like this using Construct 2 to generate the HTML5 and structure.

https://github.com/Atinux/liveBalls
mars19852012-01-02 23:20:56
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest