Jump to content

[1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x] AnyRes Continued - Change your screen resolution on the fly


linuxgurugamer

Recommended Posts

On 4/21/2022 at 5:19 AM, Bit Fiddler said:

Game is started from steam "play" button, no command line options set.  I then just load a save, but resolution changes done with the game settings just do not seem to hold.  I am sure you are familiar with what I mean, as this was the reason for this mod in the first place...

I just saw this.  What about resolution changes made with the mod, do they stick?

Link to comment
Share on other sites

  • 2 weeks later...
3 hours ago, Bit Fiddler said:

Sorry , no.   no matter how I change the res.  they always shift.

Strange.  No one else has reported anything like this.

Is it possible there is something on your computer which is automatically resizing the game?

Link to comment
Share on other sites

  • 1 month later...

Would it be possible to allow to save a screen position alongside the resolution? I have it set up to be windowed 3840x2120, so I can access the windows taskbar at the bottom of my 4k monitor, but even though the width I've set is the same as my monitor width, it defaults to locating the window 5-10px to the right, so the right side of the window is cut off. If I can tell it to default to 0x0 on my main monitor that would save having to reposition the window manually each restart.

Link to comment
Share on other sites

26 minutes ago, Rodger said:

Would it be possible to allow to save a screen position alongside the resolution? I have it set up to be windowed 3840x2120, so I can access the windows taskbar at the bottom of my 4k monitor, but even though the width I've set is the same as my monitor width, it defaults to locating the window 5-10px to the right, so the right side of the window is cut off. If I can tell it to default to 0x0 on my main monitor that would save having to reposition the window manually each restart.

which window, the game window or the anyres window?

If the game window, then not really.  All this mod can do is change the size, the position is left to the OS 

Link to comment
Share on other sites

33 minutes ago, linuxgurugamer said:

which window, the game window or the anyres window?

If the game window, then not really.  All this mod can do is change the size, the position is left to the OS 

I mean the game window, so I guess no luck there. Oh well, thanks for letting me know.

Link to comment
Share on other sites

New release, 2.0.8

  • Added new option to save game window position (currently only 1 position saved)
  • Added option to settings page to enable/disable the buttons for saving the game window
  • Cleaned up some code, replacing some GUILayout.BeginHorizontal/EndHorizontal with using new HorizontalLayout, same for some vertical
     

@Rodger  ^^^^^

 

Link to comment
Share on other sites

Sorry for late reply, moved back to Korea, so I have been out of contact for a while.  But no, I do not think anything on my system is resizing the game.  Unless there is some hidden "Feature" in windows that does this.   However, I have been looking at the problem and I am fairly sure the missing Contract list, message window, etc. that reside on the stock tool bar along the right side of the screen are due to mismatched resolution.  I am fairly sure they are not really missing, but rather just being rendered outside of the screen space of the physical monitor.  So, when the game thinks it should be in 4k, but my display is set to something less than this, the game tries to render the windows at the (X,Y) coordinates of the right side of the screen based on a 4K resolution.   But since my display is actually set to 1920x1080 for example, the edge of my physical screen is actually not at 2160, but rather 1920, and the window is being rendered outside of my viewable screen space.  Of course, I do not know 100% this is what is happening, but it looks like this is the case to me.

Link to comment
Share on other sites

My physical monitor is a 4k monitor, and my windows desktop is set to run at 4k.  I try to run the game at something less than 4K, as all the UI elements do not scale properly, and sometimes they are just too small to read.  as for player log at what point in time do you want to see this?  before launch, or when there is a mismatch between what I have "set" and what is actually on my screen?   I will try to get several readings on this at various times and see if it changes.  I was just about to play anyway so this will be a good test.

 

Hmm maybe I am blind, but I do not see a player.log.  Where does it live?  Ok... never mind I found it.  but I do not see any screen resolution information in it.   It is just a huge list of missing / broken .cfg files.  I assume these are module manager trying to process patches for parts/mods that I do not have installed.

Edited by Bit Fiddler
Link to comment
Share on other sites

25 minutes ago, Bit Fiddler said:

My physical monitor is a 4k monitor, and my windows desktop is set to run at 4k.  I try to run the game at something less than 4K, as all the UI elements do not scale properly, and sometimes they are just too small to read.  as for player log at what point in time do you want to see this?  before launch, or when there is a mismatch between what I have "set" and what is actually on my screen?   I will try to get several readings on this at various times and see if it changes.  I was just about to play anyway so this will be a good test.

Start off with what Windows says (I assume you are on Windows, if not please let me know)

See this for the log files:  http://forum.kerbalspaceprogram.com/index.php?/topic/83212-how-to-get-support-read-first/

 

Your theory is reasonable, I'll need to see all the data to know for sure

Link to comment
Share on other sites

35 minutes ago, Bit Fiddler said:

player.log

 

it has not been updated in several months however.   Does it not get updated when I launch from Steam and have "Launcher disabled"?

That's the wrong one.

From the link I provided:

