OAP Lizzard A game interface engine
Game interfaces, outside the game Settings
← The journal
event Godot · Lizzard in a Godot game Milestone

The Godot game window, made to behave like the live window

On 5 November the Godot game was made to behave like the live window: it keeps its placement and settings, zooms and scrolls by the same rules, and saves the player's addon data. Two false starts on zoom and a stalled toolbox were fixed on the way.

Read the entry: The Godot game window, made to behave like the live window

I reported that the Godot game remembered nothing of its window and that zoom didn't work. It now keeps its place, its settings and the addons' data as the live window does.

Zoom took three tries. The first typed the zoom levels out again in a second place ('this is why you don't duplicate code', I pointed out), and the next made the picture blurrier instead of bigger. It now uses the live window's own code. Left open: why Windows flags Godot's window as not responding although it answers within milliseconds.

Three entries told this one step at a time. At my request (10 November 2026) they're brought together here, each kept whole below with its own date and kind; links to them still arrive here.

The entries brought together here (3)

event Milestone

The Godot window behaves like the live window

The Godot game now saves its placement and settings, uses the same zoom, fit and scroll rules as the live window, and saves the player's addon data as the live window does.

The.Pootler reported that the Godot game remembered nothing of its window and that zoom did not work. It now has its own section of the window settings file (its window, the toolbox, vsync, frame cap, painter, zoom, frame boxes and highlight), written when it closes and applied at the next start; two runs put both windows back exactly where they had been left. A vsync option went on the Screen tab for both hosts, and the Godot game now tells the world when the mouse leaves its window, so a hover highlight no longer sticks.

The.Pootler then pointed out that setting 2560 x 1440 in the Godot toolbox gave no way to see the rest of the screen: the requested screen size, Godot's window and the painter had come apart. The Godot window is now a view of the screen, as the live window is: Fit to window, Godot's own scroll bars above fit, and the same placing maths for both windows. Resizing the window no longer forces the resolution; a 'Follow the window' tick on the Screen tab does that for either host.

A 'resolution' test step lets a script set the screen size over the pipe, since UI Automation cannot drive the tab's combo box. Checked from a fresh start: 3840 x 2160 over the pipe, the whole screen shown at 60%, two wheel steps in with scroll bars, then Follow ticked. The shared zoom code has no unit test, because the test project does not reference the Windows Forms toolbox.

In the evening the Godot run stopped being read-only: SavedVariables and the game's settings are written at a reload and on closing, and the toolbox's choices are saved, as in the live window. The.Pootler's words: it should behave the same as the live window.

event Fix

Toolbox clicks stalled behind Godot's thread

An earlier fix that made the Godot window own the toolbox tied the toolbox's input to Godot's busy thread. It was replaced, and the game's failure to come forward from the taskbar was traced and fixed.

The.Pootler reported four things: the toolbox was very sluggish ('is it really on its own thread?'), the taskbar could not bring the game to the front, it ran at only 165 fps, and the hover highlight did not work. Real mouse clicks on the toolbox's tabs were measured. With the owner link added earlier that morning to keep the toolbox above the game, most clicks never registered within 10 s; without it they took 15 to 630 ms. In Windows, a window owned by another thread's window shares that thread's input handling, and Godot's thread runs flat out. The toolbox now follows the game through a WinEvent hook instead.

165 fps was vsync at the primary monitor's 165 Hz, not a painter limit. The hover highlight was built into the shared quad code, so both GPU painters draw it.

The taskbar problem did not reproduce at first. On the running game it turned out to have two causes. The toolbox was a taskbar window, so Windows grouped it with the game into one button that opened a thumbnail chooser. And after a thumbnail click, Windows made the game the foreground window but left it below the window in front, as a 50 ms recording of the foreground window and z-order showed. The toolbox is now kept off the taskbar, and the game raises itself when it gains focus. The.Pootler confirmed it works.

Also found: once, a scripted click went into The.Pootler's own World of Warcraft window, which had come to the front; the input script now refuses to send unless the Godot game is in front. Windows flags Godot's window as hung although it answers within milliseconds, and a plain Godot project-manager window is flagged the same, so the cause lies inside Godot. Not verified; left alone.

event Mistake and fix

Zoom in the Godot game: copied first, then done the wrong way

The first Godot zoom repeated the live window's zoom list in a second place, and its first working version made the UI blurrier instead of bigger. Both were corrected the same morning.

Asked to make Alt+Shift+wheel zoom work in the Godot game, the session first typed the zoom levels again in the Godot window. The.Pootler: 'this is why you don't duplicate code'. The levels, the next step from a wheel turn and the Alt+Shift test moved into one shared file that both windows use.

That version still zoomed the wrong way. It made the world smaller and drew it bigger. WoW's UI is laid out in units relative to the screen, so it came out the same size, blurrier, with a flicker as the world rebuilt. The.Pootler: 'nothing zooms - just flickers or becomes blurry'.

The fix uses the live window's method: the world keeps its resolution, and the picture is drawn zoom times as big, scrolled and clamped, with the pixel under the mouse kept under it. The placing maths is shared too. Checked by grabs of the Godot window at 150% and 100%, and by the game's own log of each wheel step.