4K support Caveman2Cosmos UI at 3840x2160 resolution

Pit2015

Emperor
Joined
Jun 28, 2015
Messages
1,743
Location
Germany
As i want to use UEM - Ultimate Earth Map: https://forums.civfanatics.com/thre...-and-svn-update-compatible-by-pit2015.552901/ in 4K resolution @Toffer90 and me working on 3840x2160 resolution Caveman2Cosmos 4K support, talk and screenshots and fine tuning will happen here. If you have display problems when using 4K resolution you can post here. Menu's and Buttons/UI will be enlarged because its to small on 4K currently.

For first try UI should be enlarged by 100% and texts by 150% i think. 4K map screenshot and city screenshot attached.
 

Attachments

  • 4kmap.jpg
    4kmap.jpg
    2.9 MB · Views: 226
  • 4kcity.jpg
    4kcity.jpg
    1.9 MB · Views: 181
Last edited:
One question, what's your monitor size? Pixel density will be high on a 24"
4K is something I'd imagine one would use on a 32" or bigger monitor.
The game has no way of knowing monitor size or pixel density, so I don't want to enlarge stuff too much so that it gets too big on a big screen.

Then again, one usually sit further away from a bigger screen, one might say.
But this is a computer game, so players tend to sit relatively close to the screen even if they use a 32".
 
Last edited:
Using a 85" UHD TV. 3 meters TV, but monitor size does not matter, buttons to small on every monitor in 4K, resolution and scale should work on small and large monitors, as its resolution based. Better buy TV's now then monitors, they are good for gaming now and larger, prices lowered.

Like this:

 
Last edited:
Using a 85"
Ah, ok, then I'll take your opinion on the matter seriously. Just needed to know that you didn't expect UI to be large on a 24" in 4K; as that would make it way too large on an 85"
I mean, you are supposed to see more of the map compared to the UI on a higher resolution.

I take it you are seeing way too much of the map and too little of the UI, and that I can work with.
 
Ah, ok, then I'll take your opinion on the matter seriously. Just needed to know that you didn't expect UI to be large on a 24" in 4K; as that would make it way too large on an 85"
I mean, you are supposed to see more of the map compared to the UI on a higher resolution.

I take it you are seeing way too much of the map and too little of the UI, and that I can work with.

Here you have a view distance demo and why TV's are mostly better now for gaming:


@Toffer90 Btw, to see more of the map is cool, but texts, numbers and buttons/icons are to small on 4K, top UI part may be enlarged a bit, rest looks to have enouth space mostly.
 
Last edited:
Btw, to see more of the map is cool, but texts, numbers and buttons/icons are to small on 4K, top UI part may be enlarged a bit, rest looks to have enouth space mostly.
I can't do much about text size, but anything else I can make bigger.
The exe only supports 5 different font sizes, and they can't be changed after the game is launched. So the best I can do is make everything use the biggest of the 5 so that all text have the same size on that resolution, maybe some things could use the second biggest font size.
e.g. on 1080p the third biggest font size is used in tooltips, I think I made it so that the second biggest one is used in tooltips on 4K res already.

Edit: One could make a modmod that increase the size of all of the four font sizes specifically for high pixel density players.
I won't be making the modmod, as a lot of UI code needs to be adjusted for it, because bigger text may not fit inside the UI without accommodating the bigger text.
 
I can't do much about text size, but anything else I can make bigger.

As mentioned i tryed, exe is supporting larger fonts over 21.