Windows:
- 1.8 or newer:
 %USERPROFILE%\AppData\LocalLow\Squad\Kerbal Space Program\Player.log
- 1.7.3 or older:
KSP_win\KSP_Data\output_log.txt (32bit) or
KSP_win64\KSP_x64_Data\output_log.txt (64bit) or
%USERPROFILE%\AppData\LocalLow\Squad\Kerbal Space Program\output_log.txt

 

Link to comment
Share on other sites

  • 6 months later...

I thought it was just an issue on my PC with multiple monitors, but after switching to my laptop I've noticed that after selecting a new preset, there'll always be a gap on the left side of the screen still. It's the same thing I reported earlier, but even when using the new save window position feature it still happens. Eg:

https://cdn.discordapp.com/attachments/966275238851653732/1060469768576053248/KSP_x64_EhAbMPZ3T6.mp4

Link to comment
Share on other sites

3 hours ago, Rodger said:

I thought it was just an issue on my PC with multiple monitors, but after switching to my laptop I've noticed that after selecting a new preset, there'll always be a gap on the left side of the screen still. It's the same thing I reported earlier, but even when using the new save window position feature it still happens. Eg:

https://cdn.discordapp.com/attachments/966275238851653732/1060469768576053248/KSP_x64_EhAbMPZ3T6.mp4

Try adding the option

-popupwindow

to the command line, wherever you start the game from.

 

Link to comment
Share on other sites

Oh that works great, thanks! Stops the offset, and gets rid of the title bar too in windowed mode. It did mean I couldn't move the window manually, but clicking onto the game window from another app makes it move to 0,0 anyway. Now it's basically borderless windowed, but with a gap at the bottom, exactly what I want!

Link to comment
Share on other sites

  • 1 year later...
19 hours ago, Ker Ball One said:

Feature Request

1)  Include UI Scale alongside Resolution.

2)  Remember resolution per scene and option to automatically switch when switching scenes

@linuxgurugamer
If I were to want to start modding mods (like AnyRes), how do I start? 

I know a bit of coding mostly in interpreted languages like python.  What tools would I need to compile and to start trial and error?

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
On 2/14/2024 at 10:50 PM, Ker Ball One said:

Feature Request

1)  Include UI Scale alongside Resolution.

2)  Remember resolution per scene and option to automatically switch when switching scenes

So I managed to learn enough in Visual Studio to modify this mod.

It can now automatically switch resolution and UI scale based on scene.  All it needs is a config file with the scene name (e.g. 'EDITOR', 'FLIGHT', etc.).  Each setting config now includes a "scale" attribute in addition to name, height, width and fullscreen.
Bonus, now you can set the UI scale beyond the slider limit of 200% which is VERY nice.  :)

 

Let me know if you @linuxgurugamer are accepting pull requests.

In the meantime...
https://github.com/KerballOne/AnyRes

Edited by Ker Ball One
Found out that GameSettings.ApplySettings() will apply UI_Scale
Link to comment
Share on other sites

I'm having some serious performance issues... any time the AnyRes window is open, the framerate tanks with periodic stutters, and it appears to be a RAM usage problem. MemGraph shows a massive spike in the garbage collection graph and more frequent GCs. It seems to happen regardless of the scene (I've tried KSC, VAB, Tracking Station, and in-flight), and regardless of the resolution or whether I actually press any buttons in the AnyRes interface. I'm on AnyRes 2.0.8 & KSP 1.12.5.3190.

Here's a video of the issue in the Tracking Station with MemGraph, the console log, and hardware performance info.

This mod has been super useful regardless, thank you for the work you've put into it!

Edit: Mod list

Edited by smackthepony
Link to comment
Share on other sites

On 3/2/2024 at 1:19 PM, smackthepony said:

I'm having some serious performance issues... any time the AnyRes window is open, the framerate tanks with periodic stutters, and it appears to be a RAM usage problem. MemGraph shows a massive spike in the garbage collection graph and more frequent GCs. It seems to happen regardless of the scene (I've tried KSC, VAB, Tracking Station, and in-flight), and regardless of the resolution or whether I actually press any buttons in the AnyRes interface. I'm on AnyRes 2.0.8 & KSP 1.12.5.3190.

Here's a video of the issue in the Tracking Station with MemGraph, the console log, and hardware performance info.

This mod has been super useful regardless, thank you for the work you've put into it!

Edit: Mod list

Well, it wasn't intended for it to be open all the time, so I didn't bother spending any time optimizing the window.  And it isn't really noticable until you leave it open in a game with a lot of mods (I just tested both situations)

I know where the issue is, I'll take a look at it

Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

Well, it wasn't intended for it to be open all the time, so I didn't bother spending any time optimizing the window.  And it isn't really noticable until you leave it open in a game with a lot of mods (I just tested both situations)

I know where the issue is, I'll take a look at it

Yeah you're definitely right, I didn't notice an issue until my mod list started ballooning. Doesn't really impact gameplay for me except for struggling to move my cursor to press buttons and close the menu, but it's a pretty minor inconvenience. Thanks for looking into it!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...