Cruise Game 45 · Create the icon and capture real gameplay

Midnight Deck Dash · Lesson 45 of 50 · Publishing · About 40 min

The cruise poster should help a player see what they do. Show the courier delivering a parcel, avoiding a cart and using a service hatch.

The ship’s Art Deco Grand Atrium, with carved rails, teal upholstery and warm gold lights.
What you’ll make Build a set of honest store visuals and check individual image dimensions.

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/44 when the lesson builds on prior work, or copy the checkpoints/45 folder to try this lesson on its own. Read the file names in the steps before editing.

Play the build. Capture real moves and deliveries. → Draw the icon. Use a clear original silhouette. → Check dimensions. Read pixels and rules separately. → Prepare the listing. Pair screenshots with short captions.
Play the build → Draw the icon → Check dimensions → Prepare the listing

Build it step by step

Language and tools in this lesson Image.create(), Color, create_from_image(), get_size(), Vector2i comparison, capture checklist.

  1. Choose three genuine moments

    Run the actual published-build candidate on a phone or emulator. Capture the first delivery, a cart encounter and a hatch shortcut using that device's screenshot facility. Use the final information shown on-screen and keep a record of the device and build.

    Why it works Real captures let a future player judge the game by what it does on their device.

  2. Design an original icon

    Sketch a navy parcel label, gold porthole or lit deck window. Make a square master at 1024 × 1024 and check readability at very small sizes. Export platform-specific versions, including a 512 × 512 icon for Play. Check current store specifications separately, including the iOS icon and any Google feature graphic.

    Why it works A memorable original shape can remain clear at small sizes and distinguishes the game from other maze games.

  3. Check dimensions in Godot

    Open checkpoint 45, press F5 and choose the two size samples. In main.gd read check_size(). Confirm get_size() reads the exact pixel dimensions rather than the display size.

    actual == required

    Why it works A Vector2i comparison checks both width and height in one expression.

  4. Preview a small icon

    Read make_sample() and click the square preview. Find Image.create() and ImageTexture.create_from_image(). Compare the small icon swatch with the sample's full dimensions shown in text.

    var image := Image.create(dimensions.x, dimensions.y, false, Image.FORMAT_RGBA8)

    Why it works An Image describes pixels. A texture is what a Godot control can show. Scaling the control does not change source image dimensions.

  5. Compose the store set

    Give the pictures clear short captions like Carry one parcel, Wait for the cart and Open a service hatch. Keep small interface text visible. Check supported device-specific sizes in App Store Connect and the Play listing's current asset rules before upload.

    Why it works Each picture teaches one action and keeps the listing honest.

  6. Audit the exported set

    Place your credited source icon and real captures in a versioned release folder. Compare them to the candidate build after any change to controls or visuals. Ask a reader what game the pictures show before reading the text.

    Why it works This verifies that the listing matches the experience a player will actually get.

Watch the values change

  1. Try a square The generated sample is 512 × 512.
    What you see. Both dimensions match the Play icon example.
  2. Try a rectangle The sample is 512 × 400.
    What you see. The lab reports a height mismatch.
  3. Make a small preview The control shows a scaled image.
    What you see. The label still reports the source dimension.

Predict before you run Your icon looks square on screen but its file is 512 × 400. Does it pass the 512 × 512 requirement?

Reveal the answer

No. The layout can make an image appear square. The pixel dimensions still differ.

Complete checkpoint

The first icon sample passes and the rectangle reports 512 × 400 as the mismatch.

main.gd

extends Control

const Lab = preload("res://release_lab.gd")
const TITLE := "Create the icon and capture real gameplay"
var ui: VBoxContainer

func _ready() -> void:
	ui = VBoxContainer.new()
	ui.set_script(Lab)
	add_child(ui)
	ui.start(TITLE)
	build()

var preview: TextureRect

func build() -> void:
	ui.say("The lab compares exact source pixels, then shows a small on-screen preview.")
	ui.option("Preview square icon sample", make_sample.bind(Vector2i(512, 512)))
	ui.option("Preview wrong-size sample", make_sample.bind(Vector2i(512, 400)))
	preview = TextureRect.new()
	preview.custom_minimum_size = Vector2(48, 48)
	preview.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
	preview.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
	preview.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
	ui.add_child(preview)

func make_sample(dimensions: Vector2i) -> void:
	var image := Image.create(dimensions.x, dimensions.y, false, Image.FORMAT_RGBA8)
	image.fill(Color("#19364d"))
	image.fill_rect(Rect2i(dimensions.x / 4, dimensions.y / 4, dimensions.x / 2, dimensions.y / 2), Color("#f9c871"))
	preview.texture = ImageTexture.create_from_image(image)
	ui.say(check_size(image.get_size(), Vector2i(512, 512)))

