Jump to content

0AD GUI and icons


ConfusedRose
 Share

Recommended Posts

2 minutes ago, Palaxin said:

I mean the UI should horizontally stretch over a 3840x2160 display natively (without any scaling / reduced quality)

So you mean pixel perfect UI, that fits into pixels without rounding/scaling. And there's important note: you don't need to design UI for 4K, the main thing is ratio. That's why I mentioned that if you use sizes for UI elements divisible by 4 then you can fit a UI designed for 720p to any higher resolution. It only requires to choose correct image, like 32x32 texture for 1080p and 64x64 texture for 2160p. But you don't need to change its layout.

Link to comment
Share on other sites

Thanks for the explanations. Yes exactly, I meant pixel perfect UI. I think that in several years 1080p will be minimum and 4K quite common, so we should aim to provide 4K displays with full detail. I mean it is kind of a waste if you scale up to 4K with low-res textures (so several pixels are essentially used for the same color reducing the effective resolution).

So the UI elements you are talking about are just abstract elements (with the same relative proportions independent of resolution) which are filled with a texture that is chosen according to resolution. In theory we could have

2n x 2n textures for 720p
3n x 3n textures for 1080p
4n x 4n textures for 1440p
6n x 6n textures for 2160p

where n is any natural number. Right?

EDIT: if we want more different resolutions then

4n x 4n for 720p
5n x 5n for 900p
6n x 6n for 1080p
8n x 8n for 1440p
12n x 12n for 2160p

Edited by Palaxin
Link to comment
Share on other sites

2 minutes ago, Palaxin said:

I think that in several years 1080p will be minimum and 4K quite common, so we should aim to provide 4K displays with full detail.

For gamers - yes, for our audience - I doubt. A lot of people are far behind modern technologies. Sometimes I've been asked what do we do to support toasters. I'd love to switch to Vulkan and more modern techniques. But it's impossible at the moment to target mainly for 4K.

6 minutes ago, Palaxin said:

So the UI elements you are talking about are just abstract elements (with the same relative proportions independent of resolution) which are filled with a texture that is chosen according to resolution. In theory we could have

2n x 2n textures for 720p
3n x 3n textures for 1080p
4n x 4n textures for 1440p
6n x 6n textures for 2160p

where n is any natural number. Right?

Yeah, kind of that.

Link to comment
Share on other sites

4 minutes ago, vladislavbelov said:

For gamers - yes, for our audience - I doubt. A lot of people are far behind modern technologies. Sometimes I've been asked what do we do to support toasters. I'd love to switch to Vulkan and more modern techniques. But it's impossible at the moment to target mainly for 4K.

I understand we want to provide a game also for limited hardware. And I am happy as well when my 7 years old ultrabook with 4GB RAM, i5-4200U and integrated HD 4400 can run games that are less than 15 years old :)

But then I don't understand why models and textures get heavier with every update - at least there should be some kind of option.

Link to comment
Share on other sites

3 minutes ago, Palaxin said:

But then I don't understand why models and textures get heavier with every update - at least there should be some kind of option.

Because artists want to make the game more beautiful but they don't have strict checks like reviews for programmers, not all of them follow the existing guidelines. I had a discussion about that with Stan and I need to make an article with guidelines and some tools to control the creativity. And I agree we have a lot of content that is bad in terms of performance.

It's possible to scale textures down, but for models it's a lot of work for artists.

Link to comment
Share on other sites

12 hours ago, vladislavbelov said:

For gamers - yes, for our audience - I doubt. A lot of people are far behind modern technologies. Sometimes I've been asked what do we do to support toasters. I'd love to switch to Vulkan and more modern techniques. But it's impossible at the moment to target mainly for 4K.

What even constitutes a toaster? Pentium II MMX?

The problem with the must support toasters mentality is it discourages people from actually working on a new GUI or working on the renderer.

As for 4k, if the GUI is optimized for FullHD and font scaling is implemented the experience would already be much better than currently.

You could also say that to support a couple toasters you loose users of better hardware.

Link to comment
Share on other sites

15 hours ago, Palaxin said:

So the UI elements you are talking about are just abstract elements (with the same relative proportions independent of resolution) which are filled with a texture that is chosen according to resolution. In theory we could have

2n x 2n textures for 720p
3n x 3n textures for 1080p
4n x 4n textures for 1440p
6n x 6n textures for 2160p

