15 Prompts for Game Development: Unity, Unreal Engine, and Godot

Introduction

Game development is a multidisciplinary craft that blends programming, art, and design. Whether you're building an indie title in Unity, a cinematic experience in Unreal Engine, or a lightweight 2D game in Godot, the right prompts can save hours of boilerplate work and help you focus on creativity. This collection brings you 15 practical, ready-to-use prompts — five for each engine — covering everything from movement scripts to AI behaviors. Each prompt includes a clear task, the exact prompt to feed into an AI assistant (like ChatGPT or Claude), and a concrete code example or blueprint snippet. These prompts are based on official documentation and best practices from the Unity Manual, Unreal Engine 5 Documentation, and Godot Documentation.

Unity Prompts (C#)

1. Player Movement (CharacterController)

Task: Create smooth third‑person player movement with camera following.
Prompt: "Generate a C# script for Unity using CharacterController that handles WASD movement, mouse look, and a jumping mechanic. Use Input.GetAxis for horizontal and vertical, and apply gravity manually. The camera should orbit the player using Mouse X and Mouse Y."
Example Result:

using UnityEngine;

public class ThirdPersonMovement : MonoBehaviour
{
    public float moveSpeed = 6f;
    public float jumpForce = 8f;
    public float gravity = 20f;
    public Transform cameraTransform;
    private CharacterController controller;
    private Vector3 velocity;
    private float xRotation = 0f;

    void Start()
    {
        controller = GetComponent<CharacterController>();
        Cursor.lockState = CursorLockMode.Locked;
    }

    void Update()
    {
        // Movement
        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");
        Vector3 move = transform.right * x + transform.forward * z;
        controller.Move(move * moveSpeed * Time.deltaTime);

        // Mouse look
        float mouseX = Input.GetAxis("Mouse X") * 2f;
        float mouseY = Input.GetAxis("Mouse Y") * 2f;
        xRotation -= mouseY;
        xRotation = Mathf.Clamp(xRotation, -90f, 90f);
        cameraTransform.localRotation = Quaternion.Euler(xRotation, 0f, 0f);
        transform.Rotate(Vector3.up * mouseX);

        // Jump & gravity
        if (controller.isGrounded && Input.GetButtonDown("Jump"))
            velocity.y = jumpForce;
        velocity.y -= gravity * Time.deltaTime;
        controller.Move(velocity * Time.deltaTime);
    }
}

2. Object Pooling

Task: Reuse bullets or particles without allocation.
Prompt: "Write a generic object pool in Unity C# that instantiates a set number of prefabs at start, stores them in a Queue, and provides a Get() and ReturnToPool() method. Ensure thread‑safety is not required."
Example Result:

using System.Collections.Generic;
using UnityEngine;

public class ObjectPool : MonoBehaviour
{
    [System.Serializable]
    public class Pool
    {
        public string tag;
        public GameObject prefab;
        public int size;
    }

    public List<Pool> pools;
    private Dictionary<string, Queue<GameObject>> poolDictionary;

    void Start()
    {
        poolDictionary = new Dictionary<string, Queue<GameObject>>();
        foreach (Pool pool in pools)
        {
            Queue<GameObject> objectPool = new Queue<GameObject>();
            for (int i = 0; i < pool.size; i++)
            {
                GameObject obj = Instantiate(pool.prefab);
                obj.SetActive(false);
                objectPool.Enqueue(obj);
            }
            poolDictionary.Add(pool.tag, objectPool);
        }
    }

    public GameObject SpawnFromPool(string tag, Vector3 position, Quaternion rotation)
    {
        if (!poolDictionary.ContainsKey(tag)) return null;
        GameObject obj = poolDictionary[tag].Dequeue();
        obj.SetActive(true);
        obj.transform.position = position;
        obj.transform.rotation = rotation;
        poolDictionary[tag].Enqueue(obj);
        return obj;
    }
}

3. State Machine for Enemy AI

Task: Finite state machine for patrolling, chasing, and attacking.
Prompt: "Implement a simple state machine in Unity C# for an enemy that patrols between waypoints, chases the player when detected, and attacks when close. Use an Enum for states and a base State class."
Example Result:

public enum EnemyState { Patrol, Chase, Attack }

public class EnemyAI : MonoBehaviour
{
    public EnemyState currentState = EnemyState.Patrol;
    public Transform[] waypoints;
    public float detectionRange = 10f;
    public float attackRange = 2f;
    private int currentWaypoint;
    private Transform player;

    void Update()
    {
        switch (currentState)
        {
            case EnemyState.Patrol:
                Patrol();
                break;
            case EnemyState.Chase:
                Chase();
                break;
            case EnemyState.Attack:
                Attack();
                break;
        }
    }

    void Patrol()
    {
        // move towards waypoint, switch when reached
    }

    void Chase()
    {
        // move to player position
    }

    void Attack()
    {
        // deal damage on cooldown
    }
}

4. Coroutine Timer

Task: Delayed action without Update overhead.
Prompt: "Write a Unity C# method that uses a coroutine to count down from a given time and then invokes an action. Include an optional callback parameter."
Example Result:

public void StartTimer(float duration, System.Action onComplete)
{
    StartCoroutine(TimerCoroutine(duration, onComplete));
}

private IEnumerator TimerCoroutine(float duration, System.Action onComplete)
{
    float remaining = duration;
    while (remaining > 0)
    {
        remaining -= Time.deltaTime;
        yield return null;
    }
    onComplete?.Invoke();
}

5. Event System with Observer Pattern

Task: Decoupled communication between components.
Prompt: "Create a simple event system in Unity C# using static actions. Provide a GameEvents class with an OnGameOver event and a method to trigger it."
Example Result:

public static class GameEvents
{
    public static System.Action OnGameOver;
    public static System.Action<int> OnScoreChanged;

    public static void TriggerGameOver()
    {
        OnGameOver?.Invoke();
    }

    public static void TriggerScoreChanged(int newScore)
    {
        OnScoreChanged?.Invoke(newScore);
    }
}

Unreal Engine Prompts (Blueprints)

6. Player Movement in BP

Task: Simple first-person movement using Enhanced Input.
Prompt: "Describe the blueprint nodes needed for first‑person movement in Unreal Engine 5: use a CharacterMovementComponent, an Enhanced Input Action for Move, and a camera boom. Show the event graph setup."
Example Result:
- Create a character BP with CapsuleComponent, ArrowComponent, and a spring arm with camera.
- In Event Graph: Event BeginPlay → Setup Player Input Component (InputComponent).
- Bind Input Action (Move) → get Action Value (Axis 2D). Break the Vector2D into X and Y. AddMovementInput (Get Control Rotation's X vector times Y, and Y vector times X).
- For mouse look: bind Look action → add Yaw and Pitch input.

7. Timed Door that Opens on Proximity

Task: Door that opens when player nears, closes after delay.
Prompt: "Create a Blueprint actor for a sliding door that opens when the player overlaps a trigger sphere, stays open for 2 seconds, then closes. Use timelines for smooth animation."
Example Result:
- Create a BP Actor with a BoxCollision (trigger). On Component Begin Overlap → Play Timeline (DoorOpenCurve). Timeline output track → Set Actor Location (interpolate from closed to open offset).
- After 2 seconds (delay node), play reverse timeline.

8. Widget Health Bar

Task: UI health bar that updates dynamically.
Prompt: "Create a HUD Widget health bar in Unreal Engine that changes color from green to red as health decreases. Use a Bind event for the health percentage."
Example Result:
- Create Widget > Progress Bar. Bind Percent → Get Player Pawn > Player Health / Max Health.
- In Event Tick of the HUD: get Progress Bar's fill color using a lerp (green when 1.0, red when 0.0).

9. Gate Opening with Timeline

Task: Smooth door rotation using Timeline in Blueprints.
Prompt: "Show how to use a Timeline to rotate a gate by 90 degrees over 1 second. Add an open/close toggle."
Example Result:
- Add Timeline node. Create a float track (0→1). Output to Lerp (Rotator). Target rotation = (0, 90, 0). Interp result → Set Actor Rotation.

10. AI Perception for Guard

Task: AI that sees player using AI Perception.
Prompt: "Set up an AIController that uses AI Perception component to sense the player via sight. When the player is seen, the AI moves to the player's last known location."
Example Result:
- Add AI Perception component to AIController. Configure Sight config (sight radius, lose sight radius).
- On Perception Updated → check if Stimulus is success → if yes, set Blackboard key "TargetLocation" to Stimulus.Location.

Godot Prompts (GDScript)

11. 2D Player Movement

Task: Top-down movement with KinematicBody2D.
Prompt: "Write GDScript for a KinematicBody2D that moves with WASD, speeds up when shift is held, and uses move_and_slide()."
Example Result:

extends KinematicBody2D

var speed = 200
var sprint_multiplier = 1.5

func _process(delta):
    var direction = Vector2.ZERO
    if Input.is_action_pressed("ui_right"):
        direction.x += 1
    if Input.is_action_pressed("ui_left"):
        direction.x -= 1
    if Input.is_action_pressed("ui_down"):
        direction.y += 1
    if Input.is_action_pressed("ui_up"):
        direction.y -= 1
    direction = direction.normalized()

    var current_speed = speed
    if Input.is_action_pressed("sprint"):
        current_speed *= sprint_multiplier

    move_and_slide(direction * current_speed)

12. Simple Health System

Task: Health variable with death.
Prompt: "Create a Health component in Godot (Area2D) that takes damage, emits a signal when health reaches zero, and can be healed."
Example Result:

extends Area2D

signal died
signal health_changed(new_health)

var max_health = 100
var current_health = 100 setget set_health

func set_health(value):
    current_health = clamp(value, 0, max_health)
    emit_signal("health_changed", current_health)
    if current_health <= 0:
        emit_signal("died")

func take_damage(amount):
    self.health -= amount

func heal(amount):
    self.health += amount

13. Scene Transition with Fade

Task: Smooth fade to black when switching scenes.
Prompt: "Write a GDScript that creates a ColorRect overlay, animates its modulate.a from 0 to 1, then changes scene using change_scene_to_file()."
Example Result:

extends CanvasLayer

func fade_to_scene(path: String, fade_duration: float = 1.0):
    var rect = ColorRect.new()
    rect.color = Color.BLACK
    rect.rect_size = get_viewport().size
    add_child(rect)

    var tween = create_tween()
    tween.tween_property(rect, "modulate:a", 1.0, fade_duration)
    yield(tween, "finished")
    get_tree().change_scene_to_file(path)

14. Inventory System (Basic)

Task: Simple inventory with pickup.
Prompt: "Implement a basic inventory in Godot as a singleton (Autoload) that stores items as Dictionary and provides add/remove/contains functions."
Example Result:

extends Node

var items = {}

func add_item(item_name: String, quantity: int = 1):
    if items.has(item_name):
        items[item_name] += quantity
    else:
        items[item_name] = quantity

func remove_item(item_name: String, quantity: int = 1) -> bool:
    if not items.has(item_name) or items[item_name] < quantity:
        return false
    items[item_name] -= quantity
    if items[item_name] <= 0:
        items.erase(item_name)
    return true

func has_item(item_name: String) -> bool:
    return items.has(item_name) and items[item_name] > 0

15. Parallax Background

Task: Scroll layers at different speeds for a 2D game.
Prompt: "Write a GDScript for a ParallaxBackground node that moves multiple ParallaxLayer children at different scroll speeds based on camera motion."
Example Result:

extends ParallaxBackground

@export var scroll_speed = Vector2(0.1, 0.1)

func _process(delta):
    scroll_offset += scroll_speed * delta
    # Each ParallaxLayer can have its own motion_scale set in editor

Conclusion

These 15 prompts cover the most common tasks you'll face when starting a game project in Unity, Unreal, or Godot. Use them as a foundation, tweak the parameters, and combine them to build more complex systems. For deeper dives, consult each engine's official documentation: Unity Manual, Unreal Engine 5 Docs, and Godot Documentation. Happy prototyping!

← All posts

Comments