Multiplayer but Client Side

Get help using Construct 2

Post » Tue Sep 27, 2016 6:24 pm

How do I create a Game, which "just" sends the player Coordinates + Variables to any other Player in the Room.

I know that you could easily cheat, but its a school project, and the internet in the school is'nt the best, so if I just Sync the players it would be unplayable for the peers , cause of horrible lags
Posts: 2
Reputation: 1,037

Post » Tue Sep 27, 2016 6:55 pm

You would have to have each peer send a message with the relevant information to the host, and the host relay that message to peers. Use tags to facilitate logic to decide what gets sent to who.

Generally speaking, such an approach will not solve your lag problem. On the other hand, if your project is for school only, your host and your peers should all be local, in which case the internet quality doesn't matter at all.

If you don't have a good understanding of the difference between host, server, and signalling server, recommend going through the multiplayer tutorials again carefully, or you'll have bigger issues than just lag down the line.
Mistakes were made.
Posts: 1,932
Reputation: 74,341

Post » Tue Sep 27, 2016 7:20 pm

The way you should design your multiplayer game shall always be to send the tiniest amount of data possible.
Syncing the position of all Players is also normal.

Code: Select all
System ¦ On start of layout -
-- Multiplayer ¦ Sync PlayerObject (with Position only, precision Low (int16, 2bytes) at Normal bandwith (unpredictable)

Please note that you still require a basic Multiplayer Setup.
To connect everyone with each other and associate each Player Object with a Multiplayer.PeerID

Here are the basics about Multiplayer and the Plugin: ... -concepts/

Here's a Tutorial for real-time multiplayer games ... ame/page-1

Checkout the Multiplayer example .capx files inside your Construct 2 installation folder.
There are multiple ones and should help you to understand how everything works.

Construct 2/examples

In a normal Multiplayer Setup you usualy have a
HOST - Moves players, Shoots for them, Tells everyone what they're actually doing like Player Position and so on.
PEERS - Recieves Data from HOST and displays what's going on. Sends INPUT only to host (Mouse Clicks, Keyboard Strokes)
Posts: 159
Reputation: 3,074

Return to How do I....?

Who is online

Users browsing this forum: mistia and 6 guests