FFORGE

Tutorial · 12 min read · Updated November 2026

How to make a garden game on Roblox with AI (Grow a Garden style)

Gardening games are some of the most played experiences on Roblox right now. Grow a Garden set records, and its sequel opened to hundreds of thousands of players at once. The loop is gentle: buy seeds, plant them in your own plot, wait, harvest, sell, buy better seeds. This guide shows how to build an original garden or farming game inside your own Roblox Studio place, with the hard parts (offline growth, a shop that matches across servers, safe saving, thousands of fruit without lag) done properly. The prompts are written for Forge and work as a checklist with any AI agent.

Make your own game, not a copy. Planting, growing and selling is a genre that many games share. The plant models, art, names, mutation names, UI and branding of Grow a Garden are not yours to use. Everything below is theme-agnostic: pick your own setting (a moon farm, a candy orchard, a mushroom cave, a rooftop city garden) and make your own crops and art.

The loop, piece by piece

Why it is harder to build right than it looks

A first version where a seed turns into a plant is easy. Most garden games feel broken because of what is underneath.

Growth must be computed, not counted

The tempting version runs a loop per plant that adds growth every second. With 6 players and 60 plants each, that is 360 loops, and growth stops the moment the player leaves. Instead, store plantedAt (from os.time()) and the crop's grow time. The stage is just (now - plantedAt) / growTime, worked out when it matters: when the plot loads, when the player tries to harvest, and on one shared tick every few seconds that updates visible stages. Plants then keep growing while the player is offline for free, and the server decides when something is ripe. Use workspace:GetServerTimeNow() on the client for countdowns so they match the server.

The server owns every seed, fruit and coin

Remotes carry intent only: "plant seed X at this spot", "harvest plant 12", "sell everything". The server checks the player owns the seed, the spot is inside their own plot and not too close to another plant, the plant is ripe, the backpack has room, and rate limits each remote. It rolls fruit weight and mutations itself and computes the sale price itself. A client that sends a price or a weight is ignored.

A shop that matches across servers

Players compare stock in Discord, so every server should agree. Roll the stock with Random.new(math.floor(os.time() / 300)) and the same weighted table, and every server gets the same stock for that 5-minute window without any cross-server messaging. Track each player's purchases per window on the server so a stock limit of, say, 3 per seed cannot be bypassed by rejoining.

Saving must be session-locked and compact

A garden is a lot of data: up to 60 plants with fruit, a backpack, gear and seeds. Use DataStore UpdateAsync with a session lock so two servers never write the same player at once, give every plant a unique id, and save on leave and in BindToClose. Store compact records (crop id, position on the plot grid, plantedAt, fruit list) rather than instance data, so you stay far under the 4 MB per-key limit as gardens grow.

ProcessReceipt must be idempotent

Robux products like a seed restock or a growth boost go through one ProcessReceipt callback that records each PurchaseId before granting, so a retried receipt never grants twice. The game pass guide has the full pattern.

Performance with six full gardens

360 plants with up to 5 fruit each is close to 2,000 visible objects before decorations. What keeps it smooth on phones:

A Crops module: every number in one place

Put every crop, price, grow time and mutation in one ModuleScript, ReplicatedStorage/Config/Crops. Scripts read from it and never hard-code a crop. Balancing becomes editing one table, and a new crop for an update is one new entry plus a model.

-- ReplicatedStorage/Config/Crops (shape only)
return {
  currency = "Coins",
  crops = {
    { id = "moon_carrot", name = "Moon Carrot", rarity = "Common",
      seedPrice = 10, sellBase = 8, growTime = 60, multiHarvest = false },
    { id = "glow_berry", name = "Glow Berry", rarity = "Uncommon",
      seedPrice = 120, sellBase = 25, growTime = 180, multiHarvest = true,
      regrowTime = 90, maxFruit = 5 },
    -- Rare, Epic, Legendary ...
  },
  weight = { min = 0.8, max = 1.6, giantChance = 0.01, giantMult = 3 },
  mutations = {
    { id = "Dewy",     mult = 2,  chance = 0.02 },
    { id = "Frosted",  mult = 3,  chance = 0 },     -- only during Frost
    { id = "Starlit",  mult = 10, chance = 0.001 },
  },
}

The starter prompt for Forge

Paste this as your first message. It sets the rules for the whole build and does Phase 1.

We are building an ORIGINAL Roblox gardening game. Do not use any
names, models, art or UI from existing games. Theme: a farm on the
moon. Every crop, price, grow time and mutation comes from
ReplicatedStorage/Config/Crops.

Crops for now (placeholder models, 3 growth stages each):
Moon Carrot (seed 10, sells 8, 60 s, single harvest)
Glow Berry (seed 120, sells 25, 180 s, multi-harvest, regrow 90 s,
max 5 fruit). Add 4 more up to a Legendary that takes 20 minutes.

