window/resize_reflow¶
Goal¶
Learn how to make layout react to window size changes without breaking world-space simulation.
Why this tutorial exists¶
Games need both:
stable world-space rendering in virtual coordinates
responsive UI anchored to screen edges
This tutorial demonstrates both in one scene.
Source map¶
Settings profile:
examples/settings/window/resize_reflow.ymlExample builder:
examples/catalog/window/resize_reflow/main.pyScene:
examples/catalog/window/resize_reflow/scenes/scene.pyRender passes:
packages/mini-arcade-core/src/mini_arcade_core/engine/render/passes/world.pypackages/mini-arcade-core/src/mini_arcade_core/engine/render/passes/ui.py
Runtime flow¶
Window resize events update viewport state in window service.
Scene reads fresh
vp.window_w/heach tick.World draw op stays in virtual space (
worldpass).UI draw op recomputes panel/footer layout in screen space (
uipass).
What to verify¶
Resize the window continuously.
world marker movement remains stable in virtual space.
top-right panel reflows based on current window size.
bottom footer stretches with window width.
resize countincreases when dimensions change.
Run¶
mini-arcade run --example window/resize_reflow
mini-arcade run --example window/resize_reflow --pass-through --backend native
Controls¶
Resize the window
F1-> debug overlayESC-> quit
Next step¶
Map input from screen-space to virtual-space: screen_to_virtual_input.md