Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Game Development with Godot & GDScript  Module 1 – Godot, the editor and your first scene

Godot 4.7: install, versions and renderers

Install Godot 4.7.2, standard or .NET, confirm the exact version from a terminal, choose Forward+, Mobile or Compatibility, and know when to upgrade.

  • Beginner
  • 20 minutes
  • Examples run with godot 4.7.2-stable and Python 3.14.8
  • By MySmartCoPilot
Free lesson, Pro answers: 20 minutes
Free: the whole lesson. With a pass: the model answers to its 2 interview questions.

What you will learn

  • Explain what Godot's MIT licence allows and what it asks of a game you sell
  • Install Godot 4.7.2 and confirm the exact version and build from a terminal
  • Decide from the release policy when a project should take a patch or a minor release
  • Choose the Forward+, Mobile or Compatibility renderer for the devices a game targets
  • Recognise Godot 3 code in a tutorial by the errors Godot 4 prints for it
What you’ll learn

What you will learn

  • Explain what Godot's MIT licence allows and what it asks of a game you sell
  • Install Godot 4.7.2 and confirm the exact version and build from a terminal
  • Decide from the release policy when a project should take a patch or a minor release
  • Choose the Forward+, Mobile or Compatibility renderer for the devices a game targets
  • Recognise Godot 3 code in a tutorial by the errors Godot 4 prints for it
On this page

One line from a Godot 3 tutorial, export var speed = 200, stops a Godot 4.7.2 script before it runs, and the volumetric fog of a Forward+ game is simply missing from its web build, which Godot draws with another renderer. Many first-day problems with Godot come from the download, the version or the renderer, not from the game.

Here you install Godot 4.7.2, the release every example in this track ran on, and confirm it from a terminal. Then you read what Godot’s version numbers and support table promise, choose a renderer for the devices your game targets, and learn to spot Godot 3 code by the errors Godot 4 prints for it.

Godot is one program, and its MIT licence asks for one thing

Godot is a game engine and its editor in one program. The same download opens the Project Manager, edits your scenes and scripts, runs your game and, with the export templates (a separate download of 1.28 GB), exports it for every platform Godot supports. Games are made of scenes, which are trees of nodes, and scripted in GDScript, the language this track teaches; a separate build of Godot adds C#. Started with the --headless option, the program runs with no window at all. That is headless mode: Running Godot with no window and no sound output, started with the --headless option. Servers, build machines and scripts started from a terminal run Godot this way., and every program on this page ran that way on Godot 4.7.2, so you can read exactly what it printed.

Godot is released under the MIT licence: A short permissive licence: anyone may use, change, share and sell the software, as long as its copyright notice and licence text are included in copies. Godot is released under it.. Its documentation sums it up as no strings attached and no royalties: your game is yours, under any licence you choose, including a commercial one. The engine can tell you itself what it asks in return. This script reads the licence text and the list of credited components from the running engine:

licence_report.gd: the licence, as the engine reports it GD · licence_report.gd
extends SceneTree

# What the engine itself says about its licence and the code it includes.
func _initialize() -> void:
	var text := Engine.get_license_text()
	print("Godot's licence: %d lines of text" % text.split("\n").size())
	for paragraph in text.split("\n\n"):
		if paragraph.begins_with("The above copyright notice"):
			print("Its one condition: ", paragraph.replace("\n", " "))
	var parts := Engine.get_copyright_info()
	print("Components credited: %d, the first is %s" % [parts.size(), parts[0].name])
	print("Licences among them: %d" % Engine.get_license_info().size())
	quit()
Godot 4.7.2 describes its own licence Python · licence_session.py
from session import files, run

files("licence_report.gd")
run("""
godot --headless --no-header --script licence_report.gd
""")

Output

$ godot --headless --no-header --script licence_report.gd
Godot's licence: 21 lines of text
Its one condition: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Components credited: 102, the first is Godot Engine
Licences among them: 19

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 licence_session.py

That one condition is the whole obligation: Godot’s copyright notice and licence text must travel with every copy of the engine, and your game contains one. The licence guide lists ways that count, and one is enough: a credits screen, a licences screen in the menus, a text file shipped beside a desktop build, or an output log players can read.

The 102 components are the engine itself plus the libraries it includes, such as Jolt Physics, FreeType and Mbed TLS, under 19 licences between them. The guide asks you to credit those too. Engine.get_copyright_info() and Engine.get_license_info() give a licences screen the exact list from the running engine, so the screen stays right after every upgrade.

Leaving the notice out of a closed-source game