func check_size(actual: Vector2i, required: Vector2i) -> String:
	var sizes := "%d × %d pixels" % [actual.x, actual.y]
	if actual == required:
		return sizes + ". Both sample dimensions match."
	return sizes + ". The sample differs from the required width or height."

release_lab.gd

extends VBoxContainer

var body: Label

func start(title_text: String) -> void:
	set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	offset_left = 34.0
	offset_top = 24.0
	offset_right = -34.0
	offset_bottom = -24.0
	add_theme_constant_override("separation", 12)
	var title := Label.new()
	title.text = title_text
	title.add_theme_font_size_override("font_size", 31)
	title.add_theme_color_override("font_color", Color("#f5cd85"))
	add_child(title)
	body = Label.new()
	body.custom_minimum_size.y = 138.0
	body.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
	body.add_theme_font_size_override("font_size", 19)
	add_child(body)
	var bg := ColorRect.new()
	bg.color = Color("#132942")
	bg.mouse_filter = Control.MOUSE_FILTER_IGNORE
	bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	get_parent().add_child(bg)
	get_parent().move_child(bg, 0)

func say(message: String) -> void:
	body.text = message

func option(label: String, command: Callable) -> void:
	var button := Button.new()
	button.text = label
	button.custom_minimum_size.y = 45.0
	button.add_theme_font_size_override("font_size", 19)
	button.pressed.connect(command)
	add_child(button)

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
  1. extends ControlStarts with Godot's Control type. This script gets the abilities of that type and adds the game's own rules.
  2. const Lab = preload("res://release_lab.gd")Creates a constant named Lab. The expression prepares a resource at a fixed project path when the script is loaded.
  3. const TITLE := "Create the icon and capture real gameplay"Creates a constant named TITLE. The expression uses the text inside the quotes. Godot infers the type from the first value.
  4. var ui: VBoxContainerDeclares ui for later use. A colon followed by a type says which kind of value belongs here.
  5. 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.
  6. ui = VBoxContainer.new()Stores the new value in ui. The expression creates a new VBoxContainer object.
  7. ui.set_script(Lab)Calls ui.set_script with the values in its parentheses.
  8. add_child(ui)Adds the new node to the scene tree so that Godot can run and draw it.
  9. ui.start(TITLE)Calls ui.start with the values in its parentheses.
  10. build()Calls build with the values in its parentheses.
  11. var preview: TextureRectDeclares preview for later use. A colon followed by a type says which kind of value belongs here.
  12. func build() -> void: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.
  13. ui.say("The lab compares exact source pixels, then shows a small on-screen preview.")Calls ui.say with the values in its parentheses.
  14. ui.option("Preview square icon sample", make_sample.bind(Vector2i(512, 512)))Calls ui.option with the values in its parentheses.
  15. ui.option("Preview wrong-size sample", make_sample.bind(Vector2i(512, 400)))Calls ui.option with the values in its parentheses.
  16. preview = TextureRect.new()Stores the new value in preview. The expression creates a new TextureRect object.
  17. preview.custom_minimum_size = Vector2(48, 48)Updates preview.custom_minimum_size, which controls the smallest space the layout should reserve for this control. The expression packs x and y into one value.
  18. preview.size_flags_horizontal = Control.SIZE_SHRINK_BEGINStores the new value in preview.size_flags_horizontal. The expression reads Control.SIZE_SHRINK_BEGIN.
  19. preview.expand_mode = TextureRect.EXPAND_IGNORE_SIZEStores the new value in preview.expand_mode. The expression reads TextureRect.EXPAND_IGNORE_SIZE.
  20. preview.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTEREDStores the new value in preview.stretch_mode. The expression reads TextureRect.STRETCH_KEEP_ASPECT_CENTERED.
  21. ui.add_child(preview)Adds the new node to the scene tree so that Godot can run and draw it.
  22. func make_sample(dimensions: Vector2i) -> void:Defines make sample, 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.
  23. var image := Image.create(dimensions.x, dimensions.y, false, Image.FORMAT_RGBA8)Creates a variable named image. The expression calls Image.create with the values in its parentheses. Godot infers the type from the first value.
  24. image.fill(Color("#19364d"))Calls image.fill with the values in its parentheses.
  25. image.fill_rect(Rect2i(dimensions.x / 4, dimensions.y / 4, dimensions.x / 2, dimensions.y / 2), Color("#f9c871"))Calls image.fill_rect with the values in its parentheses.
  26. preview.texture = ImageTexture.create_from_image(image)Stores the new value in preview.texture. The expression calls ImageTexture.create_from_image with the values in its parentheses.
  27. ui.say(check_size(image.get_size(), Vector2i(512, 512)))Calls ui.say with the values in its parentheses.
  28. func check_size(actual: Vector2i, required: Vector2i) -> String:Defines check size, 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.
  29. var sizes := "%d × %d pixels" % [actual.x, actual.y]Creates a variable named sizes. The expression uses the text inside the quotes. Godot infers the type from the first value.
  30. if actual == required:Checks actual == required. The indented instructions below run only if this test passes.
  31. return sizes + ". Both sample dimensions match."Finishes the function and hands its result back to the caller. The expression calculates a new value from the expressions on either side of the operator.
  32. return sizes + ". The sample differs from the required width or height."Finishes the function and hands its result back to the caller. The expression evaluates the test to see whether it is true or false.