"You can experiment by adjusting text size in:
Caveman2Cosmos\Resource\Theme\C2CTheme_Common.thm
Code:
with SF_CtrlTheme_Civ4_Control_Font
{
GFont .Size0_Normal = GFont("Sylfaen","Regular", 13, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size0_Bold = GFont("Sylfaen","Bold", 13, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size1_Normal = GFont("Sylfaen","Regular", 15, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size1_Bold = GFont("Sylfaen","Bold", 15, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size2_Normal = GFont("Sylfaen","Regular", 17, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size2_Bold = GFont("Sylfaen","Bold", 17, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size3_Normal = GFont("Sylfaen","Regular", 19, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size3_Bold = GFont("Sylfaen","Bold", 19, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size4_Normal = GFont("Sylfaen","Regular", 21, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size4_Bold = GFont("Sylfaen","Bold", 21, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));
}

The numbers 13-15-17-19-21 are their sizes and can all be set to whatever."

For the text is cool, setting to 21 works but still a bit small, setting to 31 is cool but then UI cant handle it, can you enlarge UI for that for only 4K resolution? Screenshots of 31 font...


{
GFont .Size0_Normal = GFont("Sylfaen","Regular", 31, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size0_Bold = GFont("Sylfaen","Bold", 31, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size1_Normal = GFont("Sylfaen","Regular", 31, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size1_Bold = GFont("Sylfaen","Bold", 31, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size2_Normal = GFont("Sylfaen","Regular", 31, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size2_Bold = GFont("Sylfaen","Bold", 31, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size3_Normal = GFont("Sylfaen","Regular", 31, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size3_Bold = GFont("Sylfaen","Bold", 31, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));

GFont .Size4_Normal = GFont("Sylfaen","Regular", 31, GFlags(GFontFeature, GFC_FONT_ALPHA), 0, GRectMargin(2));
GFont .Size4_Bold = GFont("Sylfaen","Bold", 31, GFlags(GFontFeature, GFC_FONT_ALPHA, GFC_FONT_BOLD), 0, GRectMargin(2));
}

Font size 31 will be good for 4k, looks nice and works. But UI has to adapt also buttons/icons.


I can create a modmod for the font size no problem. I also can create a 4k modmod if you let me know where to change the UI, if you want 4k support integrated into C2C without modmod let me know if you want to build it in. Font size 31 to go with for 4K...
 

Attachments

  • 4kfont31.jpg
    4kfont31.jpg
    2.8 MB · Views: 156
  • 4kfont31city.jpg
    4kfont31city.jpg
    2 MB · Views: 103
  • 4kfont31civic.jpg
    4kfont31civic.jpg
    933.3 KB · Views: 81
  • 4kfont31pedia.jpg
    4kfont31pedia.jpg
    1.3 MB · Views: 119
Last edited:
If you want 4k support integrated into C2C without modmod let me know if you want to build it in.
That won't be possible I told you. Those font sizes will be way too big for 1080p. Simple as that.

I mean those changes you are trying out in C2CTheme_Common.thm can never be in C2C proper as they make the text too big on normal resolutions.
Those 5 font sizes need to fit the need of all resolutions in core C2C.
That's why I said it must be a modmod specific for 4k.

Text is already too big on 1080p according to some players, some want smaller values in that file than it currently have. What it currently have is a compromise.
 
That won't be possible I told you. Those font sizes will be way too big for 1080p. Simple as that.

I mean those changes you are trying out in C2CTheme_Common.thm can never be in C2C proper as they make the text too big on normal resolutions.
Those 5 font sizes need to fit the need of all resolutions in core C2C.
That's why I said it must be a modmod specific for 4k.

Text is already too big on 1080p according to some players, some want smaller values in that file than it currently have. What it currently have is a compromise.

Yep than modmod, or if you can code it so that its resolution based, like 4K resolution selected, font size 31 then load other larger UI then it may work in core C2C, can be done for all resolutions.
 
Last edited:
Yep than modmod, or if you can code it so that its resolution based, like 4K resolution selected, font size 31 then load other larger UI then it may work in core C2C, can be done for all resolutions.
The font sizes seems to be too exe controlled for me to know how to program them to change mid-game.
The best I can do is control which of the 5 font sizes available are used dynamically based on resolution usage, though that I've already done for most interface already, could fine tune that some more in some places perhaps.
 
Ok, until you build up that system to be resolution based i will set the font size to 23 will work mostly with current UI and 4K is bit better to read. If you can do that for 4K resolution in core, set all best to 23 or 21. 23 works mostly good in current UI, not perfect but better. Letz see what i can do with further updates.

Creating modmod now...

RELEASED: C2C-4K V1.0

As i want to use UEM - Ultimate Earth Map in 4K resolution i created this C2C-4K mod:

https://forums.civfanatics.com/thre...cosmos-ui-at-3840x2160-resolution-mod.664400/

Download if you want to game in 4K resolution.
 
Last edited:
Top Bottom