Grid Sage Forums

Cogmind => Support => Topic started by: Sterlin on May 20, 2015, 10:44:42 PM

Title: Cogmind on a 4K monitor
Post by: Sterlin on May 20, 2015, 10:44:42 PM
Just started playing the game (loving it so far) and noticed that the automatic resolution picker gave me a strange resolution (double height, 1.5x width). I had to put the font on 20 Cogmind which looks stretched on my monitor.  I'm pretty certain it's because of my 4k monitor and I just looked for anyone here on the forum with the same issue but to no avail.

Didn't know if this was a known issue for anyone but I thought I would post about it.
Thanks.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 20, 2015, 11:10:36 PM
Wow, 4k. I haven't heard anyone playing above 2k yet. So, the solution here is to add another font. I never really envisioned resolutions above 2k so they aren't included with the game. Thank you for bringing it up. For now, download this file, and use its contents to overwrite the relevant files of your current game. It will enable 4k compatibility. (Update: See this post (http://www.gridsagegames.com/forums/index.php?topic=36.msg356#msg356) further below for a link to even more font options!)

Change your font to 36/Cogmind, set your map dimensions to 106x50, restart, and bam--you have 4k Cogmind ;D

I'll add this to the game for next release.
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 21, 2015, 09:56:41 AM
Alright I just downloaded the file you provided and changed the width and height, I opened the game up and what appears to happen is there is a black buffer for everywhere that isn't the original 1920x1080, I also tried windowed but the same result appeared without the buffer.

(https://www.gridsagegames.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2FOvU00NT&hash=51c593219c351888152ffa0e5ea6b7c5227bfaf2)
(if image doesnt appear) http://imgur.com/OvU00NT

EDIT: Dug a little further in to see if I could find an issue and it seems that the 36/Cogmind font gets reset to 12 similar to how in the config if you put something below 50 for height it changes back to 50. Could help
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 21, 2015, 10:02:42 AM
It looks like there might be a combination of issues here. First of all, make sure you have the font set to "36/Cogmind" in the options. Then (if that doesn't work completely), see if the dpi fix mentioned in this thread (http://www.gridsagegames.com/forums/index.php?topic=21.msg44#msg44) solves the rest. It looks like Windows is scaling the game automatically when the game doesn't expect it.
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 21, 2015, 10:29:59 AM
Now I'm sure it has to be the font being overwritten, I've just applied the fix mentioned in that thread and it made it smaller, each time I set the font to 36/Cogmind it overwrites to 12/Cogmind.

http://imgur.com/MP9AcjS

Is it possible that the check for minimum and maximum font sizes wasn't updated for 36 to be requested?
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 21, 2015, 10:33:43 AM
Based on your image there, you did need that other fix so now the pixel detail is correct, but the other issue could be something else: Is the game saving any other options you're changing? Do you see config files in /data/user/ ?
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 21, 2015, 10:38:27 AM
It doesn't appear that I have a data\user file with config files, did you mean "Cogmind\user\cogmind.cfg"? So far the config has saved all my other edits except font size, and no matter what font size I change it to (24,20,18,etc) it seems to always go back down to 12.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 21, 2015, 10:48:36 AM
Whoops, sorry. I'm getting really tired here... Yeah, I meant just /user/cogmind.cfg.

I now wish I had a high-dpi monitor and Win8 system to test what's happening with the font values. I'm surprised the other solution didn't solve this since it seems to be the same issue and it worked for daviwil.

Actually, I have another idea where I may be able to see what's up: Open the game, then attach the contents of "run.log" here (it's in the main directory with COGMIND.exe). That records what fonts are loaded and how/why.
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 21, 2015, 10:53:58 AM
Here it is.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 21, 2015, 11:03:38 AM
Well, that answers that (or answers something, anyway): According to the engine, the size 36 font is considered too large for your desktop resolution. I just rechecked the values and that's... not true. You have a 3840x2160 resolution, and with a fullscreen display

For now you could use the 24/Cogmind font, and even increase your map size with that one. Unless you find the size 24 font too small.

Another test you could do: Delete your cfg file and restart the game. Now that you have a new font in there, it should automatically use 24/Cogmind and increase your map size. (Also, you could keep a copy of the cfg file elsewhere in case this doesn't work and you want to revert any other options you set.)

But that still doesn't explain why the 36/Cogmind font is not fitting into your resolution. I need too look at this longer I guess.

Sorry about the troubles :/
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 21, 2015, 11:11:33 AM
Well I've figured out my issue, the fix that you said to try must have fixed 24/Cogmind and now it fits my screen, the automatic picker did its job correctly the first time but the DPI issue was there.

The font still looks slightly small on 4k, but with that fix the aspect ratio is 100% correct.

Thanks for the help, Glad I brought this up for anyone else that has issues on 4k.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 21, 2015, 11:30:59 AM
Whew, I was getting really worried there because I was running out of ideas ::)

Well, at least you can play and it's better than before, though I still have no idea why 36/Cogmind won't load for you. It should, and you should get 50% bigger objects than you have now :/

Because 36 is at the upper limit of what could fit it might be a problem for some reason, but another option is I could give you additional 26/Cogmind and 32/Cogmind fonts and you could probably use those. We should test that out actually, just to see. I'll work on that tomorrow (it's 1:30 AM here now) and upload them here for you to test if you'd like to try for bigger fonts.
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 21, 2015, 11:33:40 AM
I'd be glad to help test some fonts out.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 21, 2015, 11:18:26 PM
Have some new fonts for you (and anyone else with those large resolutions!):

Here's the new update data to overwrite current files. (More recent file below (http://www.gridsagegames.com/forums/index.php?topic=36.msg356#msg356).)

This package includes three new size 36 fonts (for a total of 5), though for some reason those aren't loading on your resolution yet. Instead it also includes three other font settings: one at size 28 and two at size 32. You'll have to reduce your map dimensions to enable them, as they'll make everything bigger.

One way to achieve the optimal (largest) setting is to let the game decide by setting these values in cogmind.cfg (before running the game):
Code: [Select]
fontSet=AUTO
mapWidth=0
mapHeight=0

Let me know if these work better for you!

All of these new font settings are included in the next release.
Title: Re: Cogmind on a 4K monitor
Post by: Sterlin on May 22, 2015, 06:47:36 PM
Just tried the files you sent, when I input the fonts into the config it defaults to 12/Cogmind again, and when I go to the in-game options the font options are not there, I tried to go through and look for the font folder and it seems that the config in data\font\config does not have the 28,32,36 fonts in the list of fonts to use. I have no idea if this gives you any helpful information but this is all of my insight into the issue.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 23, 2015, 03:46:57 AM
You looked in /data/font/_config.xt and didn't see the new fonts listed? I just downloaded the zip file to check and I see them there. Maybe the new file didn't overwrite the old one?

After you're sure the right file is there, you can see at the beginning of run.log which fonts are loaded and which aren't (after starting the game).
Title: Re: Cogmind on a 4K monitor
Post by: Chrysophrase on May 24, 2015, 08:01:31 PM
The zip has the file in the /data directory and not the /data/font directory.  That's the issue with the new download.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 24, 2015, 10:07:47 PM
Oh, whoops... I'm so tired from the launch that I really should not touch anything in the game right now :P

I'll fix that.

And hopefully you saw this and were able to get some other larger fonts working for you Sterlin?
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on May 24, 2015, 10:12:02 PM
I uploaded a new version with the correct directory structure.

Edit: As of Alpha 1b these fonts are all included with the game.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on June 18, 2015, 09:53:50 PM
Well, that answers that (or answers something, anyway): According to the engine, the size 36 font is considered too large for your desktop resolution. I just rechecked the values and that's... not true. You have a 3840x2160 resolution, and with a fullscreen display

...

But that still doesn't explain why the 36/Cogmind font is not fitting into your resolution. I need too look at this longer I guess.
I've been adding new fonts and yesterday realized why the size 36 font wouldn't be available to you under certain conditions: You must start in fullscreen mode in order to have the largest font size available, otherwise the engine will remove the largest suitable font because in windowed mode it will take into account the height of the window title bar required by the OS. Starting up in fullscreen mode will for many resolutions provide one step up in terms of font size, since there is no title bar in fullscreen.

The engine should probably be adjusted to re-check whether some new fonts might fit when switching to fullscreen from windowed.
Title: Re: Cogmind on a 4K monitor
Post by: veryfoodverygood on August 20, 2016, 02:51:22 PM
Hey Kyzrati - I know this is more than a year old, but I have the exact same problem described and I was wondering if there is anything else I can try to get cogmind to have the right size on a windows 8 computer with a 3840x2160 resolution. 

Edit: Figured out how to get 36 sized fonts on the 4k powered by windows 8:
Code: [Select]
fontSet="36/TerminusBold"
fullscreen=1
mapWidth=76
mapHeight=50

So far I've tried many combinations of turning off display scaling for cogmind.exe, setting the font size manually to 36/crisp, setting the font size to AUTO and the height and width to 0, running in fullscreen and windowed.

This game looks amazing and I'm really excited about it. , but right now it's so hard to see! And now I can see read the text on the screen!
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on August 20, 2016, 08:06:07 PM
Ahhh, I just typed out a bunch of stuff and didn't see you edited your post xD

Glad you figured it out!

As I figured it was the high DPI (http://www.gridsagegames.com/forums/index.php?topic=21.msg44#msg44) setting mentioned higher up in this thread.

(That's one of the few things I haven't been able to get Cogmind to do automatically since I have no way to test it here, so it has to be a manual settings change. If only I had access to a monitor setup like this I could see what's happening and figure out what to do about it... (So far I've taken several actions as advised by MS, but reportedly none of them have actually worked.))
Title: Re: Cogmind on a 4K monitor
Post by: veryfoodverygood on August 20, 2016, 08:25:28 PM
Hey Kyzrati - thanks for responding! I edited my last post as I was able to get to the larger fonts. I also described the steps I took to get there.  However it was a more frustrating journey than I expected.  Thinking on it, there was one thing that would have made my (and maybe other high resolution screen users) experience better:

If there had been an easy way to indicate to the game that I'm willing to sacrifice visibility for a larger typeface (for example, when hitting ctrl-PageUp/PageDown), I wouldn't have had to start digging around for help. Right now, the initialization process just assumes I want more height/width. then disqualifies those larger fonts that I'm looking for.  When I boot the game up for first the time, my cogmind.cfg reads:
Code: [Select]
fontSet="24/Smallcaps"
fullscreen=1
mapWidth=130
mapHeight=80

And looking at the run.log, COGMIND ignores all the fonts I want to use, they don't even show up as grayed out in the interface:

Code: [Select]
I=0000747 |   |   [font set ignored: 28/SmallcapsGlow] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/Smallcaps] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/SmallcapsLarge] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/Terminus] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/X11] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/X11Bold] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/Dina] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/Proggy] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/ProggyBold] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 28/Cog] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/SmallcapsGlow] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/Smallcaps] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/Terminus] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/Dina] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/Proggy] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/Cog] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 32/CogWide] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/Smallcaps] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/Crisp] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/Terminus] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/Proggy] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/Cog] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/TerminusFine] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/TerminusBold] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/X11] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/X11Bold] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/CogFine] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/CogNarrow] (resolution exceeds desktop)
I=0000747 |   |   [font set ignored: 36/CogWide] (resolution exceeds desktop)