where n is any natural number. Right?

EDIT: if we want more different resolutions then

4n x 4n for 720p
5n x 5n for 900p
6n x 6n for 1080p
8n x 8n for 1440p
12n x 12n for 2160p

Keep in mind image dimensions should be powers of two, e.g. 4×1024 is fine, 5×1000 causes errors.

3 hours ago, hyperion said:

As for 4k, if the GUI is optimized for FullHD and font scaling is implemented the experience would already be much better than currently.

Yes, 0 A.D. really needs decent text rendering (e.g. with pango). If and when texts can be properly scaled without compromising readability, then it no longer matters much what resolution user have or for which size the interface is designed.

Link to comment
Share on other sites

3 hours ago, hyperion said:

What even constitutes a toaster? Pentium II MMX?

For example Raspberry Pi, or platforms that still support only OpenGL1.5 and not higher.

3 hours ago, hyperion said:

The problem with the must support toasters mentality is it discourages people from actually working on a new GUI or working on the renderer.

As for 4k, if the GUI is optimized for FullHD and font scaling is implemented the experience would already be much better than currently.

I agree to move forward, the question is how many people we're ready to "lost" and when.

3 hours ago, hyperion said:

You could also say that to support a couple toasters you loose users of better hardware.

Not quite right, in that case we loose only people which think that if a game doesn't use RTX or something similar then it's a bad game. Because the game is playable on the modern hardware, even with scaling.

7 minutes ago, Nescio said:

Keep in mind image dimensions should be powers of two, e.g. 4×1024 is fine, 5×1000 causes errors.

You need powers of two only by technical restrictions of the final texture. So if UI uses an atlas then a piece of it can be a not power of two.

9 minutes ago, Nescio said:

Yes, 0 A.D. really needs decent text rendering (e.g. with pango). If and when texts can be properly scaled without compromising readability, then it no longer matters much what resolution user have or for which size the interface is designed.

Not only, you also have a lot of visual elements like buttons or icons that affect an impression.

  • Thanks 1
Link to comment
Share on other sites

16 hours ago, Palaxin said:

Yes exactly, I meant pixel perfect UI.

DPI decreases towards the invisibility of one pixel, and the stratification of devices is only growing (mobile devices, monitors with non-standard geometry, huge 8k TVs)

Pixel perfect UI - this movement is in the opposite direction

Link to comment
Share on other sites

1 minute ago, nwtour said:

DPI decreases towards the invisibility of one pixel, and the stratification of devices is only growing (mobile devices, monitors with non-standard geometry, huge 8k TVs)

Not in our case, we still have a lot of users with small displays (1366x768).

3 minutes ago, nwtour said:

Pixel perfect UI - this movement is in the opposite direction

You're talking more about aliasing and similar stuff. Pixel perfect in our case is more about how an image fits onto a display. Also shifting and scaling affects how GPU renders it.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, vladislavbelov said:

For example Raspberry Pi, or platforms that still support only OpenGL1.5 and not higher.

It runs ( ... out of memory) on pi ;)

pi has Vulkan support https://www.cnx-software.com/2020/12/04/mesa-20-3-released-with-raspberry-pi-4-v3dk-driver-panfrost-bifrost-support/

opengl 2 is like 15 years old.

 

1 hour ago, vladislavbelov said:

Not quite right, in that case we loose only people which think that if a game doesn't use RTX or something similar then it's a bad game. Because the game is playable on the modern hardware, even with scaling.

Text isn't readable on 4k, so in my book close enough to unplayable, but yeah still better than the pi example I linked above :) Well, there is indeed an undocumented/inaccessible gui.scale parameter which sort of works good enough but 99% of potential users will have dropped the game at that point.

Also rtx isn't relevant here as this is about the gui, the viewport is plenty good enough if we ignore some old ugly maps.

  • Like 1
Link to comment
Share on other sites

8 minutes ago, hyperion said:

opengl 2 is like 15 years old.

I believe you got my point.

8 minutes ago, hyperion said:

Text isn't readable on 4k, so in my book close enough to unplayable, but yeah still better than the pi example I linked above :) Well, there is indeed an undocumented/inaccessible gui.scale parameter which sort of works good enough but 99% of potential users will have dropped the game at that point.

We have 1.5% with 4K and 17.5% with GL2.1, so no choice at the moment. But I hope to move toward 4K.

