Jump to content

Recommended Posts

  • Active+ Member

 

Since i've seen a lot of people bumping this old post from @ Helia01:

Spoiler

 

I've decided to make it happen, here is a video:

Spoiler

 

 

This is the hidden content, please

Alternative download links →

This is the hidden content, please
 

 

 

 

 

Edited by Froslass
New version
  • Metin2 Dev 190
  • Eyes 3
  • Think 1
  • Good 25
  • muscle 1
  • Love 4
  • Love 104
Link to comment
https://metin2.dev/topic/34337-game-window-resize-in-real-time/
Share on other sites

  • Active+ Member
2 minutes ago, Caos said:

I just tested it and it works while on the login screen and character select screen, but during loading and within the game, the screen goes black when resizing.

I do not know why it happens, it does not give me any errors.

As you can clearly see in the video this doesn't happen for me and other people, you either did something wrong or your source is different and you must adapt it to your use case

  • Active Member
On 2/12/2026 at 10:27 PM, Froslass said:

 

Since i've seen a lot of people bumping this old post from @ Helia01:

  Hide contents

 

I've decided to make it happen, here is a video:

  Hide contents

 

 

This is the hidden content, please

Alternative download links →

This is the hidden content, please
 

 

 

After all this time?


Awesome release 🥰

Edited by Helia01
  • Love 1
  • Active+ Member
16 hours ago, Helia01 said:

After all this time?


Awesome release 🥰

Froslass is there now

Spiderman Chad GIF

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Love 1
  • Forum Moderator
On 2/14/2026 at 3:36 PM, Caos said:

I just tested it and it works while on the login screen and character select screen, but during loading and within the game, the screen goes black when resizing.

I do not know why it happens, it does not give me any errors.

Your device is getting reset by the resize and you do not properly recreate your render targets, shaders and all of that. You must. Everything created outside of a MANAGED pool must be recreated in the restore device function

Gurgarath
coming soon
My Services

  • Active+ Member
3 hours ago, muiekanzidor said:

@ Froslass Thank you so much for this release, do you also have a solution for UI scale?

The ui does scale with this system..

1 hour ago, Froslass said:

The ui does scale with this system..

 

No it does not, I mean upscaling the UI - When you play on 1920x1080 the UI is too small. It should scale based on the resolution..

Also:

I implemented your system, but when resizing in change character/ingame, my client crashes - no syserr, no error.

  • Active+ Member
34 minutes ago, muiekanzidor said:

 

No it does not, I mean upscaling the UI - When you play on 1920x1080 the UI is too small. It should scale based on the resolution..

Also:

I implemented your system, but when resizing in change character/ingame, my client crashes - no syserr, no error.

You clearly implemented it wrong/your client is different and you must adapt it. Everything is written in the README provided with the system

  • Active+ Member

A user has pointed out how the window would move to top-left corner of the screen when resizing. I've updated the download link with the fix. For those of you who already installed the system:

//inside
PythonApplicationEvent.cpp
//inside
void CPythonApplication::OnSizeChange(int width, int height)
//search:
AdjustSize(width, height);
//REPLACE with:
SetRect(&m_rect, 0, 0, width, height);
AdjustWindowRectEx(&m_rect, GetWindowStyle(m_hWnd), GetMenu(m_hWnd) != NULL, GetWindowExStyle(m_hWnd));

 

  • 5 months later...
  • Active Member
Posted (edited)

This is a decent experiment, but it is still far from a complete real-time resolution system.

Changing the window size is only one part of the problem. You also need proper handling for:

Windows display scaling such as 100%, 125%, and 150%.

Saving the resulting resolution and scale correctly in config.cfg.

Restoring the same resolution and scale when the client is reopened.

Synchronizing the client when the Windows resolution or display scale changes.

Repositioning every UI window when moving from a higher resolution to a lower one.

In the video, the sash side inventory remains stuck around the middle of the screen after the resolution changes. That happens because the UI windows are still using coordinates from the previous resolution. Fixing only the taskbar or inventory is not enough; every saved and anchored window must be recalculated or clamped to the new screen dimensions.

