March 2021
Posted 3 years ago
There wasn't any code to transfer files from the server to the client on join, so I added some. This method of getting files from the server over the game network socket isn't ideal, but it works fine as a last resort.

The ideal scenario in production is that the files are downloaded in an addon, or from a website. That way we can support multiple downloads at once and it's a ton faster. This is how things should work 99% of the time and will totally be supported.

But I feel downloading from the server is important when developing an addon. If I'm making a gamemode and people are on my server I don't want to have to upload an addon for them to get my latest changes - they should get them live.

And that's what happens now. If I change a stylesheet on my listen-server the clients will be notified, they'll realize they don't have the new file and then download it from the server. When they download it it'll be hotloaded and everything will be in sync again.

Being able to live edit like this makes a huge difference. It changes the way you develop. The players on your server become lab rats, reacting to every change with disappointment or joy. It turns it into a game.