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
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.
Develop games in your browser. Powerful, performant & highly capable.
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.
System Â¦ On start of layout -
-- Multiplayer Â¦ Sync PlayerObject (with Position only, precision Low (int16, 2bytes) at Normal bandwith (unpredictable)[/code:1pv07suh]
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:
[url=https://www.scirra.com/tutorials/892/multiplayer-tutorial-1-concepts/]https://www.scirra.com/tutorials/892/mu ... -concepts/[/url]
Here's a Tutorial for real-time multiplayer games
[url=https://www.scirra.com/tutorials/915/multiplayer-tutorial-3-real-time-game/page-1]https://www.scirra.com/tutorials/915/mu ... ame/page-1[/url]
[i]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.[/i]
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)