There is also the common Windows border problem: your window opens with an offset on the right because the left position is treated as 0. In this mode, it normally needs to begin around -10px on the left so the visible client area aligns correctly with the desktop.

I implemented this some time ago using an actual in-game resolution pipeline: selecting a resolution from a dropdown, recreating the DirectX device with the new dimensions, applying an appropriate UI scale, synchronizing it with the real Windows resolution, generating correct defaults when config.cfg does not exist, and writing the correct resolution and scale back into the configuration.

That required considerably more C++ work than simply resizing the window, especially to make the entire UI behave correctly.

You should also add an independent in-game UI scale. Resolution alone is not enough. Someone playing at 1080p on a 24-inch monitor and someone playing at 1080p on a 50-inch television have the same pixel resolution, but the interface may be far too small or too large depending on viewing distance and screen size.

At the moment, this is a partially working window-resize implementation, not a finished real-time resolution system. The device handling, configuration synchronization, DPI scaling, coordinate conversion, and full UI repositioning still need substantial work.
spacer.png

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Active+ Member
13 hours ago, Anielle Noir said:

This is a decent experiment, but it is still far from a complete real-time resolution system.

Changing the window size is only one part of the problem. You also need proper handling for:

Windows display scaling such as 100%, 125%, and 150%.

Saving the resulting resolution and scale correctly in config.cfg.

Restoring the same resolution and scale when the client is reopened.

Synchronizing the client when the Windows resolution or display scale changes.

Repositioning every UI window when moving from a higher resolution to a lower one.

In the video, the sash side inventory remains stuck around the middle of the screen after the resolution changes. That happens because the UI windows are still using coordinates from the previous resolution. Fixing only the taskbar or inventory is not enough; every saved and anchored window must be recalculated or clamped to the new screen dimensions.

There is also the common Windows border problem: your window opens with an offset on the right because the left position is treated as 0. In this mode, it normally needs to begin around -10px on the left so the visible client area aligns correctly with the desktop.

I implemented this some time ago using an actual in-game resolution pipeline: selecting a resolution from a dropdown, recreating the DirectX device with the new dimensions, applying an appropriate UI scale, synchronizing it with the real Windows resolution, generating correct defaults when config.cfg does not exist, and writing the correct resolution and scale back into the configuration.

That required considerably more C++ work than simply resizing the window, especially to make the entire UI behave correctly.

You should also add an independent in-game UI scale. Resolution alone is not enough. Someone playing at 1080p on a 24-inch monitor and someone playing at 1080p on a 50-inch television have the same pixel resolution, but the interface may be far too small or too large depending on viewing distance and screen size.

At the moment, this is a partially working window-resize implementation, not a finished real-time resolution system. The device handling, configuration synchronization, DPI scaling, coordinate conversion, and full UI repositioning still need substantial work.
spacer.png

People have been asking this for years, nobody could make it work. I've literally read about it and made a release in 1 single day. If you and all the people on other forums who are selling a "premium" version of this can do that, it's because i gave you guys that initial tool, so don't come here to brag about it instead of thanking the guy that started it all. I've made this free release to solve a problem that other people couldn't solve, anybody can do stuff like saving the chosen resolution in the configs and read it again on client startup, so that's up to you to add on your server if you want it. Had i wanted to care about all this stuff i would have made a paid version on my website instead of releasing a free release on the forum.

You are welcome for that release btw

  • Metin2 Dev 1
  • Good 2
  • Honorable Member

Nobody cares what it does if it could do more.
There will always be one or two who will show you what is missing from everything. Mr. Perfectos they are. Not even a respond they worth.

  • Metin2 Dev 2
  • Good 3
  • muscle 1
  • Love 3
  • 2 weeks later...
  • Active+ Member
3 hours ago, sanyihun16 said:

I have a little problem this resize function what is the problem?
.png


this picture is freeze after  fullscreen open no error in client

You can dm @ Amun for help

  • Lmao 1

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.