Is Multiplayer/online possible with Construct 2?

Discuss game development design and post your game ideas

Post » Mon Nov 26, 2012 5:20 pm

We also should be able to have access to webRTC in Chrome/Firefox in spring of 2013.
This will take care of the communication part, but will remove the authoritative server (or need for the client to check for the values of the opponent's client). In other words, cheat prevention in webRTC won't be "easy" at first.

Nevertheless, depending on how you design your game, it's not necessary needed to check for it. In a not competitive coop game for example, there is less "reason"/meaning to be cheating.
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: 6,998
Reputation: 57,791

Post » Mon Nov 26, 2012 6:52 pm

[QUOTE=Kyatric]... This will take care of the communication part, but will remove the authoritative server (or need for the client to check for the values of the opponent's client). ...[/QUOTE]
Maybe I'm missing something here, but I can't see how WebRTC "will remove the authoritative server". Doesn't it just remove the need for WebSockets (and/or AJAX)? Isn't there still a need for an authoritative server to mediate/manage game state/logic (not to mention cheating)?
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Mon Nov 26, 2012 7:36 pm

[QUOTE=Ashley]... Given we have a community of people who are trying to avoid traditional programming, do you think that would still be useful at all? If you had to code a serverside? If so, we could still make some of the clientside plugins (like WebSocket) to provide official support for that. ...[/QUOTE]
@Ashley
Those are excellent questions. It really is at odds with the (highly successful) philosophy/rationale of Construct 2 to ask the Scirra team to support what is necessarily traditional programming of a multiplayer game server. Best I think to leave it (as now) to enthusiasts to provide third-party socket plugins for the traditional server-side programmers amongst us to experiment with. (And as @Kyatric says, it looks as though WebRTC is going to make those socket plugins redundant anyway.)
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Mon Nov 26, 2012 7:59 pm

WebRTC doesn't change the picture much, it just means instead of connecting with WebSockets you connect with WebRTC. WebRTC should also bring UDP support though, so it's useful for that. Whichever one is used, you still need an authoritative server to connect to, because otherwise cheating will likely be rampant (especially in peer-to-peer games).
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Mon Nov 26, 2012 8:43 pm

In networking in general, you have client side with a function to connect, and functions send/receive to exchange messages.
It also means that you need to make a server that handles the connexion between the clients and is the source that receive the messages from the client and then broadcast it, as well as deal with the game's logic.

The idea behind webRTC is that this server is "the webRTC service", a sort of "cloud" you don't touch upon, leaving you with nothing but the connect/send/receive to handle.

You have little to no access to the server which only purpose is to deal with connecting clients (browsers) one to another and exchange messages between them.

So yes, in the end, even with webRTC, a "gameplay" server will be required to be coded by the game maker, my mistake.Kyatric2012-11-26 20:45:22
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: 6,998
Reputation: 57,791

Post » Tue Nov 27, 2012 4:20 am

[QUOTE=Ashley] One of the hardest problems is like @Velojet says you need an authoritative server to prevent cheating. However C2's architecture does not lend itself easily to that - even with a good WebSocket plugin (and even assuming it had UDP support) you might have to hand-code a server for your game, and multiplayer programming is pretty tricky on top of that.

Given we have a community of people who are trying to avoid traditional programming, do you think that would still be useful at all? If you had to code a serverside? If so, we could still make some of the clientside plugins (like WebSocket) to provide official support for that. However we wouldn't be able to help much with writing serversides, it would probably be too complicated to write any kind of simple step-by-step tutorial for it.[/QUOTE]
We'll always have to hand code our own servers, and people who cannot grasp code aren't able to grasp the requirements behind multiplayer (servers, databases, caching, network issues, clustering, dead reckoning, cheat prevention, etc). There isn't any tool in the market able to simplify server coding as much as construct simplifies game development, and besides a "MMORPG MAKER", I don't think there is demand for one such tool.

That being said, I'd love to see an official multiplayer plugin from scirra, though HTML5 isn't ready for it yet - for now it's best that those plugins be made by the community (we're doing great with what we've got, I've been able to implement multiplayer in everything that didn't require a real time element).
B
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Thu Nov 29, 2012 4:19 am

C2 could export javascript, and node.js server is running javascript code, so it is not impossible to create server logic by C2 (event sheet + plugin system).
But it need a lot of time to create this exporter which has not canvas render I thought. The C2 development team still has a lot of items at TODO list.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Sun Dec 02, 2012 1:28 am

If it's possible I'd rather see a plugin where the client side handles all of the game logic, and the server only handles the initial connection security (eg: a pre-defined password in C2 before export and) forwarding of messages to all other clients.

This way the server could pretty much be a static script that people drop in a public webfolder (eg: DropBox) and point their client to.

This is similar to my CC game Pixel People Online, the server can do some things but it's actually the clients that are all telling each other what's going on. The only thing I didn't like was that messages were sent to everyone, so on each client they had to first check to make sure it wasn't their own message that was received.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sun Dec 02, 2012 8:54 am

[QUOTE=Jayjay] If it's possible I'd rather see a plugin where the client side handles all of the game logic ...[/QUOTE]
That would seem to impose severe limits on the complexity/fun of the game - what if two clients use their internal logic to come up with opposing outcomes (e.g. who has got to a waypoint first)? This is one reason why most serious multiplayer games need an authoritative server.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sun Dec 02, 2012 9:48 am

[QUOTE=Velojet] [QUOTE=Jayjay] If it's possible I'd rather see a plugin where the client side handles all of the game logic ...[/QUOTE]
That would seem to impose severe limits on the complexity/fun of the game - what if two clients use their internal logic to come up with opposing outcomes (e.g. who has got to a waypoint first)? This is one reason why most serious multiplayer games need an authoritative server.[/QUOTE]

I'd set up a fake "server"/host who decides how the game plays. Sure, they could potentially mod their own server traffic, but on a whole that will happen regardless of anti-cheat protection in my experience anyway.

The other players send what they try to do, and then the player who is acting host will send back actual data the other clients adapt to.

I'm certain that as long as it can be done from events/built-in to Construct 2, it will be very useful and worth the time to put a multiplayer plugin like that. Sure, allow third party plugins and advanced servers still, but basic multiplayer has to be possible.Jayjay2012-12-02 09:50:25
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

PreviousNext

Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 2 guests