8 minutes ago, hyperion said:

Also rtx isn't relevant here as this is about the gui, the viewport is plenty good enough if we ignore some old ugly maps.

Not quite true. We were talking about toasters and support in general. And we support them not because of UI.

  • Like 1
Link to comment
Share on other sites

Sorry for the late reply but had to browse some code first.

 

Found an old thread and there people were rather willing to drop old hardware if it makes sense going forward. We also learn that widelands started to require opengl 2.1 in 2014. I'd say the move was fair game back then if you had a decent argument in favour of it. Today just because is already a reasonable argument.

Requiring 2.1 for 0ad would allow for a major cleanup. First get rid of the reminder of FFP, then ARB/pre GL21, maybe gles (of the 17% you mentioned how many use gl4es). Then split render into include and opengl21 impl. Next improve split of render and graphics which seems quite messy currently. Once all api specific stuff is hidden behind the renderer interface you can add other implementations like vulkan or bring back gles if it still has value and someone is keen on working on it.

The current situation is subpar. There are vestiges of a partial rewrite long ago. Renderer has knowledge of some shaders while the intention was to have them independent(over-engineering?). There is even if GLES in if !GLES blocks (indicating it's even to complex for committers). Bluntly, a cluster@#$% that is hard to fix without making some cuts first.

Not saying you have to take the route I just outlined but there would be ample justification if you wanted to.

---

4K percentage should be slightly higher me thinks if properly supported, anyway automatically setting a reasonable value for gui.scale would already improve 4K support a lot.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 02/03/2021 at 10:51 PM, vladislavbelov said:

Preliminary results for our statistics:

Is there a place where they can be seen? To see more details about OpenGL, follow the changes in resolutions in the future and see what else is available there.

  • Like 1
Link to comment
Share on other sites

On 12/03/2021 at 11:01 PM, hyperion said:

Requiring 2.1 for 0ad would allow for a major cleanup. First get rid of the reminder of FFP, then ARB/pre GL21, maybe gles (of the 17% you mentioned how many use gl4es). Then split render into include and opengl21 impl. Next improve split of render and graphics which seems quite messy currently. Once all api specific stuff is hidden behind the renderer interface you can add other implementations like vulkan or bring back gles if it still has value and someone is keen on working on it.

That does work in general, but it won't solve the performance issue. Our art is unoptimized for old hardware/API, we can't have a lot of drawcalls there.

On 12/03/2021 at 11:01 PM, hyperion said:

The current situation is subpar. There are vestiges of a partial rewrite long ago. Renderer has knowledge of some shaders while the intention was to have them independent(over-engineering?). There is even if GLES in if !GLES blocks (indicating it's even to complex for committers). Bluntly, a cluster@#$% that is hard to fix without making some cuts first.

That's true that a cut helps. But in our case it's not enough. We have no strict technical rules and tools to control the engine usage. Without strong cooperation the game won't be faster.

On 27/03/2021 at 5:55 AM, tuxayo said:

Is there a place where they can be seen? To see more details about OpenGL, follow the changes in resolutions in the future and see what else is available there.

All results will be publisheb on the page https://feedback.wildfiregames.com/results/.

Link to comment
Share on other sites

23 hours ago, vladislavbelov said:

That does work in general, but it won't solve the performance issue. Our art is unoptimized for old hardware/API, we can't have a lot of drawcalls there.

So for recent (as in 5-7 years) hardware things are different? Besides better performance new features could be made available with a separate back-end? ;)

For old hardware a (semi-)auto-generated mod dropping props/variants from actors and similar stuff could do wonders. I mean if you can't have shadows or decent water why care about premium art for models.

I agree with the sentiment of there should be guidelines for art, not for the sake of old hardware but reasonably recent low spec one. As in the game should be playable on a laptop with integrated graphics card.

Link to comment
Share on other sites

19 hours ago, hyperion said:

So for recent (as in 5-7 years) hardware things are different? Besides better performance new features could be made available with a separate back-end?

With Vulkan our art isn't so slow since Vulkan allows to submit data via command lists - less app/driver time per each draw call.

19 hours ago, hyperion said:

For old hardware a (semi-)auto-generated mod dropping props/variants from actors and similar stuff could do wonders. I mean if you can't have shadows or decent water why care about premium art for models.

And all this stuff should be supported, have unified interface between new and old APIs.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...