From Empty Project to Playable Build: AI Prompts That Replace a GameDev Studio's Routine Work in Unity and Unreal
Most indie game developers don't fail because of bad ideas. They fail because a playable prototype takes months, and by the time the vertical slice is done, motivation is gone. The bottleneck is rarely the creative part — it's the boilerplate: state machines, inventory systems, spawn logic, dialogue trees, weapon balance spreadsheets, build configs.
This is where LLMs genuinely shine, and not in the "generate my whole MMO" way that Twitter promises. Used correctly, an AI assistant handles the boring 60% of the codebase so you can spend time on what actually makes the game feel good: game feel, pacing, and the moment-to-moment loop.
Below is a collection of prompts I actually use in Unity and Unreal workflows. Each one is written for a specific, recurring task — not vague "write me a game" requests. All code examples target real APIs: Unity 2022 LTS / Unity 6 with the Input System package, and Unreal Engine 5.3+ with the Enhanced Input system and Blueprint/C++ hybrid workflows.
1. Turning a mechanic description into a Unity C# component
Problem: You know exactly how a mechanic should feel, but writing the component from scratch means 40 minutes of syntax and namespace hunting.
Prompt:
Act as a Unity C# developer. Write a MonoBehaviour component for a double-jump character controller using the Input System package (com.unity.inputsystem). Requirements: configurable jump height, gravity multiplier for fall, coyote time of 0.1s, jump buffering of 0.15s. Use Rigidbody2D. Add [SerializeField] fields with tooltips. Include XML doc comments. Do not use deprecated Input Manager APIs.
Real use case: A 2D platformer prototype where the designer needed coyote time — the short window after leaving a ledge where a jump still registers. Instead of reading forums, the prompt produced a working PlayerJump2D.cs, and only the character sprite assignment was left.
Where it saves time: 30–60 minutes per controller variant. Multiply by the number of characters or movement types you test.
2. Blueprint logic description → C++ or vice versa
Problem: Unreal devs often prototype in Blueprint, then need to port performance-critical logic to C++. Manual rewrites introduce bugs.
Prompt:
I have a Blueprint that spawns enemies on a timer and increases spawn count every 30 seconds up to a maximum. Rewrite this as an Unreal Engine C++ AActor subclass using FTimerHandle and TArray. Use UE_LOG for debugging. Follow Epic's coding standard (PascalCase for functions, b prefix for booleans). Keep the logic identical.
Real use case: A wave-based survival prototype. Blueprint worked for testing, but tick-heavy spawn logic caused frame drops on lower-end hardware. The C++ port kept behavior identical, and the profiler showed the spawn cost dropped to a fraction of the Blueprint version.
Note: Always review the generated C++ against Epic's official coding standard at dev.epicgames.com/documentation — LLMs sometimes invent macros that don't exist.
3. Procedural level generation with seed control
Problem: Hand-authoring levels takes days, but pure random generation produces unplayable garbage.
Prompt:
Write a Unity C# script that generates a dungeon layout using a seeded random walk algorithm. Requirements: seed is a public int so results are reproducible, grid size configurable, ensure at least one path from start to exit using BFS validation. Return a 2D tilemap-ready int array where 0 = wall, 1 = floor. Add a Gizmo draw method for editor preview.
Real use case: A roguelike prototype where every run needed to be reproducible for bug reporting. The seed parameter meant the QA tester could send "seed 44231 breaks the exit path" instead of "sometimes it's broken."
Where it saves time: Turns a 2-day level-design task into a 1-hour tuning session.
4. NPC dialogue generation with personality constraints
Problem: Writing dialogue for 20 NPCs by hand is soul-crushing, and generic AI output sounds like a chatbot.
Prompt:
You are a narrative designer. Write 10 dialogue lines for a blacksmith NPC in a dark fantasy RPG. Character: gruff, distrustful of outsiders, lost his brother in a war. Tone: short sentences, no modern slang, no exclamation marks. Each line should hint at the war without explaining it directly. Output as a JSON array with fields: id, text, mood.
Real use case: A vertical slice needed ambient NPC barks. The mood field fed directly into a dialogue system that picked lines based on player reputation — hostile players got the distrustful lines, neutral ones got the practical trade lines.
Critical tip: Feed the model 3–4 examples of your existing dialogue first. Few-shot prompting is what separates "sounds like a game" from "sounds like a ChatGPT answer."
5. Weapon balance spreadsheet from design intent
Problem: Balancing 15 weapons by feel leads to one meta-dominant gun.
Prompt:
I'm balancing weapons for a top-down shooter. Here is my current table with columns: name, damage, fire_rate, reload_time, magazine_size. Target: time-to-kill (TTK) between 0.4s and 0.9s for all weapons against an enemy with 100 HP. Identify which weapons fall outside this range, suggest adjusted values, and explain the trade-off each change creates (e.g., faster TTK but smaller magazine).
| Weapon | Damage | Fire Rate (rps) | TTK (s) |
|---|---|---|---|
| SMG | 12 | 12 | 0.83 |
| Rifle | 25 | 5 | 0.80 |
| Pistol | 30 | 2 | 1.67 |
| Shotgun | 8x6 | 1.2 | 1.04 |
Real use case: The pistol was clearly underpowered. The model suggested raising fire rate to 3 rps and dropping damage to 22, bringing TTK to 0.76s while keeping it distinct from the rifle by rewarding accuracy over spray.
Where it saves time: A balance pass that used to take a full day of playtesting now starts from a data-driven baseline.
6. Shader and VFX helper prompts
Problem: Writing HLSL or Shader Graph nodes from scratch requires shader-specific knowledge most gameplay programmers don't have.
Prompt:
Write a Unity Shader Graph description (node-by-node) for a dissolve effect that uses a noise texture to erode the mesh over time. Parameters: dissolve amount (0–1), edge color, edge width. Explain which node controls the edge glow. Do not write HLSL — describe the graph so I can build it manually.
Real use case: A death animation needed a dissolve. The node-by-node description was faster to follow than a tutorial video, and the edge-color parameter became a reusable material property.
7. Debugging a stack trace
Problem: A NullReferenceException at 3 AM with a stack trace 40 lines long.
Prompt:
Here is a Unity stack trace. Explain the most likely cause, list the three most probable code locations that are null, and give me a one-line guard clause fix for each. Do not suggest try/catch as the primary solution.
Real use case: The trace pointed to a coroutine accessing a destroyed GameObject after scene reload. The fix was a single if (target == null) yield break; — 90 seconds instead of 30 minutes of log archaeology.
8. Build pipeline and CI configuration
Problem: Setting up automated builds for multiple platforms is a configuration rabbit hole.
Prompt:
Write a Unity Editor script (IBuildPlayer) that builds the project for Windows and Android from the command line, using BuildPipeline.BuildPlayer. Include a method callable from CI via -executeMethod. Set the output path from an environment variable. Add error handling that returns a non-zero exit code on failure.
Real use case: A solo dev wanted builds on every Git push. The script plugged into a GitHub Actions runner using Unity's official game-ci/unity-builder action. The environment-variable output path meant local and CI builds never collided.
Verify: Check Unity's official documentation on BuildPipeline.BuildPlayer and command-line arguments before shipping — the API signature changed between Unity versions.
9. State machine for enemy AI
Problem: Enemy behavior written as nested if-statements becomes unmaintainable by the third enemy type.
Prompt:
Refactor this enemy AI into a finite state machine. States: Idle, Patrol, Chase, Attack, Flee. Transitions: player enters detection radius → Chase, distance < attack range → Attack, health < 20% → Flee, player lost → Patrol. Implement as a base abstract class so new enemies can override transitions. Provide a Unity C# example with a simple enum-based state pattern.
Real use case: A stealth game with three enemy types. The base class meant the guard, dog, and turret shared 80% of the code, and each only overrode the detection logic.
10. Localization and text extraction
Problem: Hardcoded strings scattered across 200 scripts.
Prompt:
Find all hardcoded UI strings in these C# files and produce a CSV with columns: file, line, original_string, suggested_key. Use a naming convention like UI_MENU_START_BUTTON. Then show a Unity code snippet using Localization Package (com.unity.localization) to replace one example string.
Real use case: A game going to a publisher needed localization-ready builds. The CSV became the source file for translators, and keys followed a consistent convention instead of the original text1, text2 chaos.
11. Playtest feedback → prioritized task list
Problem: Fifty playtester comments in a spreadsheet, no idea what to fix first.
Prompt:
Here are 50 playtester comments. Categorize them into: bugs, balance issues, UX friction, feature requests. Rank by severity using frequency of mention and impact on the core loop. Output a prioritized table with columns: category, issue, frequency, suggested action. Flag anything mentioned only once as low priority.
Real use case: What felt like "everyone hates the inventory" turned out to be 4 comments out of 50, while 22 people mentioned the same camera jitter — a 10-minute fix that would have been buried under louder but rarer complaints.
A word on verification
Two rules keep this workflow honest. First, always test generated code in a real project before trusting it — LLMs confidently produce plausible-looking APIs that don't exist, especially in fast-moving engines like Unity 6 and Unreal 5.x. Second, treat balance suggestions and statistics as hypotheses, not facts. The model doesn't know your game's feel; it only knows the numbers you give it.
Use these prompts as a starting scaffold, not a replacement for design judgment. The time saved on boilerplate is time you reinvest into playtesting — and that's the only part of game development that AI still can't do for you.
If you're building a prototype right now, pick two prompts from this list and apply them to your current blocker today. The gap between "idea" and "playable" has never been shorter.
Sources to check: Unity Manual (docs.unity3d.com), Unreal Engine Documentation (dev.epicgames.com/documentation), Epic's C++ Coding Standard, and the Input System package documentation on the Unity Package Manager registry.
Comments