14 Prompts for Game Development: Unity, Unreal, and Godot

AI is transforming how games are made. Whether you're a solo dev or part of a studio, using the right prompts can save hours of manual work. In this article, I'll share 14 battle-tested prompts for Unity C#, Unreal Blueprints, and Godot. Each prompt includes a task, a ready-to-use prompt, and a real-world example result. Let's dive in.

1. Player Controller for Unity (C#)

Task: Generate a first-person controller with mouse look, sprint, and jumping.

Prompt:

Write a Unity C# script for a first-person player controller. Include mouse look, WASD movement, sprint on Shift, and jumping on Space. Use CharacterController. Add gravity and simple ground check. Add comments explaining each section.

Example result:

The AI outputs a FirstPersonController.cs script with a CharacterController reference, moveSpeed, sprintSpeed, jumpForce, and a groundCheck transform. The Update method handles mouse input, FixedUpdate applies movement, and there's a GroundCheck method to prevent double jumping. This saves about 15 minutes of boilerplate coding.

2. Procedural Terrain Generation in Unity

Task: Create a procedural terrain using Perlin noise.

Prompt:

Create Unity C# code that generates a simple terrain mesh from a heightmap using Perlin noise. Use a MeshFilter and MeshCollider. Allow for parameters like width, depth, height scale, and noise scale. Provide a public method GenerateTerrain() that can be called from an editor button.

Example result:

The AI returns a script that builds a grid of vertices, samples Perlin noise, and creates triangles. It also includes an ExecuteInEditMode attribute so you can generate terrain directly in the editor. This is perfect for prototyping landscapes (see the Unity Terrain docs for comparison).

3. Animation Trigger with Blend Trees in Unity

Task: Set up a simple blend tree for character movement.

Prompt:

Write a Unity C# script that controls a humanoid animation using a blend tree. The character has two floats: Speed and Direction. The script should update these floats based on velocity relative to the camera. Include a smooth dampening with Mathf.SmoothDamp.

Example result:

The script uses OnAnimatorMove and Update to calculate relative velocity and smoothly adjusts animator parameters. This is a common pattern for third-person games. For deeper knowledge, check the Unity Animation Blend Trees guide.

4. Blueprint for Enemy AI in Unreal Engine

Task: Create a basic enemy AI that patrols, detects players, and attacks.

Prompt:

Design an Unreal Engine Blueprint for a simple enemy AI. It should have three states: Patrol, Chase, and Attack. Use an AI Controller, a Pawn with a sight perception component, and a character movement component. Write the logic for state transitions and attacking when within range.

Example result:

The AI provides a flowchart-like description of the Blueprint, including nodes like AIPerception, AI MoveTo, and Attack. It also explains how to use a Behavior Tree to orchestrate the states. This is a solid starting point for NPC combat (see Unreal Engine AI Overview for more).

5. Health and Damage System in Godot (GDScript)

Task: Implement a health system with damage, healing, and death.

Prompt:

Write a GDScript class for a Health component in Godot. It should have max_health, current_health, signals for health_changed, died. Provide methods take_damage(amount) and heal(amount). Include a brief example of how to connect the signals in another node.

Example result:

A reusable Health.gd script with @export var max_health, a _ready() function that sets current health, and a custom take_damage method that clamps values and emits signals. Very clean and reusable across all objects.

6. Unity Editor Tool to Rename Assets

Task: Build a custom Unity menu item to batch-rename assets.

Prompt:

Write a Unity C# editor script that adds a menu item "Tools/Batch Rename". It should open a dialog window where the user can enter a prefix, a starting number, and a suffix. Then it renames all selected assets in the Project window using the format prefix_number_suffix. Include error handling for asset naming restrictions.

Example result:

The AI generates an EditorWindow class with appropriate MenuItem and Selection APIs. It also handles invalid characters and requires user confirmation. This is a huge time-saver for asset organization.

7. Unreal Blueprint for Interactable Doors

Task: Create an interactable door that opens with a key.

Prompt:

Write an Unreal Blueprint for a door actor that can be opened and closed with a key item. When the player presses E and has a key in inventory, the door rotates 90 degrees over 1 second. Use a timeline. Also include a red/green indicator light on the door.

Example result:

The Blueprint uses a BoxCollision for interaction, a Timeline for smooth rotation, and a HasKey check using an inventory variable. The indicator light is a simple PointLight whose color changes based on the key state. A practical example for puzzle games.

8. Inventory System in Godot

Task: Design a grid-based inventory with drag and drop.

Prompt:

Create a GDScript inventory system for Godot. Use a GridContainer filled with TextureButtons. Implement item pickup, stacking, and drag and drop between slots. Write a simple item resource class with name, icon, and max stack. Provide code for displaying the inventory.

Example result:

The script defines an Item resource class, an Inventory class with slot dictionaries, and UI components. The drag and drop logic uses Control.gui_input and Control.set_drag_preview. This is a great base for RPG inventories.

9. Optimize Unity Draw Calls

Task: Combine static meshes to reduce draw calls.

Prompt:

Write a Unity editor script that creates static batching for all selected GameObjects with a MeshRenderer. It should use StaticBatchingUtility.Combine. Also warn if any object has over 65535 vertices. Add a progress bar during baking.

Example result:

The AI outputs a script that checks vertex limits, creates a parent GameObject, and combines meshes. Static batching can dramatically improve performance on mobile. For more techniques, see the Unity draw call optimization docs.

10. Unreal Rigid Body Physics with Constraints

Task: Create a dynamic ragdoll effect.

Prompt:

Provide a step-by-step Blueprint setup for turning a skeletal mesh into a ragdoll. Use the SetSimulatePhyscis node and assign physical materials to bones. Explain how to blend between animations and ragdoll using GetAnimationBlendTime.

Example result:

The instructions include a screenshot-level description: on hit, call GetAnimationBlueprint → set blend time to 0.3 → play ragdoll by enabling simulation on the mesh. This is used in many action games. Reference to the Unreal Physics Constraints docs is helpful.

11. Godot Shader for Water with Waves

Task: Write a GLSL shader for a stylized water surface.

Prompt:

Create a GDScript shader for Godot that produces a stylized water effect with animated waves, transparency, and vertex offset. Use the shader_type spatial; and a time uniform. Add a normal map for reflections.

Example result:

The shader uses sine waves combined with noise to move vertices, and a distorted normal map for highlights. The result is a nice low-poly water effect. The code is compact and works in both spatial and canvas_item modes.

12. Multiplayer Sync in Unity Using Netcode

Task: Add network movement to a player object.

Prompt:

Write Unity C# code using Netcode for GameObjects. Make a simple player object with NetworkTransform and NetworkVariables. Show how to spawn the player when a client joins, and how to move using CharacterController with client-side prediction.

Example result:

The code uses NetworkBehaviour, [ServerRpc] for input, and [ClientRpc] for position corrections. It includes a NetworkManager setup note. For official guidance, refer to the Unity Netcode documentation.

13. Unreal User Interface with UMG

Task: Create a health bar HUD.

Prompt:

Write a Blueprint for an Unreal UMG widget that shows a health bar. The widget should have a progress bar, a text block with current/max health, and a function to update health when a custom event is called. Also add a damage flash effect using a Color Animation.

Example result:

The Blueprint uses a Bind function on the progress bar to return health percentage, and an event that triggers the animation. This is a common HUD element and saves time when setting up UI.

14. Godot Procedural Dungeon Generation

Task: Generate a random 2D dungeon using a grid.

Prompt:

Write GDScript that generates a 2D dungeon map using the random walk algorithm. Use a TileMap node and a Rect2 for the level bounds. Provide a seeded random for reproducibility and a visual grid export.

Example result:

The code creates a Dictionary mapping Vector2i to tile indices, with corridors and rooms. The seed allows testing different layouts. This is a great foundation for roguelike games.

Conclusion

These 14 prompts are just a starting point. The key to getting great results is to be specific with your engine, version, and requirements. I encourage you to copy these prompts, tweak them, and build a library that works for your workflow. What prompt saved you the most time? Let me know in the comments!

← All posts

Comments