• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

GMS 2.3+ MMO Room Data

Liam Jacobs

Hiya all,

I'm currently working on a small platformer MMO and I've made a script that exports all of the room data (tiles and objects) to a txt file.
I use this to load rooms on the fly, in the client. I want to use this system to have the ability to change and add rooms on the server-side, and have them automatically update on the client-side.

My main issue is actually sending that room data to the client. Each room file is around 20-30kb, and has a 'version' number, so that the client can check with the server if their copy of the room is up to date.

What would be the best way to send this data to the player? I'm currently considering uploading it to a web server and simply sending the file name to the client to download.
Would it be more efficient to simply send the data as a string?

TL;DR - What is the fastest / most reliable way to send small (<100kb) files over a networked connection?

Kind regards,
L. Jacobs


If you're using native GML TCP sockets (sending data with network_send_packet()) I believe you can just load the file to a buffer and send it away. GM asynchronously handles the stream.

If that's not going to cut it (or you're using UDP), what I've been doing is splitting the file into smaller chunk packets (preferably under 1kbyte each) while the client is keeping track of chunks received and requesting back chunks which were lost.