extends SceneTree ## Boot straight into the game and save a viewport screenshot (needs a window, not --headless): ## /Applications/Godot.app/Contents/MacOS/Godot --path . --script tests/screenshot.gd ## Writes screenshot.png to the project dir. Used to eyeball the build without a human. func _initialize() -> void: _run() func _run() -> void: Game.car_path = Registry.cars().values()[0] Game.level_path = Registry.levels().values()[0] root.add_child((load("res://src/game.tscn") as PackedScene).instantiate()) await process_frame Input.action_press("throttle") for i in 90: await physics_frame root.get_texture().get_image().save_png("res://screenshot.png") print("screenshot saved") quit(0)