OAP Lizzard A game interface engine
Game interfaces, outside the game Settings
← The journal
event Display window · The game's screen Milestone

A display window that mimics real screens, and one pixel rule

Before text, the display window learned to behave like a real screen, with a set resolution, scroll bars, zoom and full screen. Then positions became the game's own 32-bit numbers.

Read the entry: A display window that mimics real screens, and one pixel rule

When I tried the zoom, it flickered. In a C++ Windows program I'd have hooked the erase and paint messages by then, and I said so. The view was rewritten so that nothing moves on screen, and then it was smooth.

Then I asked how fractional game coordinates were handled: at 4K a game unit is nearly three pixels. Positions are now kept as the game's own 32-bit values, so UIParent's scale of 0.6399999856948853 matches exactly, and one rule turns edges into pixels: a pixel is inside when its centre is. A probe run measured a strip of thin lines, and with pixel snapping on, every line lands where Lizzard puts it.

Not verified: how the game picks its scale at other resolutions, and drawing with pixel snapping off.