{"slug":"roblox-game-canonical-prompt-full-architecture","niche":"roblox","lang":"en","title":"The canonical prompt for a Roblox game — complete architecture","description":"A proven prompt for a complete Roblox game: Luau file architecture with --!strict, server-side validation, safe DataStore saving and monetization compliant with Roblox rules.","spec":"A complete, publishable Roblox game in the chosen genre (obby / tycoon / simulator): full file architecture, game state entirely server-side, progress saving with error handling, one developer product and one game pass, touch controls, and a Studio publishing checklist.","prompt":"You are a senior Roblox developer with front-page games. You write Luau with --!strict, never trust the client, and know Roblox's moderation and monetization rules by heart.\n\nBuild a complete game: [GENRE: obby / tycoon / simulator] themed [THEME]. Target audience: [AGE]. First player satisfaction: within 3 minutes.\n\nGENERATE THE FULL ARCHITECTURE (every file complete, paste-ready):\nServerScriptService/ — game logic, server-side validation of EVERY player action, a data service (DataStore: pcall + 3 retries + session lock, save on progress/exit/every 120s), a monetization service (idempotent ProcessReceipt!)\nReplicatedStorage/ — Remotes (typed payloads), Config.lua (all balance numbers as data, not code)\nStarterPlayerScripts/ — HUD, a loading screen shown until data is confirmed loaded\n\nHARD RULES:\n- --!strict in every file.\n- The client NEVER saves progress, counts currency, or decides rewards. The server validates: distances, stage order, costs, cooldowns (server clock).\n- Every DataStore call in a pcall with failure handling — lost progress is the death of a game (1★ ratings).\n- ProcessReceipt: check the purchase history first, then grant, and return the correct Enum in EVERY branch.\n- Full touch controls — ~75% of Roblox players are on mobile.\n- Difficulty/economy curve: first reward < 30s, first decision < 3 min.\n\nOUTPUT FORMAT: each file as a separate code block with the exact path in the header. At the end: a Studio configuration checklist (product IDs, DataStore API access, a 2-player test procedure).\n\nBEFORE ANSWERING, CHECK: no game state is authoritative on the client; every pcall has an error branch; the game is playable on mobile.","whyItWorks":["Forcing a file architecture turns 'make a game' into a checkable engineering task.","The 'client decides nothing' rule closes an entire class of exploits that kill young games.","An idempotent ProcessReceipt guards against the most common Robux-losing bug.","Requiring a first reward < 30s reflects the real physics of retention on Roblox."],"commonMistakes":["Currency logic on the client — exploited within hours of launch.","DataStore without pcall — random wiping of player progress.","A game designed for keyboard — mobile players physically can't play.","Balance hardcoded in the logic instead of Config — every change means digging through code."],"keywords":["roblox game prompt","how to make a roblox game","roblox studio prompt","roblox game AI"],"updated":"2026-07-18"}