Online Help

2

2minerman

Guest
Hello!

I have a question that I cant seem to solve. I made a multiplayer base from a thread here. I can connect and the client can send data to the server. But when I have for example 2 clients the server dosent send the data between the clients. Its only the server who recieves the data.

I can give the code but I do not have any code for the server to send the data to the clients. Thats what I want to solve.

I am really new to this multiplayer but I want to learn it!

Thanks!
 
W

Wadlo

Guest
I suggest you go through a few more tutorials if you want to really learn how to do it.
This is a great one, and I believe it does support multiple users logging on (and updating their position).
https://help.yoyogames.com/hc/en-us/articles/216754698-Networking-Overview

Or, if you want a quick way to implement multiplayer without learning all the coding, I've found this asset to be useful:
https://marketplace.yoyogames.com/assets/1156/multiplayer-gmnet-engine

I'm not of much help, but there are many resources that can help. Best of luck.
 

andev

Member
You've done the hard bit!

If you look at the code you've used to send client data to the server, you just have to put that code in the server, but include data from every single player rather than just the one. Loop through the player list a couple of times per second, sending everything you need updated.
 
Top