Does someone have a CAPX example for Multiplayer?

Discussion and feedback on Construct 2

Post » Sat Jul 09, 2016 11:01 am

I need something to help me make my multiplayer segment of my game. There are bugs and glitches popping out everywhere. I used the Real time Multiplayer Example, but that was hard to understand.
If anyone would also just want to talk about the glitches and lecture to me on how to fix it, that would also be good, but I'm not always online.
*Insert Signature here*
B
13
S
5
Posts: 73
Reputation: 1,090

Post » Sat Jul 09, 2016 12:08 pm

Some templates ship with c2; just start a new project and type in "multi" to filter and you'll see them.
A big fan of JavaScript.
B
76
S
20
G
73
Posts: 2,244
Reputation: 45,962

Post » Sat Jul 09, 2016 7:11 pm

Colludium wrote:Some templates ship with c2; just start a new project and type in "multi" to filter and you'll see them.

I already did and used the real-time.
It wasn't much help.
*Insert Signature here*
B
13
S
5
Posts: 73
Reputation: 1,090

Post » Tue Jul 12, 2016 8:19 am

Describe your glitch?

The realtime multiplayer tutorial is very basic and concise, you really need to do your best and understand each part of it. While the multiplayer plugin automatically handles a ton of basic net code principles for you, it is still flexible enough to allow for different implementations in terms of multiplayer logic and updates.

Basically, most projects/examples will be even more complicated than the tutorial example. If you don't understand all the ideas presented in the multiplayer tutorial, it will be very difficult to proceed or troubleshoot problems.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Fri Jul 15, 2016 1:35 am

oosyrag wrote:Describe your glitch?

The realtime multiplayer tutorial is very basic and concise, you really need to do your best and understand each part of it. While the multiplayer plugin automatically handles a ton of basic net code principles for you, it is still flexible enough to allow for different implementations in terms of multiplayer logic and updates.

Basically, most projects/examples will be even more complicated than the tutorial example. If you don't understand all the ideas presented in the multiplayer tutorial, it will be very difficult to proceed or troubleshoot problems.


Well, one of the most frequent and annoying glitches is that when 2 players join, the First Player (The Host) can't see the second player, but the second player can see the first player (The Host). When you move the First Player, you can see the first player move on the second player's screen but not vice versa.
*Insert Signature here*
B
13
S
5
Posts: 73
Reputation: 1,090

Post » Fri Jul 15, 2016 8:23 am

kinda offtopic but is there a way to be able to host the server kinda dedicated on your own ?
B
27
S
7
G
3
Posts: 300
Reputation: 4,563

Post » Mon Jul 18, 2016 8:25 am

burningcake wrote:kinda offtopic but is there a way to be able to host the server kinda dedicated on your own ?

You can set up your own signalling server if that's what you want:
https://www.scirra.com/store/game-makin ... server-161

Or, if I'm right, you can set up a custom server with Node.JS. If I recall right there's been some projects doing this.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,721

Post » Mon Jul 18, 2016 5:16 pm

UltimateArceus3 wrote:
oosyrag wrote:Describe your glitch?

The realtime multiplayer tutorial is very basic and concise, you really need to do your best and understand each part of it. While the multiplayer plugin automatically handles a ton of basic net code principles for you, it is still flexible enough to allow for different implementations in terms of multiplayer logic and updates.

Basically, most projects/examples will be even more complicated than the tutorial example. If you don't understand all the ideas presented in the multiplayer tutorial, it will be very difficult to proceed or troubleshoot problems.


Well, one of the most frequent and annoying glitches is that when 2 players join, the First Player (The Host) can't see the second player, but the second player can see the first player (The Host). When you move the First Player, you can see the first player move on the second player's screen but not vice versa.



When you say frequent, does it only happen intermittantly (in the same project)?

If it happens all the time, you have a net code logic error: it sounds like your host is syncing properly, but your peers are not set up properly. Are you using a authoritative host setup like the tutorials? The peer events should not be creating or moving any objects (outside of local input prediction, which can be implemented AFTER you get basic net code working) - only sending inputs to the host, which does all the creating, updating, and syncing of all objects.

If it works properly sometimes but not all the time, I suspect routing/latency/unstable connection issues, which I can't really help with. But at least to confirm it isn't a networking issue, you can have both host and peer running on the same local host to test (open two tabs).
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Mon Jul 18, 2016 5:19 pm

burningcake wrote:kinda offtopic but is there a way to be able to host the server kinda dedicated on your own ?



A common solution is to leave any computer/server on with the game open as host in a browser tab or nw.js. This is the simplest kind of "server" and should be sufficient in most cases.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Sat Jul 23, 2016 1:18 am

burningcake wrote:kinda offtopic but is there a way to be able to host the server kinda dedicated on your own ?


Hmm, you kind of gave me an idea. I can make a seperate program to act as the host for a "dedicated server"
Thanks for the Idea!
*Insert Signature here*
B
13
S
5
Posts: 73
Reputation: 1,090

Next

Return to Construct 2 General

Who is online

Users browsing this forum: newt and 7 guests