Multi-monitor "Borderless fullscreen" spanning thru 1.5 displays

Post all other topics which do not belong to any other category.
avenger
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Mar 25, 2025 1:56 am
Contact:

Multi-monitor "Borderless fullscreen" spanning thru 1.5 displays

Post by avenger »

Hello, thought sharing this with the community should anyone else fancies expanding Factorio across multiple monitors but didn't have much luck.

It is widely available knowledge that Factorio uses "borderless fullscreen" as its own "fullscreen" mode. Commonly in 3D games (not Factorio's case) "fullscreen" uses hardware accelerated stuff that takes desktop away, so you can never "alt+tab" out of a game without turning off its display.

As I have two 1440p (plus a 720p tiny "monitoring") displays side by side, I wanted to play Factorio spanning thru them. Bad idea with two monitors, you see, as the player will stand right in the "bezel" between the monitors. Besides the title bar and Windows taskbar do their share in pollution, all around.

So, to me, perhaps the best would be to use 1.5 displays. That's right! One and a half. :) This way the characters stands around 30% to the left or the right of the fully occupied display while I can still use the partial display to see more of the map, place windows, etc.

I've been playing for some hours like that and have enjoyed it very much. So much I felt like sharing what I did should other people wanted to try. Of course, if you have three monitors, you won't have the "player in bezel" issue, so this probably won't apply in these cases. There's also a bit of math involved if you have screens with different disposition or resolution, but it shouldn't be too hard to get it.

The tool I used to make it possible is AHK, a free and open source tool pretty known among the gaming enthusiast world as a "macro" thing. In this case, we use it to mangle the window to make it look more "full screen-ish" just like borderless fullscreen does (but not).

Basically I remove the title bar and move the window around to make it look "borderless fullscreen" yet span thru the screens. I let the Windows Taskbar be visible and it mixes very well in the end.

Ados enough, let's get to the script:

Code: Select all

/*
 * What we do here: resize the (hopefully only) open instance of Factorio
 * to take 1.5 screens in my 2x1440p set up.
 */
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.

if WinExist("Factorio: Space Age") {
 WinActivate
 WinSet, Style, -0xC00000
 WinMove,,, -1280, -8, 2560 + 1285, 1420
 MsgBox, Adjusted Factorio window
 exit, 0
} else {
 MsgBox, Unable to locate running Factorio Instance.
 exit, 1
}
Notice a few things:
  • you'd need to adjust the values for your screen depending on what's the primary and what layout you are using
  • it's perhaps better to set up Factorio to start in windowed mode (it starts with a tiny window
  • the script should be run once every time you start Factorio - I keep a shortcut in Desktop; as the game starts loading I just run the script and let it do its stuff
  • I move the window 8 pixels outside viewable area upwards to hide its "unhideable" top bar. It becomes pretty thin, but still ~8 pixels large. Then I compensate in the height so it fits its bottom part right.
  • If you happen to move the window around accidentally, just run the script again and it should position the window.
  • I decided not to keep the script running as I only need it to resize the window, so it is run-and-quit regardless of success. But AHK supports monitoring to keep stuff around.
Well, hope this helps somebody else around in the same boat!
Post Reply

Return to “General discussion”