tl;dr: There is no way in the games UI to indicate that fewer rows/columns is acceptable to me. I got to 76/50 from a comment in \data\fonts\_config.xt.

All that said, I understand where you're coming from in terms of the specific challenges offered by the games format and I really appreciate how you chose to offer more flexibility, be it at the cost of convenience. Just saying that the flexibility to have fewer rows/columns (to a point of course) would be a great addition!
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on August 20, 2016, 08:35:13 PM
The issue there is it's impossible to have fewer rows than 60, which is how the engine arrives at your ideal / largest possible font size (2160 / 60 = 36). (Width is not an issue because Cogmind is designed for a minimum 4:3 aspect ratio, and almost everyone uses 16:9 these days, so width is derived from the limiting factor--height.)

I wrote a lot about this (http://www.gridsagegames.com/blog/2016/01/alternative-ui/) on the blog earlier this year.

I agree that flexibility is nice, which is why I'm big on adding optional features, but this particular one has too large of an impact on the game design and architecture as a whole, so it's unfortunately not going to happen :(
Title: Re: Cogmind on a 4K monitor
Post by: veryfoodverygood on August 20, 2016, 09:16:05 PM
That is an awesome post, and I understand what you're saying about the width not being a limiting  factor while allowing smaller height values becomes impossible from a UI design perspective.   I think maybe I'm losing you when it comes to the different terms for height.

When I boot up Cogmind for the first time, it decides
Code: [Select]
mapHeight=80. I'm assuming this is the number of rows.   I can manually adjust that to
Code: [Select]
mapHeight=50 and I'm able to play with the larger fonts, 50  number coming from the comment in the font config
Code: [Select]
//ideal/optimized/maximum map dimensions and font size for each resolution (ui_preview reference)
// resolution font map letterboxing
// 3840x2160 36 76x50 12px (L/R)

But in your post and last comment, you are saying the minimum number of rows is 60... so what's happening when I set my mapHeight manually? Am I essentially making the game less playable and I just haven't gotten deep enough into the game to know it yet?

I attached two screenshots of the original config output vs my adjustment's output for context.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on August 20, 2016, 09:27:19 PM
Ah, number of rows I was referring to is entire window, not the map. The minimum map size is 50x50. The reason it decided to give you 80 on first startup was because before that point the DPI setting hadn't been manually changed, and that will cause it to be confused at the actual size of the window being created according to Windows. In this situation, I believe the best approach is to just delete the whole cfg file and restart after changing that setting, in which it should be detected and set correctly. But you've already manually set it yourself so it's the same effect.

And no you're not making it less playable at all! Cogmind was explicitly designed to work with a 50x50 map, so you're set up just fine now. I was just referring to what was an occasional call early on in development for a viewable map area even smaller than 50x50, so that even larger fonts could be used. Playing with a map larger than 50x50, on the other hand, works just fine.
Title: Re: Cogmind on a 4K monitor
Post by: veryfoodverygood on August 20, 2016, 10:08:59 PM
I see what you're saying now - map vs window size! Things are making more sense. That said, So I saw or similar advice earlier in the thread:
Quote
In this situation, I believe the best approach is to just delete the whole cfg file and restart after changing that setting, in which it should be detected and set correctly.
and it never let me go bigger than a 24 font.  So far the only way I could get to a 36 font was to do the manual setting I described above.  Not sure why that's the case, but if I can help you debug in any way, let me know.  I'm happy to volunteer my rig/time to further this game's development.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on August 20, 2016, 10:25:01 PM
Thank you very much. My question in this case would be: If you've already made the proper setting in windows via the .exe properties and delete your cfg file then try to restart, does it set the values properly and give you the size 36 font? (If not, you can just restore your manual cfg file after trying.)

I'm curious if that's even advice I should give (because it's easy), or if for now I should provide a separate manual cfg file for those with 4K monitors.

The ideal final solution would be to have the game detect and proactively ignore Windows DPI scaling, but everything I've tried so far seems to fail (I think, anyway--it would be much easier to test here...). The especially annoying thing is that Microsoft can't even get all of their own programs to scale properly, so how do they expect us to do it :P. It's been like this for years...
Title: Re: Cogmind on a 4K monitor
Post by: veryfoodverygood on August 20, 2016, 11:18:56 PM
Quote
If you've already made the proper setting in windows via the .exe properties and delete your cfg file then try to restart, does it set the values properly and give you the size 36 font?
Nope.  I created a fresh cogmind folder from the zip.  Set the .exe properties correctly.  Started the game. mapHeight=80, font=24. Deleted the config and tried again, same result.  Then I set both mapHeight & mapWidth to 50 and font size 36 became available. For kicks I tried setting mapHeight to 50 and mapWidth to 100 and it decided that max font was 28.  ¯\_(ツ)_/¯

Re: The Ideal solution - I hear you, I have no idea wtf Microsoft is doing... ever.  I tried making sense of this https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx and all I can say is I don't envy you this bug.
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on August 21, 2016, 12:48:16 AM
Yeah it's a pretty messed up scenario. I presumably found the "easiest" way to do it was to activate an explicit setting in Visual Studio that takes care of ignoring that piece of the OS for you, but it obviously didn't work. And the other runtime methods I couldn't determine how it was possible to use them in combination with my engine.

In any case, regarding the cfg deletion method maybe the exe-specific setting doesn't kick in until some moment after the program has already started? No idea :/

Seeing as it works fine when you set values manually, I'll look for another way to try to detect and set values that rather than based on what the OS says during startup, although given the current situation it would still require manually changing the OS exe setting. I could also include a separate cfg file which 4K players can copy over if needed.

Thanks for the info!

(Note: If I can come up with a temporary semi-solution I may pass it along to see if it works for you.)
Title: Re: Cogmind on a 4K monitor
Post by: Kyzrati on October 04, 2016, 02:12:34 AM
I was just investigating this issue for the Alpha 11 release, and solved it :)

The separate DPI scaling issue aside, I found an assumption deep in the resolution code that had assumed a maximum of 1440p, even though I had later added support for 2160p fonts. That's why you were being capped at size 24 until you manually edited the cfg, which skips the font guessing phase of startup. Come next week it will work automatically! Thanks for the help.