10 Prompts for GameDev: Unity, Unreal Engine, and Godot

10 Prompts for GameDev: Unity, Unreal Engine, and Godot

In the modern game development pipeline, AI assistants are transforming how programmers write code, design systems, and prototype mechanics. Whether you are a solo developer exploring Godot or part of a studio working with Unity or Unreal Engine, using well-crafted prompts can save hours of manual coding and debugging. This guide collects ten tested prompts for the three most popular engines, with real-world examples and links to official documentation.

Quick Reference Table

# Engine Task Difficulty
1 Unity Player Controller Beginner
2 Unreal Pickup Item Beginner
3 Godot Health System Beginner
4 Unreal Inventory Intermediate
5 Unity Object Pooling Intermediate
6 Godot Scene Structure Beginner
7 Unreal AI Patrol Expert
8 Unity Dialogue System Intermediate
9 Godot Grid Movement Intermediate
10 Unreal Health Bar Widget Intermediate

How to Get the Most Out of Prompts

A good prompt is specific, contains context, and asks for a concrete deliverable. Always include the engine and language (e.g., Unity C#, Unreal Blueprints, Godot GDScript), the desired system or mechanic, and constraints such as performance requirements or naming conventions. For example, instead of saying write a camera script, say Write a Unity C# script for a third-person camera with mouse look and collision avoidance, using the Cinemachine package. The more context, the better.

Below are ten prompts that cover common game development tasks.

1. Unity C#: Player Movement Controller

Prompt:

Write a Unity C# script for a first-person player controller that supports walking, sprinting, jumping, and crouching. Use CharacterController for movement, handle gravity, and add an optional camera head-bob effect. Keep the code clean and commented.

Example usage:

This prompt works best with a code-focused AI model. The generated script typically includes [RequireComponent] attributes and uses Input.GetAxis. For the official API, check the Unity CharacterController docs.

using UnityEngine;

[RequireComponent(typeof(CharacterController))]
public class FPSController : MonoBehaviour
{
    public float walkSpeed = 5f;
    public float sprintSpeed = 10f;
    public float jumpHeight = 1.2f;
    public float gravity = -9.81f;

    private CharacterController controller;
    private float verticalVelocity;

    void Start() => controller = GetComponent<CharacterController>();

    void Update()
    {
        float horizontal = Input.GetAxis(\"Horizontal\");
        float vertical = Input.GetAxis(\"Vertical\");
        Vector3 move = (transform.right * horizontal + transform.forward * vertical);
        if (Input.GetKey(KeyCode.LeftShift))
            move *= sprintSpeed;
        else
            move *= walkSpeed;

        if (controller.isGrounded && Input.GetButtonDown(\"Jump\"))
            verticalVelocity = Mathf.Sqrt(jumpHeight * -2f * gravity);

        verticalVelocity += gravity * Time.deltaTime;
        move.y = verticalVelocity;
        controller.Move(move * Time.deltaTime);
    }
}

2. Unreal Engine Blueprint: Pickup Item

Prompt:

Create an Unreal Engine Blueprint for a simple pickup item. When the player overlaps with the collision box, the item should add to the player's inventory and play a sound. Explain where to place the collision component and how to set up the event graph.

Example:

The result is a Blueprint with Box Collision, Mesh, and Audio components. The overlap event calls an AddItem function on the player. For reference, see Unreal's Collision Overview. This pattern appears in many Epic sample projects like the Action RPG template.

3. Godot GDScript: Health and Damage System

Prompt:

Write a Godot 4 GDScript health system that can be attached to a CharacterBody2D. It should include signals for death and health changed, a damage function, and a simple invincibility timer.

Example result:

A reusable health.gd script:

extends Node
signal health_changed(current)
signal died

@export var max_health := 100
var current_health : int
var invincible := false

func _ready():
    current_health = max_health

func take_damage(amount):
    if invincible: return
    current_health = max(current_health - amount, 0)
    health_changed.emit(current_health)
    if current_health == 0:
        died.emit()

You can attach this to any entity. More details in the Godot Signals documentation.

4. Unreal Engine C++: Inventory Component

Prompt:

Implement an inventory system in Unreal Engine 5 C++ as an ActorComponent. It should support adding and removing items, storing them in a TArray of FInventoryEntry structs, and broadcasting an OnInventoryChanged delegate.

Example:

A proper implementation includes FInventoryEntry with ItemID and Count. The UInventoryComponent exposes AddItem and RemoveItem functions. Check the Unreal Engine C++ Programming guide for best practices. This component can then be added to any character blueprint.

5. Unity C#: Object Pooling System

Prompt:

Create a Unity C# object pool for bullets in a 2D shooter. The pool should pre-instantiate a set of game objects and provide a method to get and release objects. Use a Queue for efficiency.

Example result:

using System.Collections.Generic;
using UnityEngine;

public class BulletPool : MonoBehaviour
{
    public GameObject bulletPrefab;
    public int poolSize = 20;
    private Queue<GameObject> pool = new Queue<GameObject>();

    void Start()
    {
        for (int i = 0; i < poolSize; i++)
        {
            GameObject obj = Instantiate(bulletPrefab);
            obj.SetActive(false);
            pool.Enqueue(obj);
        }
    }

    public GameObject Get()
    {
        if (pool.Count > 0)
        {
            GameObject obj = pool.Dequeue();
            obj.SetActive(true);
            return obj;
        }
        return null;
    }

    public void Release(GameObject obj)
    {
        obj.SetActive(false);
        pool.Enqueue(obj);
    }
}

This uses Unity's modern ObjectPool class pattern, but the manual Queue is easier to understand for beginners.

6. Godot: Platformer Scene Structure

Prompt:

Design a Godot 4 scene tree for a 2D platformer with a player, tilemap, enemies, and camera. Explain each node and why that order is chosen.

Example:

The output might be:

  • World (Node2D)
  • TileMapLayer (TileMapLayer)
  • Player (CharacterBody2D)
    • CollisionShape2D
    • Sprite2D
    • Camera2D
  • Enemies (Node2D)
    • Enemy (CharacterBody2D)

Full guidance is in the Godot best practices guide. Separating player and enemies into their own branches keeps physics layers clean and allows easier code reuse.

7. Unreal Engine Blueprint: AI Patrol Behavior

Prompt:

Create an Unreal Engine Blueprint for an AI pawn that patrols between waypoints. Use a Behavior Tree with a Patrol task, or if a Behavior Tree is not available, explain an alternative with a timeline.

Example:

Using the official Behavior Tree Quick Start from Epic Games documentation, you set up a Blackboard with waypoint locations and a custom task. The AI runs the sequence: MoveTo, Wait, NextWaypoint. This is used in many third-person shooter AI systems.

8. Unity C#: Dialogue Trigger

Prompt:

Write a Unity C# script for a dialogue system that loads dialogue lines from a JSON file. The UI panel shows the text and advances on mouse click or Space key. Use UnityEngine.UIElements for the UI.

Example result:

A simple DialogueTrigger component reads JSON and populates a list of strings. The official JsonUtility manual helps with parsing. The code would include [Serializable] classes matching the JSON structure. This is a light-weight alternative to narrative plugins like Yarn Spinner.

9. Godot: Grid-Based Movement

Prompt:

Implement a grid-based movement system in Godot 4 using GDScript. The player moves one tile per key press with a tween animation. Use a Vector2 for current position.

Example:

The script captures input and tweens position to the next tile position. This technique is common in RPGs and roguelikes. See Tween documentation in Godot docs. Be careful to lock input during animation to avoid skipping tiles.

10. Unreal Engine C++: Health Bar Widget

Prompt:

Create a UMG Health Bar widget in Unreal Engine 5 C++. Bind the progress bar percentage to a player attribute and handle updates via delegates. Provide the BindWidget annotation.

Example:

The resulting widget class uses UPROPERTY(meta=(BindWidget)) for the UProgressBar* HealthBar. It updates when a delegate is broadcast from the character's UStatusComponent. See UMG UI Designer documentation. This keeps UI and gameplay decoupled.

Conclusion

These ten prompts are just the tip of the iceberg. The best way to become productive with AI-assisted game development is to start small, test every generated snippet in a real project, and iterate on the prompts with more constraints. Always cross-check with the official docs and community resources. Use these prompts as a base, and you'll soon have your own library of proven solutions.

If you found this useful, bookmark the article and share it with a fellow developer. Have your own favorite gamedev prompts? Let us know in the comments.

← All posts

Comments