A closed-source game still contains Godot, so it still needs the notice. Keeping the licence in your repository is not enough, because players never see the repository: put the text on a screen or in a file that ships with the game.

Checkpoint

Check: What the MIT licence asks of a game

  1. Question 1 of 2 You want to sell a closed-source game made with Godot 4.7.2. What does Godot's licence require?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Include Godot's copyright notice and licence text somewhere in the game

    The licence text the engine prints has one condition: the copyright notice and the permission notice must be included in all copies or substantial portions of the software. A game contains the engine, so the notice goes into the game; nothing else about your game, its licence or its price is affected.

  2. Question 2 of 2 Which of these satisfy the licence condition for a desktop game? Choose every one that does.

    Choose every answer that is right.

    A hint

    The documentation says one way is enough, as long as players can reach the text.

    Show the answer: Question 2 of 2

    Answer:

    • A "Third-party licences" screen opened from the settings menu
    • The licence text at the bottom of the credits screen
    • A text file with the licence shipped beside the game's executable

    The documentation lists a credits screen, a licence screen, an accompanying file on desktop and a readable output log, and you need only one of them. A copy that stays in your repository does not travel with the game.

Install the standard build, then let the terminal confirm it

Every desktop system has two builds of Godot 4.7.2. The standard build runs GDScript, and this track uses it. The .NET build adds C# and needs Microsoft’s .NET SDK beside it. Neither has an installer: the download page says to extract the zip and run what is inside. Copies from Steam, itch.io and the Epic Games Store are standard builds too, without C#.

System Standard download Size The program to run
Windows Godot_v4.7.2-stable_win64.exe.zip 86 MB the .exe inside it
macOS Godot_v4.7.2-stable_macos.universal.zip 171 MB Godot.app/Contents/MacOS/Godot
Linux Godot_v4.7.2-stable_linux.x86_64.zip 78 MB the binary inside it, on your PATH as godot

The macOS build is universal: one app for Apple Silicon and Intel Macs. The command-line tutorial also names package managers that put godot on your PATH for you: brew install godot on macOS, and on Windows scoop install godot after scoop bucket add extras. Step through the whole route, from choosing a build to the line that confirms it:

Interactive · stage by stage From the download page to a confirmed Godot 4.7.2 Step through the install on any of the three desktop systems, from choosing a build to the line the terminal prints.
From the download page to a confirmed Godot 4.7.2, step 7 of 7. Showing Choose a build, Download the zip, Extract and run (Project Manager opens), Run godot --version, Compare the output (4.7.2 and ed1daf0bf), Ready to make a project. In focus: Ready to make a project.another versionChoose a buildstandard, or .NET for C#Download the zip78 to 171 MBExtract and runProject Manager opensRun godot --versionin a terminalCompare the output4.7.2 and ed1daf0bfReady to make a project

The drawing shows the whole scene; its 7 steps are listed below.

Every step as text
  1. Pick standard or .NET. Every system has two builds of 4.7.2. The standard build runs GDScript, which this track uses; the .NET build adds C# and needs Microsoft's .NET SDK. Store copies from Steam, itch.io and the Epic Games Store have no C#.
  2. One zip per system. The standard downloads are Godot_v4.7.2-stable_win64.exe.zip (86 MB), Godot_v4.7.2-stable_macos.universal.zip (171 MB, Apple Silicon and Intel) and Godot_v4.7.2-stable_linux.x86_64.zip (78 MB).
  3. Nothing to install. Extract the zip and start the program it contains; the official page says Godot is self-contained. The first start opens the Project Manager, where projects are created and opened.
  4. Ask the program itself. In a terminal, run the program with --version. On a Mac it is Godot.app/Contents/MacOS/Godot; on Linux put the binary on your PATH as godot; on Windows run the .exe from its folder.
  5. Read the answer. Godot 4.7.2 prints 4.7.2.stable.official.ed1daf0bf. The last part is the commit the release was built from, the same nine characters the 4.7.2 release notes give.
  6. Wrong version? Go back. An older patch, a preview build or a Godot 3 binary prints something else. Fetch the 4.7.2 build before you start a project, so your results match the examples in this track.
  7. Confirmed. The version matches, so the editor, the engine and the command-line tool you will use are the release this track's examples ran on.

The terminal step is worth doing even when the editor already opens, because it tells you exactly which build you have. This script asks the engine the same question in more detail:

version_report.gd: which Godot is running GD · version_report.gd
extends SceneTree

