[PLUGIN] Sync-function

0 favourites
From the Asset Store
Adventure Quiz interactive (Questions and answers via Json)
  • Sync-function

    Although chat plugin can send/receive a string to a server, you still need to make a composer/parser to assemble/disassemble the data string.

    The sync-function plugin allows you to pass a command to server just like using the function plugin.

    First, you should install function plugin and chat plugin.

    Here is an example, you can compare it with the example in chat plugin.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-15.png" border="0">

    The interface of sync-function plugin is similar with function plugin. You set some parameters, then call a function or execute a command string just like in function plugin.

    The sync-function plugin will compose these information and send to server. When sync-function received these information from server, it will parse these and pass to the function plugin.

    Note that there is a property named "Sync-mode", if "Sync-mode" set to "Stand-alone", sync-function will pass parameters to function plugin directly without sending to network. So that it is possible to create multi/single player(s) game using the same events.

  • wow...it's PLUGINS BUILDER your main job Rex ? ^^

  • Making plugin is interesting. <img src="smileys/smiley36.gif" border="0" align="middle" />

  • good job...keep doing...i'm ur best follower :D ^^

  • I separate network to two parts.

    1. connection

    2. send/received

    Most of events are used in send/received. Connection is only used at the start.

    I split sync-function plugin from chat plugin because maybe someday I make another network plugin, user just need to replace the Chat plugin to the new one without changing the send/received logic part.

  • little step to multiplayer :)

  • The .bat file has to be running for it to work right?

    So how would i put this on a server to let it run?

  • Ah, .bat is to create a server, correctly.

    Chat and sync-function is client side program, just put these into capx like other plugins.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So if i published the example.. sent someone the link.. then we could talk?

  • 1. you need to create a server and be sure it can be connected, some ip address can not be connected.

    2. "action: connect" in Chat plugin should set to the ip address of server.

    Then you can use the example to talk.

  • Hmm still a little confused, so what do i do with the files?

    In the exported folder, Place the 'ServerEngine' and 'spcket.io.client' folders in my exported folder, it will work?

    Or do i put those folders on my server? (Will a web server work?)

    sorry if im bothering you, im just interested!

  • 1. for server, you can put it to anywhere. You just need to click the SocketIO.bat, when you want to create a server, before create a client.

    2. other things is client plugin, just use it like other plugins in C2.

    Actually, you can test without exported folder.

    1. click SocketIO.bat

    2. run the example capx in preview mode in Chat plugin or sync-function plugin.

  • Ahhhh ok I think I get it. But I dont like it :(.

    Well its a great plugin, But say for example i wanted to add it to a game so people can chat in the game, I would not want to click everyday and leave it open, its inconvenient right?

  • Hummm... yes, it's inconvenient.

    You can stay the server always running without closing it. Then the ip address will always valid.

    I don't know how to solve it. We still need a server, the different is the location of server, at home ... or on cloud?

  • cloud, its a web server. Hosts my website.

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