• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Running project from IDE is always on primary monitor?

I know that this is probably only a minor quirk compared to everything else that has been raised, but was wondering if it would be possible when running your project from within the IDE that it should appear on the same monitor where the IDE is being run.

I run GMS2 on my third monitor, yet whenever I run my project to test how things are going it always runs on my primary monitor. As my primary monitor is my laptop screen it is not the best to show how things are running, and I would love for it to actually popup on the same monitor that I am running the IDE to save me from having to drag it from the primary monitor to my 3rd monitor.

I also notice that it seems to be this way with GMS 1.x as well.

Is there any way to get this to happen (just in case I haven't spotted it in the preferences)? If it is not currently possible, would it be something that would be considered to be added? What does everyone else think, would this be a benefit for more than just me?
 
Until this is fixed, you can move windows between keys using shift+windows key+left or right arrows, instead of dragging. Might be a bit less annoying for you, at least. :)

+1 for this idea, though. Would be even better to have a setting for it, letting us pick a monitor to launch on, or telling GM to launch wherever the IDE is. Or maybe GMS could just remember the last monitor the game was playing on, and launch there automatically if possible. That's probably more intuitive, actually...
 
Last edited:
Until this is fixed, you can move windows between keys using shift+windows key+left or right arrows, instead of dragging. Might be a bit less annoying for you, at least.
I had no idea of that windows shortcut. Thanks for letting me know about that one - awesome. :)

I guess there is just something in the application that defines that everything should open on the primary monitor as (unlike other windows applications) whenever I open GMS2 itself it is always started up on the primary monitor, even if during use I move it to one of my other monitors. Every other application that I know of (and use) will always open on the monitor it was last used on. It would be great if that could be addressed too as it is just something else that I need to do to get it off my laptop monitor (primary and too small) and onto one of my 23" monitors each time I load up GMS2.
 

Mike

nobody important
GMC Elder
You know you can tell windows which is your primary monitor yeah? Switch it to be the one you want to run the game on and then just keep the IDE on the one you currently have. The game will then run on whatever one windows tells it to,

You can change this in the display settings of windows.
 
@Mike Yes, I know that. But I want to keep my laptop monitor to be my primary, with my second and third for the main development work. The IDE and the running project should both be on the same monitor, and not have to force me to stuff around with my windows settings to change my primary monitor because GMS2 won't conform to other windows applications of remembering which screen it was last run on or doesn't execute the project on the same monitor that the IDE is on. And if I set my 3rd monitor to now be my primary, I end up with the taskbar on that screen taking up space that I don't want it to (and I know that I can autohide the taskbar, but I prefer not to).

Like I originally mentioned this is not something massive, but is a minor inconvenience whenever opening the IDE or running from within the IDE as I have to keep moving these back to the correct monitor - mainly because my laptop monitor has a lower resolution than my 2nd and 3rd screens and I predominantly want to keep that for lesser things (desktop icons, taskbar, etc) while I focus on developing on 2nd and 3rd monitors.
 

Mike

nobody important
GMC Elder
No, you can drag your taskbar where ever you want. I've got one monitor as my main one, and the task bar on another so that it doesn't take up valuable real-estate.

Opening on a specific desktop isn't something we're looking to add. This isn't a feature any games really do, All directx apps start up on the primary monitor. (pretty much)
 
No, you can drag your taskbar where ever you want. I've got one monitor as my main one, and the task bar on another so that it doesn't take up valuable real-estate.

Opening on a specific desktop isn't something we're looking to add. This isn't a feature any games really do, All directx apps start up on the primary monitor. (pretty much)
Ah, thanks for explaining why it opens on the primary monitor, at least. Most of my programs (for drawing, music, etc) open wherever I last left them, so I was wondering what was different about GM games. Fair enough, I guess! I still think it'd be more convenient if the game opened wherever you last opened it, but it's not a huge deal for me personally. There are a lot of other things I'd like to see added to GM first if this one would take more than ten minutes to change, hahah.
 
No, you can drag your taskbar where ever you want. I've got one monitor as my main one, and the task bar on another so that it doesn't take up valuable real-estate.

