Museum of Lost Lights · Lesson 43 of 50 · Publishing · About 35 min
The museum is ready to leave your computer. Its release card needs a label identifying which game it is, which edition it is and which exact build your tester has.

Download the projects from the course page. In Godot’s Project Manager, choose Import, select project.godot, and use Run Project (F5). Start from checkpoints/42 when the lesson builds on prior work, or copy the checkpoints/43 folder to try this lesson on its own. Read the file names in the steps before editing. Keep the checkpoint ZIP intact and make edits in an extracted working copy.

Build it step by step
Language and tools in this lesson String, int, Dictionary, String.begins_with, branching, version metadata, release signing.
-
Open the checkpoint in Godot
Extract the course files. In Godot Project Manager, choose Import and point it to this lesson’s project.godot. Double-click main.gd in FileSystem to open the script. Press F6 to run the current scene once main.tscn is open, or F5 to run the project. Press Check practice release to inspect fictional values. Keep real keys and passwords out of the checkpoint.
const UI = preload("res://lesson_ui.gd")Why it works This small project lets you see one release skill at a time. The finished Museum of Lost Lights is a second, independent project. Keep both projects in their own folders.
-
Understand identity and version
Open the release card in main.gd. The package ID is a backwards-looking label made from names separated by dots. Our training ID uses example.com’s special training name. The version tells players which edition they have. The build number distinguishes two packages even if both say 1.0.0.
return {"id": "com.example.museumdemo", "version": "1.0.0", "build": build_number}Why it works On a published app, changing its package or bundle ID normally makes it a different app. Increasing a build number lets the store tell a replacement package from one it has already received.
-
Read fields from a dictionary
Step through _inspect with the first build number. The dot in card.id reads a value stored under the key id. The method begins_with checks its starting letters.
var identity_kind := "Practice ID" if card.id.begins_with("com.example.") else "Is this your own ID?"Why it works The checker recognises its own training identity. A real project uses an ID chosen together by the publishing adult or team.
-
Bump a build number without changing the version
Press Increase build number twice. Watch the value for build change from 1 to 3. Verify that version still reads 1.0.0.
build_number += 1Why it works Use a new build number when you replace a package for testing or release. A player-visible version can stay the same while you fix problems within that version.
-
Understand what signing proves
Draw a card with game name, app ID, version, build number and a signature box. A signing key links a build to the publisher. On Apple’s route, signing is set up with the Apple team and provisioning. On Android’s route, an upload key signs the publisher’s upload and Play App Signing can sign copies delivered by Google.
Why it works Keys have to stay private and under the publisher’s control. The checkpoint contains no real signing material. Use project export settings and platform tools with an adult for actual credentials.
-
Practise a Godot export
In the full game copy, choose Editor → Manage Export Templates and install the templates that match your editor version. Choose Project → Export and locate Add Preset. Make a desktop export for your computer, or open a target preset and write down what the editor says is missing.
Why it works A dry run reveals missing tools before a submission deadline. A desktop build is a separate package you can use for early playtesting.
-
Read the result, then apply it to your game
Write a private release log with app ID, version, build number, target and test results. Store the upload key and its backup separately under the publisher’s control. Keep secrets out of the shared source project, screenshots and lesson notes.
Why it works The checkpoint shows what to look for. Your game’s real result comes from testing your own build, assets and settings.
Watch the values change
-
Inspect first build Practice ID, version 1.0.0, build 1.
What you see. The release card shows the training identity. -
Increase once Version stays 1.0.0. Build becomes 2.
What you see. You can distinguish the two files. -
Inspect again The saved number is still 2 in this run.
What you see. The latest numbered package is identifiable.
Predict before you run Can two test packages both show version 1.0.0 and still be distinct?
Reveal the answer
Yes. Give them different build numbers. For example, 1.0.0 build 12 and 1.0.0 build 13 are two distinct packages.
Complete checkpoint
Check practice release shows 1.0.0 build 1. Increase build number immediately updates the status without changing the app ID or version.
main.gd
extends Control
const UI = preload("res://lesson_ui.gd")
var build_number := 1
var card_label: Label
func _ready() -> void:
var column := UI.build(self, "Museum release card", "Practise with example metadata. Your real signing settings belong to the publisher.")
UI.button(column, "Check practice release", _inspect)
UI.button(column, "Increase build number", _increase)
card_label = UI.message(column, "Press a button to inspect the practice build.")
func _card() -> Dictionary:
return {"id": "com.example.museumdemo", "version": "1.0.0", "build": build_number}
func _inspect() -> void:
var card := _card()
var identity_kind := "Practice ID" if card.id.begins_with("com.example.") else "Is this your own ID?"
card_label.text = "%s: %s | Version %s | Build %d" % [identity_kind, card.id, card.version, card.build]
func _increase() -> void:
build_number += 1
_inspect()
lesson_ui.gd
extends RefCounted
static func build(screen: Control, heading: String, opening: String) -> VBoxContainer:
var margins := MarginContainer.new()
screen.add_child(margins)
margins.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
for edge in ["left", "right", "top", "bottom"]:
margins.add_theme_constant_override("margin_" + edge, 24)
var scroll := ScrollContainer.new()
margins.add_child(scroll)
var column := VBoxContainer.new()
column.size_flags_horizontal = Control.SIZE_EXPAND_FILL
scroll.add_child(column)
column.add_theme_constant_override("separation", 12)
var title := Label.new()
title.text = heading
title.add_theme_font_size_override("font_size", 30)
column.add_child(title)
message(column, opening)
return column
static func message(column: VBoxContainer, text: String) -> Label:
var line := Label.new()
line.text = text
line.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
column.add_child(line)
return line
static func button(column: Container, caption: String, action: Callable) -> Button:
var control := Button.new()
control.text = caption
control.custom_minimum_size.y = 48
control.pressed.connect(action)
column.add_child(control)
return control
GDScript line by line
Follow the line numbers, including the indent at the start of each line. Find the code the game will run first, then look for the function that reacts when you tap or change something.
Read main.gd line by line
-
extends ControlStarts with Godot's Control type. This script gets the abilities of that type and adds the game's own rules. -
const UI = preload("res://lesson_ui.gd")Creates a constant named UI. The expression prepares a resource at a fixed project path when the script is loaded. -
var build_number := 1Creates a variable named build_number. The expression uses the whole number 1. Godot infers the type from the first value. -
var card_label: LabelDeclares card_label for later use. A colon followed by a type says which kind of value belongs here. -
func _ready() -> void:Godot calls this once after the scene and its children are ready. Use it to set up the room and connect controls. -
var column := UI.build(self, "Museum release card", "Practise with example metadata. Your real signing settings belong to the publisher.")Creates a variable named column. The expression calls UI.build with the values in its parentheses. Godot infers the type from the first value. -
UI.button(column, "Check practice release", _inspect)Calls UI.button with the values in its parentheses. -
UI.button(column, "Increase build number", _increase)Calls UI.button with the values in its parentheses. -
card_label = UI.message(column, "Press a button to inspect the practice build.")Stores the new value in card_label. The expression calls UI.message with the values in its parentheses. -
func _card() -> Dictionary:Defines card, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect. -
return {"id": "com.example.museumdemo", "version": "1.0.0", "build": build_number}Finishes the function and hands its result back to the caller. The expression makes a dictionary that looks up values by key. -
func _inspect() -> void:Defines inspect, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect. -
var card := _card()Creates a variable named card. The expression calls _card with the values in its parentheses. Godot infers the type from the first value. -
var identity_kind := "Practice ID" if card.id.begins_with("com.example.") else "Is this your own ID?"Creates a variable named identity_kind. The expression chooses one of two values by checking the condition in the middle. Godot infers the type from the first value. -
card_label.text = "%s: %s | Version %s | Build %d" % [identity_kind, card.id, card.version, card.build]Updates card_label.text, which controls the words a player sees. The expression uses the text inside the quotes. -
func _increase() -> void:Defines increase, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect. -
build_number += 1Reads build_number, adds to its old value, then stores the result back in the same place. -
_inspect()Calls _inspect with the values in its parentheses.
Read lesson_ui.gd line by line
-
extends RefCountedStarts with Godot's RefCounted type. This script gets the abilities of that type and adds the game's own rules. -
static func build(screen: Control, heading: String, opening: String) -> VBoxContainer:Defines build, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect. -
var margins := MarginContainer.new()Creates a variable named margins. The expression creates a new MarginContainer object. Godot infers the type from the first value. -
screen.add_child(margins)Adds the new node to the scene tree so that Godot can run and draw it. -
margins.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent. -
for edge in ["left", "right", "top", "bottom"]:Repeats the indented instructions for each value in ["left", "right", "top", "bottom"]. -
margins.add_theme_constant_override("margin_" + edge, 24)Calls margins.add_theme_constant_override with the values in its parentheses. -
var scroll := ScrollContainer.new()Creates a variable named scroll. The expression creates a new ScrollContainer object. Godot infers the type from the first value. -
margins.add_child(scroll)Adds the new node to the scene tree so that Godot can run and draw it. -
var column := VBoxContainer.new()Creates a variable named column. The expression creates a new VBoxContainer object. Godot infers the type from the first value. -
column.size_flags_horizontal = Control.SIZE_EXPAND_FILLStores the new value in column.size_flags_horizontal. The expression reads Control.SIZE_EXPAND_FILL. -
scroll.add_child(column)Adds the new node to the scene tree so that Godot can run and draw it. -
column.add_theme_constant_override("separation", 12)Calls column.add_theme_constant_override with the values in its parentheses. -
var title := Label.new()Creates a variable named title. The expression creates a new Label object. Godot infers the type from the first value. -
title.text = headingUpdates title.text, which controls the words a player sees. The expression reads heading. -
title.add_theme_font_size_override("font_size", 30)Calls title.add_theme_font_size_override with the values in its parentheses. -
column.add_child(title)Adds the new node to the scene tree so that Godot can run and draw it. -
message(column, opening)Calls message with the values in its parentheses. -
return columnFinishes the function and hands its result back to the caller. The expression reads column. -
static func message(column: VBoxContainer, text: String) -> Label:Defines message, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect. -
var line := Label.new()Creates a variable named line. The expression creates a new Label object. Godot infers the type from the first value. -
line.text = textUpdates line.text, which controls the words a player sees. The expression reads text. -
line.autowrap_mode = TextServer.AUTOWRAP_WORD_SMARTStores the new value in line.autowrap_mode. The expression reads TextServer.AUTOWRAP_WORD_SMART. -
column.add_child(line)Adds the new node to the scene tree so that Godot can run and draw it. -
return lineFinishes the function and hands its result back to the caller. The expression reads line. -
static func button(column: Container, caption: String, action: Callable) -> Button:Defines button, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect. -
var control := Button.new()Creates a variable named control. The expression creates a new Button object. Godot infers the type from the first value. -
control.text = captionUpdates control.text, which controls the words a player sees. The expression reads caption. -
control.custom_minimum_size.y = 48Stores the new value in control.custom_minimum_size.y. The expression uses the whole number 48. -
control.pressed.connect(action)Links a signal to the function that should run when the event happens. -
column.add_child(control)Adds the new node to the scene tree so that Godot can run and draw it. -
return controlFinishes the function and hands its result back to the caller. The expression reads control.
Find and fix a bug
If your label still reads build 1 after pressing Increase, call _inspect after build_number += 1. A label only updates when you assign it the new text.
Try a change
Ages 10–12: write three fictional release cards in order. Ages 13–16: extend the checker to flag the same app ID and version paired with a repeated build number.