Age of Empires II: HD Edition

Age of Empires II: HD Edition

29 ratings
[Workaround] Play on 4k Monitor (Windows 8 & 10)
By Jakob and 1 collaborators
If you have problems playing the game on a monitor with a high resolution, this could maybe help you. I will show you how to zoom your entire game screen so you get a 1920x1080px-monitor-like experience.
 
Rate  
Favorite
Favorited
Unfavorite
Update: Better solutions available
If you are on the latest Windows 10 version, you probably want to check this solution first:
http://steamcommunity.com/sharedfiles/filedetails/?id=862524297
If that does not work, you can still try to use my tool, however it is adimtively a bit tedious to use and it has problems with multiple screens, which I was not able to resolve.
What will be fixed by this?
If you ever tried to play AoE2HD on a 3860x2160px screen or probably any screen bigger than 1920x1080px, you have probably started crying or laughing the moment you started the game, depending on what kind of person you are and how you deal with such situations. The units, buildings and especially the user interface is ridiculous small. The game on 4k is absolutely unplayable since you cannot read the numbers of resources you have and even the chat messages are too small to read from a apropriate distance. More importantly, you can forget any kind of basic micro managment like assigning a villager to another tree, since you cannot select single units quickly enough. But I guess scouting and map awareness is pretty awesome with the 4k resolution, so maybe you accept the tradeoff and play anyway on 4k ;)

Here is an image how it looks like in game:


This guide helps you to play the game on a smaller resolution than the native. What it does eventually, is similar to chose another resolution for a game to run on, what you sadly cannot do in this game by default.
How can I solve this problem?
Before you try this workaround, you should try what a Microsoft Studios Account Manager suggested to solve this problem: Change the resolution Windows runs on, then start the game. Try out Full Desktop and Full Screen as options within the game, since it could make a difference, but I have no confirmation of that, yet.

For me on a Lenovo Y50-70 this method does not work, and other users reported the same issue long time ago. Therefore we need something different.

With the solution I suggest, you can start the game in a window and set it to any size you desire. Then I help you to magnify this part of the screen until it fits the monitor perfectly.

First, I had a solution that involved the magnifier that comes preinstalled with Windows. However since I could not find a way to lock the view of this tool, I wrote my own little program that does the magnification for us. This is the solution I recommend to use, however the old workaround is described further below as well.
New, better solution
As mentioned above, I wrote a small program that we are going to use. The progam is smaller than 30 KB and should run without installation. If it does not work that easily for you, please let me know so I can fix it. As far as I can tell, the programm should run on Windows 8 and Windows 10, but not on older Windows versions. In case you are using Windows 7, you can still try the older workaround.

You can download the program here[github.com].

How to use it?

When you run the program, a console should open and hopefully you will find a dialog stating: Write help for a list of commands.
Now we are ready to start set up the game. But before you start the magnification, I highly recommend to read the entire paragraph, or you might find yourself unable to reset the view!

After starting the game, you must come back to the resizer program, write magnify and press Enter. That should resize the window to 1920x1080px (default value) and change your view in a way that it will look like full screen to you. If the game is not visible yet, use ALT + TAB to activate it. If the game window does not fit the screen perfectly, you will have to adjust some numbers which I will explain later. To reset to the normal view you will have to type stop (or just s) in the resizer program. You will have to use ALT + TAB to get to the program and most likely you will not even see the part of the screen where you are writing. This implies you might have to write it bilndly and you also need to find the correct window without seeing the whole screen.

To avoid the blind search for the resizer, you should think about installing Auto Hot Key[www.autohotkey.com]
With this program and the script inculded in the download of the program, you can press ALT + M to start magnification and ALT + S to stop it without even leaving the game.

To use the script, install Auto Hot Key first and then double click the file called hotKeyInterface.ahk. It will run a process in the background silently and work correctly as soon as you run the resizer.
Changing the programs behavior
With my program, you can play with any resolution you want, it will just need some adjustment from your side. Using the commands that are listed by the program when you type help, you can change this and all the other settings. To see the current setting, just type settings.

The resolution is the one the game is going to run in. You can change this, but you should always use the ratio of your screen. To change it, type the command setResolution.

The position can also be changed. It tells the program where on the unmagnified screen you want the game to be. By default it is at the top left corner with a distance of 50 pixels to the edge.