# Which Godot runs this script. Run it with: godot --headless --script version_report.gd
func _initialize() -> void:
	var info := Engine.get_version_info()
	print("Version: ", info.string)
	print("Major %d, minor %d, patch %d" % [info.major, info.minor, info.patch])
	print("Status: %s, build: %s, commit: %s" % [info.status, info.build, info.hash.left(9)])
	print("As one number: 0x%06x" % info.hex)
	print("Debug build: ", OS.is_debug_build())
	print("At least 4.7.2: ", info.hex >= 0x040702)
	print("As text, \"4.10.0\" < \"4.7.2\": ", "4.10.0" < "4.7.2")
	quit()
The version, asked two ways, on Godot 4.7.2 Python · version_session.py
from session import files, run

files("version_report.gd")
run("""
godot --version
godot --headless --no-header --script version_report.gd
""")

Output

$ godot --version
4.7.2.stable.official.ed1daf0bf
$ godot --headless --no-header --script version_report.gd
Version: 4.7.2-stable (official)
Major 4, minor 7, patch 2
Status: stable, build: official, commit: ed1daf0bf
As one number: 0x040702
Debug build: true
At least 4.7.2: true
As text, "4.10.0" < "4.7.2": true

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 version_session.py

4.7.2.stable.official.ed1daf0bf has four parts: the version, the status (stable, where a preview would say beta or rc1), the build name (official, a binary the Godot team built) and the first nine characters of the commit, the same nine the 4.7.2 release notes give. Engine.get_version_info() returns the same parts in a dictionary, and its hex entry packs major, minor and patch into one byte each: 4.7.2 is 0x040702. The editor binary also reports itself as a debug build; an exported game running on a release template reports false there.

Comparing versions as text

The last line of the run shows the trap: compared as text, “4.10.0” comes before “4.7.2”, because text is compared one character at a time and “1” sorts before “7”. Compare numbers instead: Engine.get_version_info().hex >= 0x040702 orders every version correctly.

Checkpoint

Check: Installing and confirming Godot 4.7.2

  1. Question 1 of 2 godot --version prints 4.7.2.stable.official.ed1daf0bf. Which part tells you that the Godot team built this binary?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: official

    The four parts are the version (4.7.2), the status (stable), the build name (official) and the first nine characters of the commit hash (ed1daf0bf), which match the 4.7.2 release notes.

  2. Question 2 of 2 A script must refuse to run on anything older than Godot 4.6.1. Which test does that correctly on every version?

    Choose one answer.

    A hint

    Remember what the text comparison said about "4.10.0" and "4.7.2".

    Show the answer: Question 2 of 2

    Answer: Engine.get_version_info().hex >= 0x040601

    The hex value of 4.6.1 is 0x040601, one byte per number. Comparing these numbers orders versions correctly, while comparing version strings as text puts 4.10.0 before 4.7.2, as the recorded run shows.

The version number says what an upgrade will change

Godot numbers its releases major.minor.patch and, as its release policy puts it, loosely follows semantic versioning. Each number changes for a different reason, and that reason tells you how carefully to upgrade:

A change of For example What the release policy says it brings When to take it
Major 3 to 4 large compatibility breaks: a conversion tool plus manual fixes as a planned port
Minor 4.6 to 4.7 new features, with narrow breaking changes in some areas on a branch, after reading the migration guide
Patch 4.7.1 to 4.7.2 bug and security fixes that stay backward compatible soon, after a commit

Support follows the same numbers. Several minor series are supported at once, but within a series only its latest patch release: A release that changes only the third number of a version, such as 4.7.1 to 4.7.2. It brings bug and security fixes that stay compatible, and only the latest patch of a series is supported.: on a problem with 4.7.1, the policy’s answer is to upgrade to 4.7.2 and test again. Walk through the Godot 4 releases that this track’s lessons depend on; each tag is the support that series has while 4.7 is the newest:

