Set a websocket server that is compatible with c2

0 favourites
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Hello guys

    after 2 posts and a wikipedia documentation

    i understanded...

    but..

    i need to know if i can set up a server that launch but dont appear as a program and that i can control from the event editor

    (if it don�t exist , just post a server that is compatible with C2)

    also tell me how i can program it..

    thank you guys

  • Hey mate,

    "i need to know if i can set up a server that launch but dont appear as a program"

    What do you mean by that? Servers are just that, servers. Meaning a machine (a local or a remote one) running a server setup that then serves the client...

    Any regular server could be compatible with C2. It just depends on your choice of client-server communication. I believe there are a couple of socket plugins posted in the plugin section, so maybe take a look at that.

    For server side programming I'd recommend coding something in JS as you could potentially interchange code with the client. Have a look at node.js + socket.io.

    I've just coded my own socket.io plugin and am currently working on a client/server multiplayer implementation. I'm coding a simple server in JS, the demo should be ready any time soon.

    I'll keep you updated.

    Meanwhile, take a look at the following:

    stackoverflow.com/questions/6244230/multiplayer-html5-node-js-socket-io

    Also, gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking

    a must read if you are interested in multiplayer mechanics. Hope this helps.

    Cheers

  • I've just coded my own socket.io plugin and am currently working on a client/server multiplayer implementation.

    Could you share how to fix the socket.io-client to pass the minify of C2?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • talkinghead

    i mean that starts but that dont appear on the screen like cmd's

  • ^are you talking about using your computer as a server but you don't want the server application to show up on your screen?

  • ayzhong

    no , I don't want the client application to show up on the screen

  • ok now i'm confused <img src="smileys/smiley17.gif" border="0" align="middle" />

  • ok , alot of you don't seem to understand what i mean i will try to explain

    in my game , i will use Zack0Wack0 Websocket plugin and i need a setting like this

    player can make a server or join one only by entering an ip (for making a server and for joining his server but i don't want the screen to be all hided by cmd windows , i want the client and server to not show up

    thank you

  • It sounds like you did not understand yet that making a server from C2 is not possible.

    Browsers can't act as a server so your server application HAS to be an external application. All you can do from your browser is the client.

    The client will be your application (using the websocket plugin) so it won't make a "cmd window" and still be able to communicate with a server.

    But still, your server has to be an application (external to the browser).

    You could consider making your server in CC (with the podsix library or scidave's network plugin).

    You would still have a window displayed and your user would have to first launch said-server before connecting to it through its IP.

  • Kyatric is there a technique on how to open a ewxternal application with C2? like open the server application from C2

  • For security reason, I don't think HTML5 allows it.

  • oh ok

    but Kyatric , do you know a good Websocket server

  • Node.js

  • rexrainbow

    I've just ran into the same issue actually, never realizing there was a problem with it (I ditched the minifier, since I was testing locally and exporting without it is a lot faster).

    Wouldn't an external include work?

    Cheers

  • talkinghead

    I thought only minify had problem, even if I change the name to match the minify rule.

    "External include" should work, but it may be inconvenience for normal user. Any way, it's another way to integrate socket-io client, thanks.

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