Opening on a specific desktop isn't something we're looking to add. This isn't a feature any games really do, All directx apps start up on the primary monitor. (pretty much)
That's really weird, because I checked that the taskbar wouldn't move from one monitor to the other before I last posted, but now it seems to be working. Guess anything is possible after a system restart. Okay, if it isn't something that is going to be looked into, then that's all fine. It was just the minor inconvenience of it. I wasn't so bothered about the game itself (once you have built it) but was more interested as to why the running from within the IDE (and teh loading of the IDE itself) is not remembered for where it was last opened - like all other windows applications tend to do.
 
P

Pudsy

Guest
I appreciate it's not currently a priority for GMS to natively support fullscreen on non-primary displays. And the OP was mainly after a way to shift the runner to another display when launched from the IDE, although I believe this may have some overlap with discussion for anyone wanting their compiled games to support similar (ie. windowed or fullscreen on a choice of connected monitors).

So I just wanted to leave some info/direction/suggestions for anyone here, or anyone searching the topic in future, as I just did...

Many games don't come close to properly supporting fullscreen on a choice of displays, though some do better than others in offering options for choosing which display, resolution, refresh rate etc.
And as mentioned, there are the keyboard shortcuts to shunt an application between desktops/displays (Win+Shift+Arrows)
With some games it's possible to drag a game in windowed-mode onto another display (or use those keyboard shortcuts), then Alt+Enter or toggle back to fullscreen using game options, and the game successfully sticks to that monitor.
But with other games, it just goes to fullscreen mode back on the primary display.
I have seen some games where Win+Shift+Arrows does actually allow the game to move in fullscreen from one display to another (though suspect those may have been borderless fullscreen windows). "Westerado" is one random example I just tried, for the curious!

So yeah, it's a bit of a mess out there, with few standards.
That doesn't mean we can't aim higher though...

Even with GMS compiled games (or the runner), it's possible to use those keyboard shortcuts to try to shift between monitors.
It works in windowed mode, but when the GMS game/runner is fullscreen & I try, it just makes the destination monitor go white (while the game actually stays on the primary monitor) until I shunt it back.
Possible a mixture of GMS not knowing how to handle the situation & possible gfx driver issues.

Anyway, there is a slightly older GMS1.4 thread here where potential solutions are discussed for making a game support "fullscreen" on any monitor (borderless fullscreen window if needed).
I believe it still applies with GMS2...
https://forum.yoyogames.com/index.php?threads/change-display.8568/

One big help would be the ability to toggle the "borderless" option via script/GML.
It appears that it can only be set once for the lifetime of the application, via the project settings? Or did I miss something?

If a game could toggle "borderless" at runtime, it could better support all of the following options:-
- true fullscreen on the primary display
- "fullscreen" borderless window on any other display
- windowed mode with (potentially sizeable) border

I'll leave it at that, as I realise it wasn't the original thrust of this thread. Hope it helps point someone else in the right direction in future though.
 

babyjeans

Member
One big help would be the ability to toggle the "borderless" option via script/GML.
I agree that this would be nice, I suppose its a bit involved as I believe you have to destroy the window and recreate it to toggle this flag (under the hood)
 

Paul Green

Member
Opening on a specific desktop isn't something we're looking to add.
Sorry to revive this old thread, but it's something I've stumbled across and it's something I'd like to be able to do, why, because I stream.

I like to have the GMS on the left monitor, but my primary monitor with all my stuff (streaming software, web browsers, etc, stuff I don't want the general public to see) on the right.

When I compile the program starts up on the right monitor, my primary monitor, and I have to move it.. Now I hear you say. So have the IDE on the right monitor, well, if I have Steam or Skype running while I'm streaming, the popup's appear on my right monitor, and I can't change those (at least I've not found a way), so that brings into the issue of 'privacy'. Yes I could stop Steam and Skype, but if you guys gave us the option to state which monitor the IDE ran and/or the compiled program ran, it would probably make a lot of peoples lives happier, mine included.

