How does Grow a Garden Publish Updates?

What exactly is he gatekeeping?

So, he’s ā€œgatekeepingā€ because he didn’t reply to a thread that he most likely doesn’t even know exists. I also didn’t know we were all entitled to this information on how he releases updates. Thanks for letting us all know.

16 Likes

he also says that he uses saveinstance on any game that doesn’t tell him exactly how every single thing is made :sob: I’m really hoping he is just ragebaiting when he says that

2 Likes

So, he’s ā€œgatekeepingā€ because he didn’t reply to a thread that he most likely doesn’t even know exists. I also didn’t know we were all entitled to this information on how he releases updates. Thanks for letting us all know.

he also says that he uses saveinstance on any game that doesn’t tell him exactly how every single thing is made :sob: I’m really hoping he is just ragebaiting when he says that

im curious, howd something like that work?

1 Like

what if they have some sort of FFlag system that enables and disables features

you have a webserver that has a list of flags and whether they are enabled, something like https://example.com/growagarden/getenabledflags.cgi

each server connects to that URL, downloads the json, and enables or changes things like features or items in the shop based on whats in that file.

that server most likely has a control panel that allows you to do things like override those flags yourself, add flags, and set flags to be enabled or disabled after a certain time

when scheduling the flags to change it most likely sets up like a cron job or smth to send an event through Messaging Service with either what fflag changed or just like telling it to fetch the list

im assuming it uses this approach since realistically a game that big by such a big dev would be using some sort of SQL database since its more reliable than Roblox’s DataStore system

3 Likes

Probably just made a system that inserts scripts and overrides outdated ones upon reciving signal from MessagingService

I haven’t played that game so its my assumption of how i would’ve implemented it

2 Likes

I believe that they publish the updates hours before the scheduled date, which is why new changes in the UI or features appear early. Few updates ago, players discovered that by changing their device’s time, they could access the new seed in the shop ahead of time.

1 Like

They probably use messaging service or os.time or smth like that to execute planned updates

1 Like

I have contacted a moderator of the Grow A Garden Discord who is also a programmer (probably not for the game itself). I’ll let you know when they respond, hopefully they can contact a developer for me who would know the answer.

1 Like

For updating the map, this is more straightforward; they likely just publish a sourcemap to MessagingService.
However, updating scripts is a different story. I’ve heard that their update system can patch bugs in their scripts without shutting down servers, so they are clearly updating the code as well.
I think I also have a theory for how they update scripts: requiring modules via asset id

  • The game’s modules are probably loaded via require(module script asset id) with the source code of the modules being uploaded as an asset.
  • To update the modules, there is likely a system that unloads the module scripts and loads them again by doing the same require of the asset id.
  • Upon a module script update, a signal will be sent to all the other scripts telling it to require the module again (so that scripts no longer reference the old module, thus allowing it to be garbage collected)
    • Alternatively, the game could potentially be using a singleton architecture where modules are accessed through a global table rather than required directly. If the game wanted to skip this signalling step, then the scripts would have to avoid having any event listeners/hooks referencing any modules directly.

For this theory to work, a few things would need to be known:

  • Roblox caches module scripts, so if you require a module script multiple times, it will return the same reference rather than loading the module script for a second time. The question is, when you require a module via asset id, does it also get cached, or will it always create a new module?
  • Normally, you can require module scripts via asset id only if they are public on the creator store. This would be an obvious security risk for the source code of GaG, so the question is, can you require private module scripts if they are owned by the same creator/group?

Alternatively, they could do a different solution to reload scripts:

  • When a module script needs to update, they can insert the module script through InsertService:LoadAsset (like Yarik suggested)
  • The old module script will be deleted, then a signal will be sent to the other scripts that the module has been replaced, and its the same situation as my previous theory from there.
1 Like

You don’t even need a web server for this. Something like this is dead simple to create using DataStoreService & MessagingService.

We publish a new version, and the update gets applied once a new server with the update is joined, simply publishing updates.
If it’s for a big update, we will still do the same thing.
The [DEV] game is for QA testing. The actual dev game is the GHG Grow a Garden.

events, they do scheduled events and the update just appears on the same server without teleporting anyone, then when event ends, the event scheduling is removed and the update is kept

Ok after using one minute to think about this here is my idea:

I’m thinking jandel writes a script in studio in the main game place. The script uses messagingservice to ā€œupdateā€ live servers without teleports. He hasn’t published yet.

Right at the end of all the messagingservice code, jandel sends a http patch request to this endpoint. So that newly created servers have the update too.

https://develop.roblox.com/v2/places/{placeId}

Then jandel joins the main game, public/private server he joins doesn’t really matter. He then copy and pastes the code in the script in the developer console command bar. Code executed in the live servers’ developer console will update live servers too.

This is honestly a really cool idea. You could use tweenservice or something to make smooth transitions and it looks really nice compared to other games which just teleport you to a place and back.

You could publish the game first and then do the command bar code stuff but if you can’t join the game for whatever reason then it all feels out of sync. roblox players are terrible so they might even dislike the game just for that.

From what I can gather the updates are made and published before the release, just hidden. Due to this the update is able to seamlessly ā€œappearā€ there, when in reality it’s been there the whole time.

We will publish the update usually on a friday night (After QA Testing is done) and restart servers, while another developer (Such as jandel) will announce that servers will restart, and then proceed to restart servers while still keeping the previous update on the island until the following admin abuse on saturday, where we use a timer script to delete the old update with the new one.

This is pretty close to what happens. although, he does not infact use a command to restart servers to the latest version, he rather uses the built-in creator hub server management, while using globalmessage to announce the server restart, while the next update stays under the map until the admin abuse is over with. If you are wondering, we do not have a custom made command bar, we simply use CMDR
This would most likely be the best explanation for this topic.

1 Like

I see, I’m not really updated in the grow a garden developer lore so, are you a developer of the game?? like a modeller? If so nice and thanks for the reply of info.

1 Like