Timeline · 7 events in order Godot 4, one minor release at a time Walk through the releases in order. The tag on each says how the release policy supports that series now.
  1. 4.0

    The break with Godot 3 end of life

    A major release: Godot 3 projects move over with a converter plus fixes by hand, because nodes such as KinematicBody2D were renamed and GDScript keywords such as export, onready and yield were replaced. The series ended with 4.0.4.

  2. 4.3

    TileMapLayer and single-threaded web export end of life

    TileMapLayer takes over from the layers of the old TileMap node, which still works for now, and web exports can run without threads again, so they work in more browsers and need no special server settings.

  3. 4.4

    A UID for every file, typed dictionaries end of life

    Scripts and shaders get a .uid file beside them, GDScript gains typed dictionaries, the editor can embed the running game on Linux, Windows and Android, Jolt Physics arrives as a built-in option, and Apple Silicon Macs render through Metal.

  4. 4.5

    Abstract classes and variadic functions partial support

    GDScript gains abstract classes and functions that take any number of arguments, the embedded game window reaches macOS, and Control nodes begin to support screen readers through AccessKit, still marked experimental.

  5. 4.6

    Modern editor theme, Jolt by default full support

    The Modern theme becomes the editor default and the bottom panels become docks you can move or float. New 3D projects use Jolt Physics, scene files store a unique id for every node, and new Windows projects render with Direct3D 12.

  6. 4.7

    Asset Store, area lights and HDR output full support

    The Asset Store replaces the Asset Library, AreaLight3D adds rectangular lights, HDR output reaches several platforms, and Tween.tween_await() pauses a tween until a signal arrives. 4.7.2 is the latest patch of the series and the version this track uses.

  7. 4.8

    The next minor release in development

    In development. Its preview builds carry a status other than stable in their version, such as beta or rc1, and the release policy page gives only an estimate for the stable release.

The timeline has 7 events, from 4.0 to 4.8.

Read the tags from the newest release back. 4.7 and 4.6 get every bug and security fix; 4.5 gets security and platform fixes only; 4.4 and older get nothing. A game that will be worked on for months belongs on 4.7, and a game still on 4.5 should plan its move.

The upgrade itself is a routine. Commit your project first; the 4.7.2 release notes give that advice for every upgrade. Open the project in the new version and run it. A project that moves from 4.5 or older to a newer series has one extra step: Project > Tools > Upgrade Project Files re-saves all its scenes in one go, so the unique node ids of 4.6 come in a single commit, not scattered through later ones. From 4.7 the Project Manager also marks projects that the editor can only open after an upgrade, with an icon next to their version.

Key idea

Take every patch release of your series soon, treat a minor release as a small project on a branch, and treat a major release as a port.

Checkpoint

Check: Version numbers and support levels

  1. Question 1 of 2 A game is still on Godot 4.5.2. What does the release policy page say that series receives now?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Security and platform fixes only

    The support table lists 4.7 and 4.6 with full support, 4.5 with partial support (security and platform fixes) and 4.4 and older as no longer supported. A 4.5 project should plan its move to 4.6 or 4.7.

  2. Question 2 of 2 You are on 4.7.1 when 4.7.2 comes out, two weeks before a demo. What do you do?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Commit the project, upgrade to 4.7.2 and run the game once more before the demo

    Patch releases such as 4.7.2 contain bug and security fixes and stay backward compatible, so the page calls them safe and strongly recommended. The 4.7.2 notes add the usual advice: back up first, ideally with version control.

Three renderers trade drawing features for the devices they reach

Godot 4 draws every frame with one of three renderer: The part of Godot that draws each frame. Godot 4 has three, Forward+, Mobile and Compatibility, and a project chooses one in the rendering/renderer/rendering_method setting., chosen when you create a project and changeable later from the renderer name in the editor’s upper-right corner:

  • Forward+ has the most features, among them SDFGI, VoxelGI and volumetric fog, and is the default on desktop.
  • Mobile has fewer features, renders simple scenes faster, and is the default on phones and tablets.
  • Compatibility has the fewest features, runs on the widest range of hardware, and draws every web build.

Forward+ and Mobile draw through Vulkan, Direct3D 12 or Metal, so they need a recent GPU. Compatibility uses OpenGL, which the download pages put at OpenGL 3.3 or OpenGL ES 3.0 hardware, and in a browser WebGL 2.0: Godot 4 can target the web only that way. The choice is stored in project.godot, and it is not one value but three. Here are three projects that differ only in the lines the Project Manager writes for each choice, asked what they use where:

renderer_report.gd: one setting and its two overrides GD · renderer_report.gd
extends SceneTree

# The renderer a project asks for on each kind of device.
func _initialize() -> void:
	var setting := "rendering/renderer/rendering_method"
	print("  desktop: ", ProjectSettings.get_setting(setting))
	print("  phones and tablets: ", ProjectSettings.get_setting(setting + ".mobile"))
	print("  web: ", ProjectSettings.get_setting(setting + ".web"))
	quit()
Three projects, three kinds of device, Godot 4.7.2 Python · renderer_session.py
from session import files, run

