Cabin Crew 45 · Capture honest store screenshots

Cabin Crew Express · Lesson 45 of 50 · Publishing · About 38 min

Capture the same aisle Ari sees while playing. The windows, rows and passenger seats should keep their real proportions in the preview.

Ari offers water to a seated passenger in a warmly lit regional aircraft cabin.
What you’ll make Prepare a clear series of gameplay screenshots and reason about image sizes without stretching the aircraft cabin.

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.

Plan. Pick truthful playable moments. → Capture. Use the running game. → Fit. Keep one scale. → Verify. Check slot and readable details.
Plan → Capture → Fit → Verify
Godot checkpoint window for Capture honest store screenshots
From the running Godot checkpoint.

Build it step by step

Language and tools in this lesson Vector2i, float(), minf(), roundi(), aspect ratio, screenshot notes.

  1. Plan three scenes

    Play your copy of the reference game. Plan one screenshot of choosing galley supplies, one of delivering the matching request, and one of mission results. Keep the service controls visible.

    Why it works A series of screens can explain the game to parents and players before installation.

  2. Capture actual gameplay

    Use your supported device's screenshot command, or use Godot's game view for a course example. Turn off notifications and check that no account name or private data appears. Save originals before editing.

    Why it works Original images let another person compare the exact game state if a label or crop needs correction.

  3. Measure a frame

    Import checkpoint 45. With main.gd open, press F5. Compare a wide source in a wide frame and the same source in a portrait frame.

    Why it works A frame's shape can differ from the source image. Scaling both dimensions by one factor preserves the cabin geometry.

  4. Read the calculation

    Find fit(). Express each dimension ratio as a floating-point number. Read the minf() line and the two uses of roundi() below it.

    var ratio := minf(width_ratio, height_ratio)

    Why it works The smaller scale fits the whole image. Round the results to integer pixel dimensions when describing a raster image.

  5. Check the actual store slots

    Read the current Apple device screenshot specifications and Google Play preview requirements. Capture in the required device class and orientation. Use the size helper to understand fit and empty space, then judge required store assets using their own rules.

    Why it works A fit calculation does not make a screenshot from the wrong device class acceptable.

  6. Write a useful caption

    For course or website screenshots, describe the action visible on screen. Example: Ari selects a blanket at the galley while row 2's request remains open. Use alt text in places that allow it. Review the caption against the actual pixels.

    Why it works The description helps users understand the game without relying on decorative colour and angle.

Watch the values change

  1. Fit landscape to landscape Source and frame have the same ratio.
    What you see. The source fills the frame without padding.
  2. Fit landscape in portrait sample The width limits the uniform scale.
    What you see. The result has unused height.
  3. Choose a store upload Check orientation and device class against current requirements.
    What you see. Capture the appropriate game screen.

Predict before you run Can you use separate horizontal and vertical scales without reshaping the cabin?

Reveal the answer

No. A single scale keeps each feature's proportions. Recapture in the listed orientation when the store needs something different.

Complete checkpoint

Wide frame fills at 1600 × 900. Portrait fit is 900 × 506 with 1094 pixels of remaining height.

main.gd

extends Control

const Lab = preload("res://release_lab.gd")
const TITLE = "Capture honest store screenshots"
var ui: VBoxContainer

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

func build() -> void:
	ui.say("Check two frames. Keep the aircraft cabin proportions the same.")
	ui.option("Fit in 1600 by 900", fit.bind(Vector2i(1280, 720), Vector2i(1600, 900)))
	ui.option("Fit in 900 by 1600", fit.bind(Vector2i(1280, 720), Vector2i(900, 1600)))

func fit(source: Vector2i, frame: Vector2i) -> void:
	if source.x <= 0 or source.y <= 0 or frame.x <= 0 or frame.y <= 0:
		ui.say("Every size must be positive.")
		return
	var width_ratio := float(frame.x) / source.x
	var height_ratio := float(frame.y) / source.y
	var ratio := minf(width_ratio, height_ratio)
	var scaled := Vector2i(roundi(source.x * ratio), roundi(source.y * ratio))
	var spare := frame - scaled
	ui.say("Fit: %d × %d pixels. Space left: %d across, %d high." % [scaled.x, scaled.y, spare.x, spare.y])

release_lab.gd

extends VBoxContainer

var output: Label

func start(title_text: String) -> void:
	set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	offset_left = 32.0
	offset_top = 28.0
	offset_right = -32.0
	offset_bottom = -28.0
	add_theme_constant_override("separation", 12)
	var background := ColorRect.new()
	background.color = Color("#14283d")
	background.mouse_filter = Control.MOUSE_FILTER_IGNORE
	get_parent().add_child(background)
	background.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	get_parent().move_child(background, 0)
	var title := Label.new()
	title.text = title_text
	title.add_theme_font_size_override("font_size", 32)
	title.add_theme_color_override("font_color", Color("#ffd293"))
	add_child(title)
	output = Label.new()
	output.custom_minimum_size.y = 151.0
	output.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
	output.add_theme_font_size_override("font_size", 19)
	add_child(output)

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

