Set a websocket server that is compatible with c2

Discussion and feedback on Construct 2

Post » Fri Dec 30, 2011 6:56 pm

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 dont exist , just post a server that is compatible with C2)

also tell me how i can program it..
thank you guys
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 31, 2011 3:10 am

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:

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

Also, http://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
B
6
S
1
G
1
Posts: 23
Reputation: 833

Post » Sat Dec 31, 2011 5:16 am

[QUOTE=talkinghead]I've just coded my own socket.io plugin and am currently working on a client/server multiplayer implementation.[/QUOTE]

Could you share how to fix the socket.io-client to pass the minify of C2?
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Sat Dec 31, 2011 3:10 pm

@talkinghead
i mean that starts but that dont appear on the screen like cmd's
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 31, 2011 3:15 pm

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

B
29
S
5
G
6
Posts: 58
Reputation: 5,121

Post » Sat Dec 31, 2011 3:27 pm

@ayzhong
no , I don't want the client application to show up on the screen
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 31, 2011 3:40 pm

ok now i'm confused
B
29
S
5
G
6
Posts: 58
Reputation: 5,121

Post » Sat Dec 31, 2011 3:43 pm

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
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 31, 2011 4:00 pm

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.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Dec 31, 2011 4:43 pm

@Kyatric is there a technique on how to open a ewxternal application with C2? like open the server application from C2
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, Eisenhans, R0J0hound and 13 guests