# Three projects that differ only in the renderer the Project Manager wrote into project.godot.
files("forward_plus", "mobile", "compatibility")
files("renderer_report.gd=forward_plus/renderer_report.gd", "renderer_report.gd=mobile/renderer_report.gd")
files("renderer_report.gd=compatibility/renderer_report.gd")
run("""
grep rendering_method compatibility/project.godot
cd forward_plus && godot --headless --no-header --script renderer_report.gd && cd ..
cd mobile && godot --headless --no-header --script renderer_report.gd && cd ..
cd compatibility && godot --headless --no-header --script renderer_report.gd && cd ..
""")

Output

$ grep rendering_method compatibility/project.godot
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
$ cd forward_plus && godot --headless --no-header --script renderer_report.gd && cd ..
  desktop: forward_plus
  phones and tablets: mobile
  web: gl_compatibility
$ cd mobile && godot --headless --no-header --script renderer_report.gd && cd ..
  desktop: mobile
  phones and tablets: mobile
  web: gl_compatibility
$ cd compatibility && godot --headless --no-header --script renderer_report.gd && cd ..
  desktop: gl_compatibility
  phones and tablets: gl_compatibility
  web: gl_compatibility

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 renderer_session.py

The Forward+ project asks for Mobile on phones and for Compatibility on the web. rendering_method.mobile and rendering_method.web are feature tag: A name such as mobile, web, windows or debug that describes the platform and build a game runs on. A project setting written with a tag after a dot, such as rendering_method.mobile, applies only there. overrides with those defaults, and the engine applies the one for the device it starts on. That is why choosing Compatibility in the Project Manager writes the .mobile line as well: without it, phones would use Mobile. The web needs no line of its own, because its default is already gl_compatibility.

Three questions about your game decide most of the choice. Answer them in the table, and it rules out the renderers that cannot work, with the reason:

Interactive · answer and compare Which renderer fits your game? Answer three questions about your game. The table marks the renderers that fit and says why the others do not.
Will people play the game in a web browser?
Which devices matter most to you?
Does the game need SDFGI, VoxelGI or volumetric fog?

Answer the questions above: the table then marks what fits your case and says why the rest does not.

Godot 4's three renderers against the platforms and effects that decide the choice
Renderer Web browsers Phones and tablets Older or low-end GPUs Advanced 3D effects
Forward+ Draws through: Vulkan, Direct3D 12 or Metal Poor its web build is drawn by Compatibility, without these effects Mixed works, but the renderers page calls it poorly optimized there Poor needs a GPU with Vulkan, Direct3D 12 or Metal Good the only one with SDFGI, VoxelGI and volumetric fog
Mobile Draws through: Vulkan, Direct3D 12 or Metal Poor its web build is drawn by Compatibility instead Good the default on phones and tablets, for newer devices Poor needs a GPU with Vulkan, Direct3D 12 or Metal Mixed fewer effects than Forward+, and faster on simple scenes
Compatibility Draws through: OpenGL; WebGL 2 in a browser Good the renderer that draws every web build Good suits older and low-end phones Good OpenGL 3.3 or OpenGL ES 3.0 hardware is enough Poor the fewest effects: no SDFGI, VoxelGI or volumetric fog
How the answers decide
  • “Will people play the game in a web browser?” Yes, a web build is planned: rules out Forward+ and Mobile. Godot 4 draws every web build with Compatibility, through WebGL 2.0: built with Forward+ or Mobile, you test a different picture from the one players see.
  • “Which devices matter most to you?” Older or low-end hardware: rules out Forward+ and Mobile. Forward+ and Mobile draw through Vulkan, Direct3D 12 or Metal, which many older GPUs lack; Compatibility needs only OpenGL 3.3 or OpenGL ES 3.0.
  • “Which devices matter most to you?” Recent phones and tablets: adds a caveat to Forward+. Forward+ runs on phones but is poorly optimized there; the renderers page points phone games to Mobile or Compatibility.
  • “Does the game need SDFGI, VoxelGI or volumetric fog?” Yes, advanced 3D lighting: rules out Mobile and Compatibility. SDFGI, VoxelGI and volumetric fog exist only in Forward+.
  • “Does the game need SDFGI, VoxelGI or volumetric fog?” No: 2D, or simpler 3D: adds a caveat to Forward+. Without its advanced effects, Forward+ costs the most for simple scenes; the renderers page calls Compatibility usually good enough for 2D.

In short: Compatibility for anything that must look the same in a browser or run on older hardware, Forward+ for desktop 3D that needs its lighting, and Mobile for newer phones and tablets. For 2D, the renderers page calls Compatibility usually good enough. Switching later is possible, but moving to or from Compatibility means more scene and lighting fixes than moving between Forward+ and Mobile.

Checkpoint