Rules for the whole build: the server owns all coins, seeds, plants,
fruit, weights and mutations. Remotes send intent only, never prices,
weights or owners, and every remote validates types, plot ownership,
distance and rate. Growth is computed from plantedAt with os.time(),
never with a loop per plant, so plants grow while players are
offline. The server stores only data; clients build the plant
visuals. Save with DataStore UpdateAsync, session-locked, each plant
a record with a GUID.

We work in 6 phases and I will say "next" between them:
1 plots + growth + selling, 2 seed shop, 3 weight + mutations,
4 weather, 5 map + UI + performance, 6 monetization + balance.

Phase 1 now: 6 plots, one per player on join, up to 60 plants each,
plant a seed by clicking soil in your own plot, growth stages, a
harvest prompt when ripe, a backpack capped at 200, a sell stand,
and saving. Playtest with 2 clients: plant, wait, harvest, sell,
stop, start again, confirm the plants kept growing. Screenshot.

Follow-up messages, one per phase

Phase 2: the seed shop.

Next. Add a seed shop at the market. Stock restocks every 300 s and
is rolled with Random.new(math.floor(os.time() / 300)) from a
weighted table, so every server shows the same stock. Commons nearly
always appear, the Legendary about 1 restock in 20. Limit 3 of each
seed per player per restock, tracked on the server and saved so
rejoining does not reset it. Show a countdown from
GetServerTimeNow. Test across two server instances if you can, and
screenshot the shop.

Phase 3: weight and mutations.

Next. When a fruit appears, the server rolls its weight between 0.8
and 1.6 (1% chance of a giant at 3x) and checks each mutation in the
Crops module. Sale value = sellBase x weight x mutation multipliers.
Show the weight and mutation on hover and in the backpack. Mutation
visuals (a material, a colour, a small particle) are spawned on the
client only. Print 1,000 test rolls so I can check the odds, then
screenshot a plot with mutated fruit.

Phase 4: weather events.

Next. A server weather scheduler: every 15 to 20 minutes, pick one
event for 3 minutes. Rain: growth 1.5x and Dewy chance x5. Frost:
fruit that appear can become Frosted. Meteor shower: a few rare
seeds land on random plots. Announce each event to the server, change
the sky and lighting on the clients, and make sure growth math uses
the speed-up correctly across the event boundary. Screenshot each.

Phase 5: map, UI and performance.

Next. Lay out 6 plots around a central market with the seed shop,
sell stand and a gear shop (watering can: +25% growth in a small
area for 60 s; sprinkler: placeable, +10% growth in range). Build a
scale-based HUD (coins, backpack count, next restock, current
weather), a seed shop panel and a backpack panel that work on a phone.
Turn on StreamingEnabled. Fill one plot with 60 plants and check the
device emulator on a phone preset. Screenshot from above and on phone.

Phase 6: monetization and balance.

Next. Add placeholder-id game passes: 2x Sell, Bigger Backpack, +20
Plant Slots, Auto Sprinkler. Add developer products: Instant Restock
(for the buyer only), 15-minute Growth Boost, and Summon Rain (a
server-wide rain event, announced with the buyer's name). One
ProcessReceipt, idempotent by PurchaseId. Then review every remote
for type, range, plot ownership and rate checks, and print a table
of time-to-afford for each seed so I can balance. Summarise.

Create the real passes and products on the Roblox website and paste their ids into the constants. The agent cannot do that part.

Monetization ideas that fit the loop

ProductTypeWhy players buy it
2x SellGame passEvery harvest is worth double, forever
Bigger backpackGame passFewer trips to the sell stand
+Plant slotsGame passA bigger garden earning at once
Instant restockDeveloper productA new roll of the shop without waiting
Growth boostDeveloper productFaster harvests for a short session
Summon weatherDeveloper productBoosts the whole server, so the buyer gets a shout-out

Show shop odds and mutation chances in the game. Many of your players are kids, and a game that shows its odds is the honest one.

Honest limits

Questions

Can I copy Grow a Garden?

No. Planting, growing, selling and a restocking shop are a genre many games share, but the plant models, art, names, mutation names, UI and branding of Grow a Garden belong to its developer. Build the loop yourself and give it your own theme, crops and art.

How do plants keep growing when the player is offline?

Do not run a timer per plant. Save the time each plant was planted, and compute elapsed time from os.time() whenever the server needs the stage. When the player rejoins, every plant is exactly as grown as it should be.

How do I make the seed shop show the same stock in every server?

Roll the stock from a seed made of the current five-minute window, such as math.floor(os.time() / 300). Every server rolling the same table with the same seed gets the same stock, with no cross-server messaging.

Why does my garden game lag with a full server?

Keep only data on the server and let clients build plant visuals, anchor everything with collisions and queries off, swap a few stage models instead of tweening every frame, cap plants per plot and turn on StreamingEnabled.

How long does it take to build with AI?

The six phases take an afternoon to a weekend of prompting and playtesting. Balancing prices and grow times takes longer, and you learn it from real players.

Related guides

Grow your own garden game in Forge. Pair your Studio, paste the starter prompt and get a playtest screenshot back. Trial credits, no card. Try Forge free →