Read release_lab.gd line by line
  1. extends VBoxContainerStarts with Godot's VBoxContainer type. This script gets the abilities of that type and adds the game's own rules.
  2. var body: LabelDeclares body for later use. A colon followed by a type says which kind of value belongs here.
  3. func start(title_text: String) -> void:Defines start, 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.
  4. set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent.
  5. offset_left = 34.0Stores the new value in offset_left. The expression reads 34.0.
  6. offset_top = 24.0Stores the new value in offset_top. The expression reads 24.0.
  7. offset_right = -34.0Stores the new value in offset_right. The expression reads -34.0.
  8. offset_bottom = -24.0Stores the new value in offset_bottom. The expression reads -24.0.
  9. add_theme_constant_override("separation", 12)Calls add_theme_constant_override with the values in its parentheses.
  10. var title := Label.new()Creates a variable named title. The expression creates a new Label object. Godot infers the type from the first value.
  11. title.text = title_textUpdates title.text, which controls the words a player sees. The expression reads title_text.
  12. title.add_theme_font_size_override("font_size", 31)Calls title.add_theme_font_size_override with the values in its parentheses.
  13. title.add_theme_color_override("font_color", Color("#f5cd85"))Calls title.add_theme_color_override with the values in its parentheses.
  14. add_child(title)Adds the new node to the scene tree so that Godot can run and draw it.
  15. body = Label.new()Stores the new value in body. The expression creates a new Label object.
  16. body.custom_minimum_size.y = 138.0Stores the new value in body.custom_minimum_size.y. The expression reads 138.0.
  17. body.autowrap_mode = TextServer.AUTOWRAP_WORD_SMARTStores the new value in body.autowrap_mode. The expression reads TextServer.AUTOWRAP_WORD_SMART.
  18. body.add_theme_font_size_override("font_size", 19)Calls body.add_theme_font_size_override with the values in its parentheses.
  19. add_child(body)Adds the new node to the scene tree so that Godot can run and draw it.
  20. var bg := ColorRect.new()Creates a variable named bg. The expression creates a new ColorRect object. Godot infers the type from the first value.
  21. bg.color = Color("#132942")Stores the new value in bg.color. The expression builds a colour from these values.
  22. bg.mouse_filter = Control.MOUSE_FILTER_IGNOREUpdates bg.mouse_filter, which controls how this control participates in pointer and touch input. The expression reads Control.MOUSE_FILTER_IGNORE.
  23. bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent.
  24. get_parent().add_child(bg)Calls get_parent with the values in its parentheses.
  25. get_parent().move_child(bg, 0)Calls get_parent with the values in its parentheses.
  26. func say(message: String) -> void:Defines say, 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.
  27. body.text = messageUpdates body.text, which controls the words a player sees. The expression reads message.
  28. func option(label: String, command: Callable) -> void:Defines option, 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.
  29. var button := Button.new()Creates a variable named button. The expression creates a new Button object. Godot infers the type from the first value.
  30. button.text = labelUpdates button.text, which controls the words a player sees. The expression reads label.
  31. button.custom_minimum_size.y = 45.0Stores the new value in button.custom_minimum_size.y. The expression reads 45.0.
  32. button.add_theme_font_size_override("font_size", 19)Calls button.add_theme_font_size_override with the values in its parentheses.
  33. button.pressed.connect(command)Links a signal to the function that should run when the event happens.
  34. add_child(button)Adds the new node to the scene tree so that Godot can run and draw it.

Find and fix a bug

If the store rejects a file that looks right, inspect its actual width, height and format. Re-export from a source with the correct proportions instead of stretching a finished icon.

Try a change

Ages 10–12. Describe the game using three screenshots. Ages 13–16. Plan better captures for a small device and a tablet without burying the real interface under captions.

Official instructions