Check: Choosing a renderer

  1. Question 1 of 2 A puzzle game made with Forward+ is exported for web browsers. Which renderer draws it there?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Compatibility

    The web export page says Godot 4 can only target WebGL 2.0, using the Compatibility rendering method. A Forward+ project's web build therefore runs, but without the effects only Forward+ has, so a game meant for browsers is best built and tested with Compatibility from the start.

  2. Question 2 of 2 A project was created with Forward+ and never changed its rendering settings. Which renderer does it ask for when exported to Android?

    Choose one answer.

    A hint

    Look at the second line of the forward_plus run.

    Show the answer: Question 2 of 2

    Answer: Mobile

    The run printed forward_plus for desktop, mobile for phones and tablets, and gl_compatibility for the web. The three values come from one setting and its two feature-tag overrides, which keep their defaults until you change them.

Godot 3 code fails on Godot 4, and the error names the fix

Godot 4 changed enough of GDScript and the node names that a script from a Godot 3 tutorial rarely parses. Tutorials do not always say which version they target, but the code does: export and onready written as plain words, yield, and node types such as KinematicBody2D or Spatial. Here is a small script as a Godot 3 tutorial writes it, and the same script for Godot 4:

old_tutorial.gd, written for Godot 3 GD · old_tutorial.gd
extends SceneTree

# A script written for Godot 3: it does not parse in Godot 4.
export var speed = 200

func _initialize():
	print("Speed: ", speed)
	yield(create_timer(0.5), "timeout")
	print("Half a second later")
	quit()
new_tutorial.gd, the same script for Godot 4 GD · new_tutorial.gd
extends SceneTree

# The same script for Godot 4: an annotation instead of the export keyword, await instead of yield.
@export var speed := 200

func _initialize() -> void:
	print("Speed: ", speed)
	await create_timer(0.5).timeout
	print("Half a second later")
	quit()

The session runs the old script, three more Godot 3 lines that tutorials still show, and finally the new script:

Godot 3 lines on Godot 4.7.2, then the fixed script Python · upgrade_session.py
from session import files, run, write

files("old_tutorial.gd", "new_tutorial.gd")
# Three more lines that Godot 3 tutorials still show, each in a script of its own.
write("old_onready.gd", "extends Node\n\nonready var label = $Label\n")
write("old_yield.gd", 'extends Node\n\nfunc _ready():\n\tyield(get_tree().create_timer(1.0), "timeout")\n')
write("old_body.gd", "extends KinematicBody2D\n")
run("""
!godot --headless --no-header --script old_tutorial.gd
!godot --headless --no-header --check-only --script old_onready.gd
!godot --headless --no-header --check-only --script old_yield.gd
!godot --headless --no-header --check-only --script old_body.gd
godot --headless --no-header --script new_tutorial.gd
""")

Output