func option(label: String, command: Callable) -> void:
	var button := Button.new()
	button.text = label
	button.custom_minimum_size.y = 46.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 = "Capture honest store screenshots"Creates a constant named TITLE. The expression uses the text inside the quotes.
  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. 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.
  12. ui.say("Check two frames. Keep the aircraft cabin proportions the same.")Calls ui.say with the values in its parentheses.
  13. ui.option("Fit in 1600 by 900", fit.bind(Vector2i(1280, 720), Vector2i(1600, 900)))Calls ui.option with the values in its parentheses.
  14. ui.option("Fit in 900 by 1600", fit.bind(Vector2i(1280, 720), Vector2i(900, 1600)))Calls ui.option with the values in its parentheses.
  15. func fit(source: Vector2i, frame: Vector2i) -> void:Defines fit, 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.
  16. if source.x <= 0 or source.y <= 0 or frame.x <= 0 or frame.y <= 0:Checks source.x <= 0 or source.y <= 0 or frame.x <= 0 or frame.y <= 0. The indented instructions below run only if this test passes.
  17. ui.say("Every size must be positive.")Calls ui.say with the values in its parentheses.
  18. returnFinishes the function right here. Any later instructions in this function are skipped.
  19. var width_ratio := float(frame.x) / source.xCreates a variable named width_ratio. The expression converts a suitable value to a number that can include a fractional part. Godot infers the type from the first value.
  20. var height_ratio := float(frame.y) / source.yCreates a variable named height_ratio. The expression converts a suitable value to a number that can include a fractional part. Godot infers the type from the first value.
  21. var ratio := minf(width_ratio, height_ratio)Creates a variable named ratio. The expression calls minf with the values in its parentheses. Godot infers the type from the first value.
  22. var scaled := Vector2i(roundi(source.x * ratio), roundi(source.y * ratio))Creates a variable named scaled. The expression packs whole-number x and y into one grid position. Godot infers the type from the first value.
  23. var spare := frame - scaledCreates a variable named spare. The expression calculates a new value from the expressions on either side of the operator. Godot infers the type from the first value.
  24. ui.say("Fit: %d × %d pixels. Space left: %d across, %d high." % [scaled.x, scaled.y, spare.x, spare.y])Calls ui.say with the values in its parentheses.
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 output: LabelDeclares output 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 = 32.0Stores the new value in offset_left. The expression reads 32.0.
  6. offset_top = 28.0Stores the new value in offset_top. The expression reads 28.0.
  7. offset_right = -32.0Stores the new value in offset_right. The expression reads -32.0.
  8. offset_bottom = -28.0Stores the new value in offset_bottom. The expression reads -28.0.
  9. add_theme_constant_override("separation", 12)Calls add_theme_constant_override with the values in its parentheses.
  10. var background := ColorRect.new()Creates a variable named background. The expression creates a new ColorRect object. Godot infers the type from the first value.
  11. background.color = Color("#14283d")Stores the new value in background.color. The expression builds a colour from these values.
  12. background.mouse_filter = Control.MOUSE_FILTER_IGNOREUpdates background.mouse_filter, which controls how this control participates in pointer and touch input. The expression reads Control.MOUSE_FILTER_IGNORE.
  13. get_parent().add_child(background)Calls get_parent with the values in its parentheses.
  14. background.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent.
  15. get_parent().move_child(background, 0)Calls get_parent with the values in its parentheses.
  16. var title := Label.new()Creates a variable named title. The expression creates a new Label object. Godot infers the type from the first value.
  17. title.text = title_textUpdates title.text, which controls the words a player sees. The expression reads title_text.
  18. title.add_theme_font_size_override("font_size", 32)Calls title.add_theme_font_size_override with the values in its parentheses.
  19. title.add_theme_color_override("font_color", Color("#ffd293"))Calls title.add_theme_color_override with the values in its parentheses.
  20. add_child(title)Adds the new node to the scene tree so that Godot can run and draw it.
  21. output = Label.new()Stores the new value in output. The expression creates a new Label object.
  22. output.custom_minimum_size.y = 151.0Stores the new value in output.custom_minimum_size.y. The expression reads 151.0.
  23. output.autowrap_mode = TextServer.AUTOWRAP_WORD_SMARTStores the new value in output.autowrap_mode. The expression reads TextServer.AUTOWRAP_WORD_SMART.
  24. output.add_theme_font_size_override("font_size", 19)Calls output.add_theme_font_size_override with the values in its parentheses.
  25. add_child(output)Adds the new node to the scene tree so that Godot can run and draw it.
  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. output.text = messageUpdates output.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 = 46.0Stores the new value in button.custom_minimum_size.y. The expression reads 46.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 rounds or windows become ovals, undo the stretch. Use crop or fit with a single factor and compare to the original.

Try a change

Ages 10–12. Capture and caption Galley, service and results. Ages 13–16. Calculate fit and the consequences of cropping for each source.

Official instructions