How to Use AI for Godot Games (and Get GDScript That Works)
Use AI for Godot the smart way: prompts that get working Godot 4 GDScript, a Godot 3 to 4 fix table, debugging with AI, plus safety and store rules.

Yes, AI can help you make a Godot game. Chat assistants such as ChatGPT, Claude and Gemini, and code helpers such as GitHub Copilot, can plan features, write GDScript and explain errors. The catch: they often write old Godot 3 code that breaks in Godot 4, and they cannot see your project. This guide gives you prompts that work, a Godot 3 to 4 fix table, a safe debugging routine and the rules for AI content in stores.
What AI can and cannot do in Godot
Godot has no built-in AI assistant, so you use an outside tool next to the editor. That works well, because GDScript is plain text you can copy and paste. But an AI only knows what you tell it. It cannot click around your editor, and it has never seen your scenes.
- Explaining code line by line
- Writing small scripts: movement, timers, menus
- Turning an error message into plain English
- Breaking a feature into small steps
- Quizzing you on what you just learned
- Knowing your scene tree and node names
- Knowing which signals you connected in the editor
- Remembering which Godot version you use
- Big changes across many files
- Deciding whether your game is fun
Which AI tools work with Godot
- Chat assistants such as ChatGPT, Claude, Gemini and Microsoft Copilot. You paste code and ask questions in a browser or app. This is the best way to start, because you see and check every answer.
- Code editor assistants such as GitHub Copilot in Visual Studio Code. They suggest code while you type. Install Godot's official VS Code extension. Then open Editor > Editor Settings > Text Editor > External, turn on Use External Editor and set Exec Path to VS Code.
- AI agents, tools that open and edit the files in your project folder by themselves. With community add-ons, some can even run your game and read its errors. They are powerful, but they can change many files at once, so back up first.
- Godot add-ons from the community that put an AI chat panel inside the editor. Some run a local AI model on your own computer. Add-ons run code inside your editor, so install only well-reviewed ones.
You do not need a paid plan to start. Free tiers have daily limits, but that is plenty when you work on one feature at a time.
Many AI services require users to be at least 13 and need a parent's permission under 18. Some, such as Claude.ai, are for adults (18+) only. Rules differ by country and change often, so read each tool's terms with a parent before you sign up.
Why AI writes broken Godot code
Godot 4 came out in 2023 and renamed many nodes, functions and keywords. AI tools learned from years of Godot 3 tutorials, forum posts and videos. So they often mix the two versions, even when you ask for Godot 4. Some also borrow ideas from Unity, such as Update() or GameObjects, which do not exist in Godot.
You can spot old code quickly. Watch for KinematicBody2D, export var without an @ sign, yield, or move_and_slide() with values inside the brackets. Godot 4 then shows errors like this one:
Too many arguments for "move_and_slide()" call.
Expected at most 0 but received 2.
AI also invents functions that sound right but do not exist. It might write is_touching_ground(), for example, when the real function is is_on_floor(). Press F1 (Opt+Space on a Mac) to open Godot's built-in help and search for the name. If the help has never heard of it, the AI made it up.
Godot 3 to Godot 4 fix table
Keep this table open while you work. If an AI answer uses something from the middle column, ask for the Godot 4 version or fix it yourself. Godot's own upgrade guide lists even more changes.
| What you want | Old Godot 3 code | Godot 4 code |
|---|---|---|
| A character you move with code | KinematicBody2D | CharacterBody2D |
| Move it | velocity = move_and_slide(velocity, Vector2.UP) | Set velocity, then call move_and_slide() |
| Basic 2D and 3D nodes | Sprite, Position2D, Spatial | Sprite2D, Marker2D, Node3D |
| Show a variable in the Inspector | export var speed = 200 | @export var speed := 200.0 |
| Get a node when the scene is ready | onready var hp = $HP | @onready var hp = $HP |
| Wait for a signal | yield(timer, "timeout") | await timer.timeout |
| Connect a signal in code | connect("pressed", self, "_on_pressed") | pressed.connect(_on_pressed) |
| Send a signal | emit_signal("died") (still works) | died.emit() |
| Make a copy of a scene | scene.instance() | scene.instantiate() |
| Load another level | get_tree().change_scene(path) | get_tree().change_scene_to_file(path) |
| A random decimal number | rand_range(1, 5) | randf_range(1.0, 5.0) |
| Turn degrees into radians | deg2rad(90) | deg_to_rad(90) |
| Read or write a file | File.new() | FileAccess.open(path, FileAccess.READ) |
| Animate a value smoothly | A Tween node | create_tween().tween_property(...) |
| Zoom the camera in | zoom = Vector2(0.5, 0.5) | zoom = Vector2(2, 2) |
| Run a script in the editor | tool | @tool |
| Check if an array is empty | list.empty() | list.is_empty() |
| Paint tile levels | One TileMap with layers | A TileMapLayer node per layer (Godot 4.3+) |
Note the camera row: Godot 4 flipped the zoom, so bigger numbers now mean closer. AI tools get this backwards all the time.
Prompts that get working GDScript
A prompt is the message you send to the AI. Good prompts for Godot have five parts. Each part removes one reason for the AI to guess.
Here is a full prompt for a new feature. Swap in your own node names and paste your real script where it says so:
I'm using Godot 4.7 with GDScript (not Godot 3, not C#).
My player scene:
Player (CharacterBody2D) with the script player.gd
├─ Sprite2D
├─ CollisionShape2D
└─ Camera2D
Input actions: move_left, move_right, jump.
Here is player.gd: [paste the whole script]
Goal: add a double jump. The player may jump once more
in the air, and it resets when they land.
Rules: typed GDScript, a comment on each block, change
as little as possible, no Godot 3 syntax.
Then explain what each new line does.
The quickest way to share your scene tree is to type it like above: one node per line, with its type, and children indented. Many chat tools also accept a screenshot of the Scene dock. Your .tscn scene files are plain text as well, but they are long, so paste one only when exact property values matter.
Three more habits help. Ask for one feature at a time, not a whole game. Tell the AI not to rename your nodes or actions. And when an answer looks long, ask: "Can you do this in fewer lines?"
Long chats cause their own trouble. After a while, the AI forgets details from the start, such as your node names. When answers start to drift, open a new chat. Paste a short summary: your Godot version, your scene tree and the script you are working on.
AI is also a patient tutor. Paste any code you do not understand, including code from a tutorial, and send this:
Explain this GDScript line by line for a beginner.
Then give me one small exercise to check I understood.
[paste the code]
Fix errors with AI and the Debugger
Godot shows problems in two places. Mistakes it finds before running, such as typos, appear in red at the bottom of the script editor. Click one to jump to its line. Problems that happen while the game runs appear in the Debugger panel's Errors tab, with the script name and line number.
- Read the error yourself first. Often the line number and the message are enough.
- Copy the full error text. Not just "it doesn't work". The exact words matter.
- Send it with context: the script, the line, and your scene tree.
- Ask for the cause before the fix. Understanding the cause stops the same bug from coming back.
- Make the smallest change and test again. If two fixes in a row fail, stop. Undo, then add
print()lines to see what your variables really hold.
Godot 4.7, GDScript. When I press F5 I get this error:
Invalid assignment of property or key 'text' with
value of type 'String' on a base object of type
'null instance'.
It points to line 9 of main.gd:
coin_label.text = "Coins: %d" % coins
My scene tree: Main (Node2D) > HUD (CanvasLayer)
> ScoreLabel (Label). Here is main.gd: [paste it]
First explain the cause in simple words, then show
the smallest fix.
With the scene tree included, the AI can spot the real problem at once. The script looks for a node called CoinLabel, but the label in the tree is named ScoreLabel. So coin_label holds nothing, which Godot calls a "null instance". Without the tree, the AI would have to guess. You can also pause the game on any line. Click left of the line number to set a red breakpoint, then run the game and check your values in the Debugger.
A safe AI workflow, step by step
The goal is a finished game and new skills, not a pile of pasted code you cannot fix. This loop keeps you in control:
- Write the plan yourself. Describe your game in five sentences and list its first features. Then ask the AI what is missing or too big.
- Build scenes by hand. Add nodes, shapes and sprites in the editor yourself. Ask the AI how if you get stuck, because it cannot click for you.
- Back up before every paste. Copy your project folder, or use Git, a tool that saves versions of your files. When you create a project, Godot can add the basic Git files for you.
- Test it yourself. Play the feature in the game, not just in your head. Try to break it on purpose.
- Learn from each answer. Write one sentence about what the new code does. Then try the next similar feature without AI.
New to the language? GDScript for beginners teaches what the AI's code means. For a first project to practise on, follow how to make a game in Godot 4.
AI art, sound and store rules
Code you write in Godot is yours: the engine's MIT licence puts no limits on your game. AI output is less simple. Most AI services let you use what they generate, but check their terms. In some countries, including the United States, work made purely by AI cannot be copyrighted, so others may be free to copy it. And asking AI for a famous character or song does not make it legal to use.
- Steam asks you to describe AI-generated content that ships with your game, such as art, sound or text, in its content survey. Valve says time saved with AI tools, such as code helpers, is not the focus. What counts is AI content that players see or hear.
- itch.io asks you to mark generative AI content in the AI Disclosure section of your project's edit page. Its quality guidelines say it strictly enforces this for game assets, soundtracks, comics and books. Projects that disclose AI appear on an "AI Assisted" browse page.
Store rules change often, so check the official pages before you publish. To make art with AI, or decide when hand-made art is the better choice, read how to make game art with AI.
Safety rules for young developers
- Never paste secrets into an AI chat: passwords, API keys (secret codes that unlock online services), store logins or your Android keystore password.
- Keep personal details out: your full name, address, school or photos.
- Ask before you install add-ons or agent tools, and never run a command you do not understand.
- Back up your project before letting any tool change files.
- Check licences. AI images, add-ons and downloaded assets each have their own rules for games you share or sell.
- Ask a person when you are stuck. The Godot forums are friendly when you show your own code and what you already tried.
FAQ
Can ChatGPT write GDScript?
Yes, ChatGPT and similar assistants can write GDScript, but they often mix in old Godot 3 code. Name your exact Godot version, describe your scene tree and test every answer.
Is there an official Godot AI assistant?
No, Godot has no built-in AI assistant as of November 2026. People use outside chat tools, code editors with AI built in, or community add-ons.
Which AI is best for Godot?
No single AI is best for Godot, because your prompt matters more than the brand. Give two free tools the same task, with your version and scene tree, and keep the one whose code runs.
Can AI make a whole Godot game for me?
Not a good one. AI can write parts, but you still build the scenes, connect them, test them and make the game fun. Large games that are mostly AI code become very hard to fix.
Is it cheating to use AI to learn Godot?
No, as long as you use it like a tutor: ask why, change the code yourself and make sure you understand it. It turns into a problem when you paste code you cannot explain.
Do I have to say that I used AI?
Often, yes. Steam wants AI-generated content in your game disclosed, and itch.io asks you to tag it. Using a code assistant only for help is treated differently, so read each store's current rules.
Made a Godot game, with or without AI?
List it free in the Mutop100 indie games directory: a game page with your trailer and store links, plus a spot among the Godot games players vote on.
List your game free