Once you found the correct settings for your machine, you can change the values in the config.txt file. The program will read the values from there whenver it starts running and when you type in refresh. Just make sure that you only change the values within the [], the script is not very robust against invalid input.

Common problems and their solution
Here I will provide the solution to the most common problems people could find:

Game window has the wrong size
If that happens, the scaling factor is probably wrong. This factor has to be the same as you once set it in Windows. It affects all of your Windows Interface (Task bar, windows menu) and can be changed in the display settings. When you are using a 4k Monitor, you probably have this on a value greater than 1. Personally, I use 2.5 and this is also the default value in our resizer, but you can change it with the setScaleUp command to the value you need.

Game window not centered
You will have to change the window offset using setXOffset and setYOffset. If you increase the x value, the window will ba moved to the right, if you increase y it will be moved down.

If your problem is not on the list, do not hesitate to contact me!
Old Workaround
We can use the magnify tool integrated in Windows which can be found at C:\WINDOWS\system32\magnify.exe to zoom into the game as we want. However that does not really make sense in full screen mode. So you change the game to windowed mode (ALT + ENTER) and then you can zoom in and adjust the placement and size of the window to fit the screen. Make sure you have enabled "clamp mouse to window" within the game options and changed the settings of the magnify tool to only follow the keyboard focus, but NOT the mouse. That should stabalize your view of the game and prevent you from exiting the game accidentally.

To be able to navigate on your computer while the zoom is turned on, you have to use keyboard instructions (ALT + TAB to switch between windows) which is the only way to get into the magnify tool after you have minimized.

Now that part with adjusting the size and position of the window certanly is annoying to do each time, but you can set it up so it can be done pretty quickly. Therefore I installed AutoHotkey from http://www.autohotkey.com/ which allows to size the window automatically by running a script. It might be different numbers for you or you maybe just like to play on a different size, but here is the script I use:

#SingleInstance force
!q::
KeyWait Alt
KeyWait q
SetKeyDelay, 0, 50
IfWinExist, ahk_class Age of Empires II: HD Edition
{
Send {RWin down}{Escape}{RWin up}
Send {RWin down}{NumpadAdd}{RWin up}
Send {RWin down}{NumpadSub}{RWin up}
Send {RWin down}{NumpadSub}{RWin up}
Send {RWin down}{NumpadSub}{RWin up}
WinActivate, ahk_class Age of Empires II: HD Edition
WinRestore A
WinMove A,, 868, 495, 1960, 1170
CoordMode, Mouse, Window
MouseMove, 900, 640, 0
Send {RWin down}{NumpadAdd}{RWin up}

IfWinExist, ahk_class magnify.exe
{
WinMinimize ahk_class magnify.exe
}
WinActivate, ahk_class Age of Empires II: HD Edition
}
else
{
msgbox, Age of Empires is not running.
}
Return

The script opens the magnify tool and places the game window at the center. The window will then be resized to 1960x1170px and sets the zoom to 200%. This should make it so the window fits your screen perfectly without any borders visible. One would probably expect it to be 1920x1080px, but that is not the case due to different factors, including the header bar for instance. For other screen resolutions you will have to adjust those numbers.

This script has to be saved in a *.ahk file and then you can simply double click it. When AutoHotKey is set up correctly, this will bind its behavior to the hot key ALT + Q . That allows you to run the game and then press those keys to set up the window correctly. The script should also work in full screen mode, it will change to windowed mode by itself.

Now whenever we want to play some good old Aoe2HD, we run the script, open the game and hit ALT + Q.

That's all! We can finally play on any new laptops and monitors! That is something, I was not able to do for months and I hope someone finds this helpful at some point.

To show you how it should look like, here is the same town again after pressing ALT + Q once:

Tips and Tricks (only for old Wokraround)
This workaround comes along with many small inconveniences. To help you deal with these, here are some tricks you might find useful:
  • If your window does not get centerd correctly, the problem could be that you moved your mouse. The script puts your mouse pointer at an exact location and then zooms to this position. If you move the mose, the zooming will happen in the wrong direction. Solution: Do not move the mouse after pressing the hotkey until the screen looks right.
  • To close the magnified mode you can use the built in hotkeys of the magnify tool:
    • WINDOWS + ESC to close the tool
    • WINDOWS + "+" to zoom in
    • WINDOWS + "-" to zoom out
  • If you accidently resize the window or lose focus, press [ALT + Q] again and hold the mouse for a moment.
  • If your mouse is not clamped to the window as it should after using the hotkey, click once somewhere outside of the window and click again inside the game afterwards. Now it should be clamped again. Of course you have to make sure that you do not change the focus of the screen in any way.
