[Behavior] MultiPlayer + online demo

Post your completed addons to share with the community

Post » Fri Jan 04, 2013 10:29 pm

[QUOTE=Velojet]
Not unless the developer is prepared to tolerate cheating that potentially results in an unplayable game. It's worth checking out what happened to Rob Hawkes' MMOG when he allowed the client to send XY values and host logic.[/QUOTE]

You are right, it isn't wise.

Either way, I hope you can continue making this plugin a must-have for Construct multiplayer! There's a lot of interest, it's definitely wanted, but it may confuse a lot of the less savvy non-programmers.
B
19
S
5
G
1
Posts: 104
Reputation: 2,920

Post » Sun Jan 06, 2013 6:20 pm

[QUOTE=Yung]... Wouldn't creating an extra 'client' that act as a host be able to handle some of the game logic? Not a full authoritative option, but for certain games (like most co-op) games, I think this should be sufficient?
[/QUOTE]@Yung
You're quite right that in co-op games, for instance, you could have one of the clients acting as host. Glenn Fiedler has a good article on the limitations of ths model (e.g. "each player in the game has latency equal to the most lagged player").
[QUOTE=Yung]From the looks of it, using your plugin, a turn based game is definitely doable![/QUOTE]Definitely. I'm hoping that someone will use it to produce one.


[QUOTE=bWard]...I hope you can continue making this plugin a must-have for Construct multiplayer! There's a lot of interest, it's definitely wanted, but it may confuse a lot of the less savvy non-programmers.[/QUOTE]@bWard
Thanks for your very positive feedback. I've tried to make the C2 side of it as non-confusing as possible (no need to deal with sockets and messages!), and I'm always here to help with coding the server side. Velojet2013-01-06 18:21:58
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sun Jan 13, 2013 12:00 am

Amazing! Not the ultimate multiplayer plugin yet, but a good step forward :]
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Tue Jan 15, 2013 6:48 pm

@lemo Thanks greatly for your very positive feedback! No, it's definitely not the ultimate multiplayer plugin (I'm working on that ), but maybe it's an indication of one way of getting there.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sat Feb 02, 2013 5:21 pm

Hello.
I'm completely new to any form of game-making (real noob), and have no programming competence of any form, so pliz be patient with me. That's the main reason i ended up with DL'ing C2, which seemed like a cool and pretty-easy to learn software. Just wanting to ask if this plugin of yours is the furthest the C2 community has gotten to a real multiplayer feature for C2? And how does it work, could i make a PvP game like for instance "tetris battle" with it, or would that require more complexity and development?

The answers might already be in the thread, but as I stated i am completely new to "game-making", so I don't udnerstand much of the issues discussed, I need very basic language to understand. Thanks for any answers in advance :)
B
3
Posts: 6
Reputation: 681

Post » Mon Feb 04, 2013 3:31 am

Huge thanks for this.

I've been doing some research into this too in the hope to build a fast multiplayer game...partially using construct 2.

This article is excellent: http://buildnewgames.com/optimizing-websockets-bandwidth/

It discusses using binary to send game data which I think is a big consideration in improving the plugins created.

You also need a way to port code to a server side environment so construct 2 would need a way to export in that way to avoid cheating.

I look forward to seeing what comes of it in the near future :)
B
5
Posts: 39
Reputation: 678

Post » Mon Feb 04, 2013 8:26 am

@mathiaswing
I'd like to think that this is the closest we've come so far to a multiplayer plugin for C2. There are other plugins which enable multiplaying, but they're lower-level socket plugins.

Making a multiplayer game still requires server-side coding in JavaScript (or at least modification of my server-side code).

@aceofpack
Thanks for your thanks! And thanks for the link on optimising WebSockets. My plugin is built on top of NowJS, which puts another layer of abstraction on top of Sockei.IO, so there's plenty of room here for optimisation.

As for porting code to a server side environment to avoid cheating, there's no way to do that via Construct 2, which is why I've coded a separate server in JavaScript.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Mon Feb 04, 2013 1:21 pm

But is this plugin only made for ppl who have a server, or is this a plugin to connect to a already setup server? If the last instance is the case, would having a server by myself change the opportunities for making a multiplayer plugin? Might be stupid question, but as said before I don't really have a clue on the technical issues of game-creating software. I just want to design a cool game that can be setup for multiplayer features :D

Thanks in advance
B
3
Posts: 6
Reputation: 681

Post » Mon Feb 04, 2013 3:57 pm

@velojet

No worries, I'm going to explore your code and aim to help you achieve this goal.

There's good and bad news around this:

For the non-technical - server software such has node.js has allowed developers to use the same code client and server side. This means that a method of generating code to be inserted server side can be dreamt of. This is what velojet is actually doing here. He's used code from the runtime that he could run on the server.

However, you need a server for multiplayer.

Latency and lag needs to be managed effectively with a few methods:

- The design of your data for the game
- The amount of players you want on any screen at one time
- Optimisation to be sent via binary means (this is your data broken down into its component parts with no 'bloat' added)

Your game needs to design against cheats:

- Only send a 'request to perform an action' to the server
- Client makes the move to avoid lag whilst waits for server
- Server works out where it expects the player should be/what status they are at etc when the message is receivied
- Client checks if the move is inline with the server when the response comes through and corrects it to the expectation if wildly different

This is prediction correction. http://en.wikipedia.org/wiki/Client-side_prediction

So, there's a few things here that make multi-player not so simple as a plugin. You need to be able to design your game in a way to be optimised for multi-player.

Cheaters especially need to be quelled if you want to do in-app purchasing https://developers.google.com/commerce/wallet/digital/

I'm working on all this and like velojet, it's important to get an example working with the steps you take to even think about what elements are needed to give a true multiplayer plugin.

aceofpack2013-02-04 16:00:42
B
5
Posts: 39
Reputation: 678

Post » Tue Feb 05, 2013 10:29 pm

What if i use a cocoonJS plugin? Isn't cocoonJS supposed to support multiplayer gaming?
B
3
Posts: 6
Reputation: 681

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: R0J0hound and 5 guests