London Market 47 · Make the market usable without guesswork

Market Day London · Lesson 47 of 50 · Publishing · About 39 min

It's raining at Briar Lane. Can a player still tell which stall is open, find the right apple and finish the shift with the sound muted?

Watercolour of Nia carrying a basket past the produce, bread and flower stalls at a London street market.
What you’ll make Show order contents, basket state and delivery feedback using words and symbols that stay useful at smaller sizes.

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

Identify. Choose an entire shift. → Label. Use useful text and symbols. → Test. Try touch, focus and muted. → Record. List the support you verified.
Identify → Label → Test → Record
Godot checkpoint window for Make the market usable without guesswork
From the running Godot checkpoint.

Build it step by step

Language and tools in this lesson String templates, Array[String], String.join(), focus navigation, status text, accessibility trials.

  1. Choose an entire route

    List the actions from reading the clipboard to handing over a basket. Include a blocked move and a rejected handover. Try each action with sound muted.

    Why it works A usable title screen cannot tell you whether an entire shift is playable.

  2. Compare two descriptions

    Import checkpoint 47, open main.gd and press F5. Compare Show colours only and Describe order and basket. Find the value being described in both.

    Why it works Keep the facts fixed when comparing how different text helps the player.

  3. Read the order output

    Find show_order(). Read the lists and the part that uses join(). Change one required item and see which phrase changes.

    ", ".join(REQUIRED)

    Why it works Separate lists can make it clear which items are wanted and which are already in the basket.

  4. Check input and focus

    Use Tab and Shift+Tab to move through the lab. Activate a button with Enter or Space. Repeat on the reference project with keyboard and touch. Check visible focus and test the smallest supported display.

    Why it works Some players need to navigate without relying on a pointer or precisely aimed tap.

  5. Make results unmistakable

    Use different messages for a correct collection, full basket, wet tile and wrong order. Keep a useful text label next to any colour or sound cue. Test on the intended devices with assistive features you plan to support.

    Why it works Several cues can describe the same action. Verify features on the real build before claiming support.

  6. Document tested support

    Record each mode and action tested along with the device and build. Keep any limitations clear. With an adult, open any current platform accessibility listing fields and report what your build can demonstrate.

    Why it works A claim should correspond to something a user can do on the stated device.

Watch the values change

  1. Show colours only The lab uses a colour cue.
    What you see. Some users cannot tell which two items are needed.
  2. Describe order and basket Item names and a missing item are written.
    What you see. The next pickup can be chosen without relying on hue.
  3. Show finish feedback The lab names the order and collection point.
    What you see. The action and result are explicit.

Predict before you run If you can spot the red icon when sound is on, what other tests should you do?

Reveal the answer

Try reading the request as text and completing it muted. Check controls and feedback on the device you intend to support.

Complete checkpoint

The detailed view names the needed items and the basket contents. Finish feedback states what happened.

main.gd

extends Control

const Lab = preload("res://release_lab.gd")
const TITLE = "Make the market usable without guesswork"
var ui: VBoxContainer

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

const REQUIRED: Array[String] = ["apple", "flower"]
const BASKET: Array[String] = ["apple"]

func build() -> void:
	ui.say("Compare two presentations of the same order.")
	ui.option("Show colours only", show_order.bind(false))
	ui.option("Describe order and basket", show_order.bind(true))
	ui.option("Show finish feedback", finish_note)

func show_order(clear_text: bool) -> void:
	if not clear_text:
		ui.say("Watch the red and yellow symbols.")
		return
	ui.say("Order: %s. Basket: %s. Still needed: flower." % [
		", ".join(REQUIRED), ", ".join(BASKET)
	])

func finish_note() -> void:
	ui.say("Apple and flower handed over at the collection counter. Order complete.")

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("#20342e")
	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("#f3c991"))
	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 = "Make the market usable without guesswork"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. const REQUIRED: Array[String] = ["apple", "flower"]Creates a constant named REQUIRED. The expression makes a list whose items keep their order. The type after the colon says what kind of value it can hold.
  12. const BASKET: Array[String] = ["apple"]Creates a constant named BASKET. The expression makes a list whose items keep their order. The type after the colon says what kind of value it can hold.
  13. 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.
  14. ui.say("Compare two presentations of the same order.")Calls ui.say with the values in its parentheses.
  15. ui.option("Show colours only", show_order.bind(false))Calls ui.option with the values in its parentheses.
  16. ui.option("Describe order and basket", show_order.bind(true))Calls ui.option with the values in its parentheses.
  17. ui.option("Show finish feedback", finish_note)Calls ui.option with the values in its parentheses.
  18. func show_order(clear_text: bool) -> void:Defines show order, 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.
  19. if not clear_text:Checks not clear_text. The indented instructions below run only if this test passes.
  20. ui.say("Watch the red and yellow symbols.")Calls ui.say with the values in its parentheses.
  21. returnFinishes the function right here. Any later instructions in this function are skipped.
  22. ui.say("Order: %s. Basket: %s. Still needed: flower." % [Calls ui.say with the values in its parentheses.
  23. ", ".join(REQUIRED), ", ".join(BASKET)Continues the same instruction on a new line. This is one of the arguments, data entries or expressions started above.
  24. ])Continues the same instruction on a new line. This is one of the arguments, data entries or expressions started above.
  25. func finish_note() -> void:Defines finish note, 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.
  26. ui.say("Apple and flower handed over at the collection counter. Order complete.")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("#20342e")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("#f3c991"))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 a control cannot receive focus, check that it is visible, enabled and has a suitable focus mode before changing its tab order.

Try a change

Ages 10–12. Write two different labels for an order and a basket. Ages 13–16. Run a whole shift using two input methods.

Official instructions