UI scaling - What is the difficulty?

The place to discuss scripting and game modifications for X³: Farnham's Legacy

Moderators: Moderators for English X Forum, Scripting / Modding Moderators, Moderators for the X3:FL Forums

Post Reply
User avatar
Nedimar
Posts: 1077
Joined: Sun, 11. Oct 09, 20:15
x4

UI scaling - What is the difficulty?

Post by Nedimar » Tue, 11. May 21, 18:08

Ok, looking at the X³:FL Egosoft and Steam forums there seem to be more than a few people who are disappointed that the UI of TC/AP/FL can't be scaled to fit modern resolutions.
The question is, is there really nothing can be done about this? I know that changes of the UI have been described as out of scope by several different devs over the years, but I don't really understand where
the problem lies. Downscaling the UI seems to be a non-issue - changing from 720p to 1080p for example doesn't lead to any display bugs.

It is like the UI elements just hit a fixed limit when going beyond 1080p resulution, which is curious, since the UI is just a bunch of textures projected on a mesh which both can be (in theory) stretched to any size.
Some aspects of the UI can be upscaled without any trouble, while others can not. I poked around in the UI files a bit and made the following observations:
  • the UI is projected onto simple rectangular meshes
  • the meshes are positioned on screen using fixed points
  • the meshes can be moved around by changing their origin point within the mesh
  • any UI scale change breaks mouse support, as the clickable UI elements remain fixed in size
    - clickables don't scale upwards of 1080p, but they will scale downwards
    - also, since X² can upscale without any issues at all I believe that mouse funtionality is at the core of the problem (X² screenshot for nostalgia's sake)
  • the following UI elements can be upscaled without any issues (example):
    - gravidar, hud icons, weapon display and ship info
    - sector map, galaxy map, information windows and subtitles
    - loading screen quotes
    - animated NPC faces
    - however, it is possible to go over board (example)
  • the monitors can both be upscaled too, both using different models as projection surface
    - the zoomed view uses a different mesh, which is the same for both monitors
    - this means it cannot easily be upscaled, since at least on monitor will be cut off when zoomed in
    - the video display resists any attempts of upscaling (example)
  • the sidebar and its submenus can be upscaled, but wile the submenus work the sidebar icons will not adjust to the screen borders
  • changing the size of tooltips crashes the game
  • fonts can be changed by just replacing them (as seen here)
    - this can lead to some issues, since many of the text displays are formated around the specific kerning keming of the Tahoma13 font
Without acccess to the code of the game I don't see any chance in getting the mouse support to work, but maybe there is a chance that the rest can be modified?
Anyway, I will continue to dream of a universe were EGOSOFT releases the source code :mrgreen:
The Astounding Adventures of the Albion Skunk
XUniverse: Trade Fight Build Stink

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24950
Joined: Sun, 2. Apr 06, 16:38
x4

Re: UI scaling - What is the difficulty?

Post by X2-Illuminatus » Tue, 11. May 21, 18:50

There is really nothing that can be done about it. ;) X3 was designed for 1:1 pixel mapping.

Quoting CBJ on this.
CBJ wrote:
Sun, 1. Feb 09, 16:24
It's not a simple option. The entire UI model would need to be rewritten to make it possible, which isn't an option I'm afraid.
CBJ wrote:
Mon, 2. Feb 09, 02:22
The decision to use a fixed size font was one taken very carefully. As players of X2 will remember, using a scaled font means scaling the entire UI and results in the whole thing being slightly fuzzy and indistinct for everyone. In order to get a truly clean, crisp appearance you need to use 1:1 pixel mapping for the UI, which is what the game does. For people who sit a long way from the screen or who struggle to see small fonts even close up, the workaround is to use a lower resolution. Using a lower resolution isn't necessarily as bad as some people are making out. Apart from the fact that using AA should smooth out a lot of jagged edges, if you are struggling to read the font then you probably won't be able to see the jagged edges much anyway!

There is no perfect solution to the problem of clarity vs scalability, short of having two completely different UI modes which would be very complicated and time-consuming both to write and to test. The 1:1 pixel mapped option gives the best result for the vast majority of players, including those who are prepared to set their screen resolution to a size that makes the fonts readable for them.
You can use another font file to slightly increase readability in X3. See this post for reference.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
DogyAUT
Posts: 44
Joined: Sat, 19. Jan 13, 19:29
x4

Re: UI scaling - What is the difficulty?

Post by DogyAUT » Thu, 13. May 21, 21:38

I am using a modified font aswell, because the original font is really hard to read on a 4K 27" screen.

As for UI scaling, wouldn't some kind of fixed settings without dynamic scaling work for X3?

Like a new option in launcher where you can pick original scale or large scale which would be basically all UI doubled up in resolution.

It would be still 1:1 but basically refer to graphics which are doubled in size.

I played X3R in 1080p and TC/AP in 1440p - that was still good and optimal, but going back to X3 for FL and seeing this on my new screen is hard.

Because this is really not pleasant to read (this is already with a larger font btw):

https://cdn.discordapp.com/attachments/ ... nknown.png
Last edited by Terre on Fri, 14. May 21, 08:32, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked

Post Reply

Return to “X³: Farnham's Legacy - Scripts and Modding”