A way for client players to download files from the master client?

Hello! I'm not currently developing any new online multiplayer games at the moment, but I want to ask this question so my future self can look back. I've had this idea for a online multiplayer game in which, one of the features I want for the overall game to have is a in-game map creator which you can save as a file on your computer and load it to play on.

Now since this idea of a game is going to be a online multiplayer, I'm thinking there'll need to be a feature where when you connect to a room, whichever created map you have selected, other clients are going to need to be able to download that map's file on their computers too.

My question is I'm wondering, is there a line or way of allowing client players once you're connected to a room to be able to download files you send?

Answers

  • For dynamic content a CDN (Content Delivery Network) is the way to go. As in: Everyone uploads their files to some web service and gets an ID for it. In-game, you share the ID and everyone loads the data externally via https.

    In-game traffic is more expensive and the APIs are not made for file transfer.