Known Issues (old Workaround)
  • The window can sometimes change its position when you navigate in the lobby or when you type chat messages. That means you have to move the window again slightly to see the game correctly. Or alternativly you can just use the hotkey again.

These things are not working as smoothly as we would like them to. If you know a solution to any of these issues, please let me know so I can add it to the guide!
Why is there no real 4k Support? I paid for a updated version of the game a second time!
Well, if you think like this, that is your opinion. However I for myself am quite happy that this game is still developed and we get new content for it. As it so happens, the game is pretty damn old. (No offense if you are, as I am, older than the game itself.) Now what that means, is that it was not built in a way modern games are, so you cannot compare it to modern releases. Everthing that is improved from the old version is basically a good thing, right? So that would probably be:
  • It runs on moderns machines.
  • Scales fine up to 1920x1080px
  • Officially supported online Mulitplayer
  • New content

For the price that is actually quite a lot, I think. But who knows, maybe we will get some real 4k support eventually, even if it is just stretched graphics so everthing gets bigger (and therefore playable) without refining any of the graphics. It really cannot be that hard, can it? Or maybe they should focus on fixing the bugs in the new expansion first, and look at problems of those few guys on a 4k monitor later ;)

Nevertheless, I love that the game is still developed and for that alone I thank the dev team a lot!

I wish you all great fun playing the game another 16 years!

/Urstein
< >
46 Comments
riyazmhda1 Sep 1, 2017 @ 1:38pm 
Hi. I had the same issue. I was able to solve this with the help of my friend. What I did was to change the display resolution to 2048x1152 and then I changed the size of text, apps and other items to 150%. Now its fine. It even works fine when you change to 175%. Its important to change both the resolution and the text size. Just by changing the resolution, the units still looks like ants. But by changing also the text size, the size of the units change. Hope this helps!
Dannysbkn Jul 14, 2017 @ 2:44am 
@Jakob: I stopped playing for almost a year and never answered your response, sorry. I started playing again after buying the RotR expansion in the steam summer sale.
Thanks for the transparency, I guess you were right, it was a false positive after all (i'm not a developer, so i just know the basics of programming).
And now i see there's a new fix :D. This shows what a great community the AoE community is!
alphaclone Jun 18, 2017 @ 7:28am 
big thanks!
no more "letters for ants"
Jakob  [author] May 13, 2017 @ 6:05am 
@ The white knight (♘), thank you a lot for the better solution and the guide! I've been quite bit busy lately and only saw your comment now, but I have now linked your guide so more people can find it. I will probably use your guide myself next time I find time for some AOE2, your effort is much appreciated :)
Mr. Sativa Feb 18, 2017 @ 11:01am 
thanks man! :steamhappy:
xup6.yc Feb 12, 2017 @ 5:20am 
thanks, your utility works pretty well, but i found it a bit inconvenient, so I found a new way to fix this 4K issue, I've created a guide here:
http://steamcommunity.com/sharedfiles/filedetails/?id=862524297
KH.tv | RidRay Feb 6, 2017 @ 1:34pm 
Is there a way for users with 2 monitors? the program stretches the game over my 2 monitors. all is to big like a heavy zoom on a part of the start menu. someone here who can help?
Alepsis Jan 2, 2017 @ 11:30am 
So, this lowers the resolution, would it also increase it?
[LST] Fighter5810 Dec 30, 2016 @ 8:03am 
Thank you for making this :D

Im having some trouble though :(

I have 2 screens and while normally the game only uses my main monitor when i use your tool it automatically uses both. I have tried both useMainMonitor and useLeftMostMonitor but it wont work.
Ive also tried fullscreen, fullscreen window and windowed mode.


Any help would be appreciated :D
Scorpion Dec 20, 2016 @ 3:42am 
How to get this programm?? i don't see any downloadbutton!