ScreenWidth
The width in pixels of the game screen.
Stored width
- Applies to
- client settings
- File
SUN.INI- Section
[Video]- Value
- integer
- When omitted
640The startup read has already opened the screen, so this read keeps the width the screen runs at. That width is 640 unless the command line gave one.
This second read happens with the rest of the client settings, after the screen is already open, and it does not resize the screen. The width it stores is the mode the display options screen starts from, and the width the game returns to when a new mode is declined there.
Choosing a new mode on the display options screen asks for confirmation and then switches to that mode on trial. The game stores the new width only if the player keeps the mode. Declining it, or letting the confirmation time out, switches back to the stored size.
Leaving the options menu, or accepting the game controls dialog, saves the stored width to sun.ini with every other client setting. The file therefore has a ScreenWidth once either has been used.
Width the display opens at
- Applies to
- client settings
- File
SUN.INI- Section
[Video]- Value
- integer
- When omitted
- ComputedA dimension left out keeps the size given on the command line, if any. If either dimension is still unset, both become 640 by 480.
The game opens its screen at ScreenWidth by ScreenHeight pixels. This read happens at startup, before the game window exists. After that, only the display options screen changes the size.
Writing -1 for either dimension makes both 640 by 480, even when the launch option gives a size.
A size written in sun.ini wins over the resolution launch option, which fills in only a dimension the file leaves out.
If the renderer cannot start at the chosen size, the game shows a video error and exits.
The sidebar takes 168 pixels of the width, and the tactical view gets the rest.