$ godot --headless --no-header --script old_tutorial.gd
SCRIPT ERROR: Parse Error: The "export" keyword was removed in Godot 4. Use an export annotation ("@export", "@export_range", etc.) instead.
          at: GDScript::reload (res://old_tutorial.gd:4)
ERROR: Failed to load script "res://old_tutorial.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)
$ godot --headless --no-header --check-only --script old_onready.gd
SCRIPT ERROR: Parse Error: The "onready" keyword was removed in Godot 4. Use the "@onready" annotation instead.
          at: GDScript::reload (res://old_onready.gd:3)
ERROR: Failed to load script "res://old_onready.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)
$ godot --headless --no-header --check-only --script old_yield.gd
SCRIPT ERROR: Parse Error: "yield" was removed in Godot 4. Use "await" instead.
          at: GDScript::reload (res://old_yield.gd:4)
ERROR: Failed to load script "res://old_yield.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)
$ godot --headless --no-header --check-only --script old_body.gd
SCRIPT ERROR: Parse Error: Could not find base class "KinematicBody2D".
          at: GDScript::reload (res://old_body.gd:1)
ERROR: Failed to load script "res://old_body.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)
$ godot --headless --no-header --script new_tutorial.gd
Speed: 200
Half a second later

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 upgrade_session.py

Godot 4.7.2 recognises the old keywords and names their replacements. Renamed nodes get only “Could not find base class”, so for those the upgrade guide’s table of renames is the place to look:

Godot 3 Godot 4 Where the new name comes from
export var speed = 200 @export var speed := 200 the parse error in the run
onready var label = $Label @onready var label = $Label the parse error in the run
yield(timer, "timeout") await timer.timeout the parse error in the run
extends KinematicBody2D extends CharacterBody2D the upgrade guide’s renames
extends Spatial extends Node3D the upgrade guide’s renames

Trusting the exit status

None of the failing commands printed an “[exit status]” line: Godot reported each parse error and still ended with status 0, even with --check-only. A script or build job that checks Godot’s work must look for “SCRIPT ERROR” or “Parse Error” in what it printed.

Checkpoint

Check: Spotting Godot 3 code

  1. Question 1 of 2 Which of these lines tell you a tutorial was written for Godot 3? Choose every one.

    Choose every answer that is right.

    Show the answer: Question 1 of 2

    Answer:

    • extends KinematicBody2D
    • yield(get_tree().create_timer(1.0), "timeout")
    • export var speed = 200

    The recorded run shows Godot 4.7.2 rejecting export, onready and yield and failing to find KinematicBody2D. Each error message names the Godot 4 replacement, except for renamed nodes, which the upgrade guide's table lists.

  2. Question 2 of 2 A build script runs godot --headless --check-only --script player.gd and treats exit status 0 as success. What goes wrong?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: A script with a parse error still passes, because Godot ended with status 0

    Godot reports script errors on its output and keeps the exit status at 0, as the session shows: no command printed an "[exit status]" line. A check has to look for "SCRIPT ERROR" or "Parse Error" in what Godot printed.

Practise: check your own installation

Do these four things on the computer you will make games on, in this order:

  1. Download the standard build for your system from godotengine.org, extract it and start it once.
  2. In a terminal, run the program with --version and compare the output with 4.7.2.stable.official.ed1daf0bf.
  3. Save version_report.gd in an empty folder and run it with --headless --script version_report.gd. Add a line that prints OS.has_feature("web"), run it again and check that it prints false.
  4. Save old_tutorial.gd, run it, and fix it line by line using the errors until it prints the same two lines as new_tutorial.gd.

Then check yourself on licences, installs, versions, renderers and Godot 3 code. The self-check below opens with the topic where your answers have been weakest, and after each answer it tells you why that choice is right or wrong:

Practice that adapts to you

Practise this lesson

10 questions about 5 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.

  1. Question 1 of 10 How much does Godot's licence charge per copy of a game you sell?

    Choose one answer.

    Show the answer: Question 1 of 10

    Answer: Nothing, and there are no royalties

    Godot is under the MIT licence: no fees, no royalties, and your game can use any licence. The one condition is including Godot's copyright and licence notice.

  2. Question 2 of 10 Your game shows Godot's licence text on a credits screen. What else does the documentation ask you to credit, and how can the game get it right after every engine upgrade?

    Choose one answer.

    Show the answer: Question 2 of 10

    Answer: The third-party components inside Godot, read from Engine.get_copyright_info() and get_license_info()

    Godot bundles code from other authors under their own licences. Engine.get_copyright_info() and Engine.get_license_info() return that list from the engine itself, 102 components and 19 licences in 4.7.2, so a licences screen built from them never goes out of date.

  3. Question 3 of 10 You want to write your game in C# instead of GDScript. Which download do you need?

    Choose one answer.

    Show the answer: Question 3 of 10

    Answer: The .NET build from the official download page, plus the .NET SDK

    Godot ships two builds per system. The standard build runs GDScript; the .NET build adds C# and needs the .NET SDK. Store copies are standard builds. Note also that a Godot 4 C# project cannot be exported to the web.

  4. Question 4 of 10 version_report.gd printed "Debug build: true". Run the same script in a game exported with a release template, and what does it print?

    Choose one answer.

    Show the answer: Question 4 of 10

    Answer: Debug build: false

    The editor binary is a debug build, so the recorded run printed true. The class reference says OS.is_debug_build() returns false when a release export template runs the project.

  5. Question 5 of 10 Your project is on Godot 4.6.3 and 4.7.2 is out. How does the release policy describe this kind of upgrade?

    Choose one answer.

    Show the answer: Question 5 of 10

    Answer: A minor release, which can bring narrow breaking changes in some areas

    Godot numbers releases major.minor.patch. 4.6.3 to 4.7.2 crosses a minor release: new features, mostly compatible, with narrow breaking changes possible, so upgrade on a branch, read the migration guide and test.

  6. Question 6 of 10 A Godot 3.6 game is to move to Godot 4.7. What should the plan look like?

    Choose one answer.

    Show the answer: Question 6 of 10

    Answer: Back up or commit, run the project converter, then fix the scripts by hand and test everything

    A major upgrade is a port: the converter renames nodes such as KinematicBody2D, but scripts usually still contain errors afterwards, as the Godot 3 lines in this lesson show. Commit first, because the converter keeps no backup.

  7. Question 7 of 10 A 2D game targets older Android phones and a web build. Which renderer do you choose in the Project Manager?

    Choose one answer.

    Show the answer: Question 7 of 10

    Answer: Compatibility

    Older phones rule out Forward+ and Mobile, and the web build is drawn by Compatibility whatever you choose. Choosing Compatibility in the Project Manager also writes rendering_method.mobile, so every build uses the same renderer.

  8. Question 8 of 10 A team set rendering_method to "gl_compatibility" by hand, and their Android build still looks different from the desktop build. Why?

    Choose one answer.

    A hint

    Compare the compatibility project's two rendering lines with what the team wrote.

    Show the answer: Question 8 of 10

    Answer: rendering_method.mobile still has its default, mobile, so phones use the Mobile renderer

    One setting has three values: the base for desktop, .mobile for phones and tablets and .web for browsers. The engine applies the override for the device's feature tag, so a hand-edited base line does not reach phones.

  9. Question 9 of 10 What replaces yield(timer, "timeout") in Godot 4?

    Choose one answer.

    Show the answer: Question 9 of 10

    Answer: await timer.timeout

    Godot 4.7.2's parser says it plainly: "yield" was removed in Godot 4, use "await" instead. Signals are values in Godot 4, so you await the signal of the timer.

  10. Question 10 of 10 A video tutorial uses Spatial and onready. You still want to follow it. What is the safest way?

    Choose one answer.

    Show the answer: Question 10 of 10

    Answer: Translate as you go (Spatial to Node3D, onready to @onready) and run each script after every change

    Godot 3 tutorials can still teach ideas, but every script needs translating. The Godot 4 names are in the upgrade guide, and the parser points to most of them, as the recorded errors show.

Interview questions

Warm-up: what does Godot’s MIT licence require from a game you sell?

One thing: include Godot’s copyright notice and licence text in the game, where players can reach it. A credits screen, a licences screen in the menus, a file shipped beside a desktop build or a readable output log all count, and one is enough. There are no fees or royalties, and the game itself can use any licence, closed and commercial included. Godot also bundles libraries with licences of their own, 102 credited components under 19 licences in 4.7.2, and the documentation asks you to credit them too; Engine.get_license_text(), Engine.get_copyright_info() and Engine.get_license_info() return all of it from the running engine, so a licences screen built from them stays current after every upgrade.

Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.

  1. Fresher to mid

    A 3D game made with the Forward+ renderer looks right on desktop, but its web build has no fog and flat lighting, and the Android build looks different again. The project settings were never changed. Explain both symptoms, and say how you would set the project up for a game that must ship on all three.

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page. First step and follow-ups

  2. Mid to senior

    Your team's game is on Godot 4.5.2 and ships in three months; 4.7.2 is the newest release. Do you upgrade, to what and when, and how do you make the upgrade safe for the release?

    Model answer, Pro. First step and follow-ups

Key takeaways

  • Godot is one program, editor and engine together, under the MIT licence: no fees or royalties, and one condition, that every game includes Godot’s copyright and licence notice.
  • The standard build of Godot 4.7.2 is a zip to extract and run on each system, and godot --version must print 4.7.2.stable.official.ed1daf0bf before you start, with versions compared as numbers, never as text.
  • A patch release is a safe fix to take soon, a minor release is a small project on a branch and a major release is a port; while 4.7 is the newest series, 4.7 and 4.6 have full support, 4.5 partial support and 4.4 and older none.
  • Forward+, Mobile and Compatibility trade features for reach: only Compatibility runs on older hardware and draws web builds, and one project setting holds a renderer for desktop, for phones and for the web.
  • Godot 3 tutorials show export, onready, yield or old node names, and Godot 4 rejects them with errors that name most replacements while still ending with status 0.

Terms in this lesson

feature tag
A name such as mobile, web, windows or debug that describes the platform and build a game runs on. A project setting written with a tag after a dot, such as rendering_method.mobile, applies only there.
headless mode
Running Godot with no window and no sound output, started with the --headless option. Servers, build machines and scripts started from a terminal run Godot this way.
MIT licence
A short permissive licence: anyone may use, change, share and sell the software, as long as its copyright notice and licence text are included in copies. Godot is released under it.
patch release
A release that changes only the third number of a version, such as 4.7.1 to 4.7.2. It brings bug and security fixes that stay compatible, and only the latest patch of a series is supported.
renderer
The part of Godot that draws each frame. Godot 4 has three, Forward+, Mobile and Compatibility, and a project chooses one in the rendering/renderer/rendering_method setting.

References

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.