So, I ask.... please 'consider' this as a 'todo' item on your list?
 

Paul Green

Member
That won't help as I believe that which ever monitor I set as my 'primary monitor' not the numbers, will be the one that Steam and Skype use (and anything else that uses notifications)

That is not what I'd need, I'd like to be able to have all of GMS2 on one monitor (IDE and compiled run-times) and all the rest on the other, so all I'm streaming is GMS2 and my run-times during developments.

I did a test I switched my monitor config 1 to my primary monitor, and sure enough all my notifications moved over to that monitor too (Steam and Skype). The GMS2 exe appeared on the primary monitor.

So, this was the setup to start.



With this setup, the IDE is on monitor 1 (secondary), while I'm streaming, and all my Steam/Skype popups appear on monitor 2 (Primary), not on the stream, but also my .exe (runtime) that is generated when I hit 'play' appears on the primary, and I have to drag it into view for the viewers.

So, I did what you suggested, and switched my 'main display' to number one (now becomes the Primary).



And, sure enough the running compiled runtime exe from the IDE, now appears on the left monitor, which would be streaming, but all my notification from Skype and Steam will also appear over there, and would appear on the stream, which is not what I want.

You can see the line (to the right of the clock), were the right monitors windows icon is by settings, and the notification has now appears on the primary monitor, but this will appear on the stream.







I just want the games run-time code (after hitting the play button, or the debug/play button) to open on the monitor that the IDE is running on, not the primary, can the IDE not detect what monitor it's running on and then force the runtime exe to appear on the same monitor?

Hope this makes more sense, I admit I can get a little confusing at times.

Regards
 
J

Joshua Allen

Guest
@Paul Green
For Boss 101, this is what we do have the game start on a non primary monitor.

An ini file stores the window location whenever it changes. When the game starts up, it reads the ini file and move the window to the saved location. After it moved, "window_get_visible_rects" is called to check if it can be seen by the player, "window_center" is called if it can't.

We where unable to find a suitable method for starting in full screen on a non primary monitor.
 
Last edited by a moderator:
The last time I had to deal with this issue which was a few years ago, the way Windows works is that exclusive full-screen mode will always run on the primary monitor. This is a Microsoft Windows thing, not GMS.

To run full-screen on a non-primary monitor, you need to fake it by resizing the window to the display and make it borderless.

And this was not in GMS, this was just raw C/C++ code and Direct X.
 
P

Pudsy

Guest
Yep, when I looked into this before...
  • You can store/retrieve the window position as @Joshua Allen says, to remember which display to position the window on (eg. after the user has moved it). So this should at least allow @Paul Green to work around the issue of the game launching on the wrong display
  • The only solution I found for fullscreen on a non-primary display was to use borderless windowed mode & fake fullscreen by stretching it to the extents, as @IndianaBones suggests above.
See my post (#9 above, in this thread) with more details + a link to another related discussion...
https://forum.yoyogames.com/index.p...-always-on-primary-monitor.16019/#post-136863

But, that leaves you with a problem...
You can't currently toggle "borderless" mode at runtime in GMS2. Which means that if you want your game to support both fullscreen (fake or real) & windowed modes, your windowed mode will be lacking a border/frame.
That means the user can't click/move/scale the window (eg. to drag it between displays), unless you provide some kind of GUI for doing so yourself as part of the game.

I don't know if there has been any official suggestion put forward for GMS to allow you to toggle "borderless" at runtime, but I'd certainly add my name to such a suggestion.
 
Last edited by a moderator:

Paul Green

Member
@Paul Green
For Boss 101, this is what we do have the game start on a non primary monitor.

An ini file stores the window location whenever it changes. When the game starts up, it reads the ini file and move the window to the saved location. After it moved, "window_get_visible_rects" is called to check if it can be seen by the player, "window_center" is called if it can't.

We where unable to find a suitable method for starting in full screen on a non primary monitor.
Appreciate the tip, I've now added some code, which checks the x and y when I start the application, and then moves it over to the other monitor. It's a good solution to allow me to have my machines configured when I streaming.
 
Top