• 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!

Windows Change display

J

Joshua Allen

Guest
How would I go about changing the display?

Methods like “window_center()” and “window_set_fullscreen()” always get set based of the users main monitor but we want the user to be able to choose what monitor to go full screen on.
 
R

renex

Guest
Unfortunately fullscreen only works on the main display on windows.

If you need something else then research borderless fullscreen or seek a DLL that does what you need.
 

Tim

Member
Unfortunately fullscreen only works on the main display on windows.

If you need something else then research borderless fullscreen or seek a DLL that does what you need.
Thanks for the response. (I'm working with Joshua on the same game he's asking this question about).

Yeah, I think at this point we're putting out the feelers for a GameMaker developer or programmer who might have solved this problem *or* could help us solve this problem. We are looking into the whole "roll your own" answer so that's happening. If someone can help us though - we'd be very grateful.

I imagine anyone shipping a GameMaker game on Windows would be interested in this solution. Clearly games have shipped without it (Undertale, Nuclear Throne, Risk of Rain) but in late 2016 it's a dink in most PC purchaser's eyes to not support something like this. That's only my opinion of course and I'm not looking to start a debate on multi-monitors and games.

So, help appreciated and thanks in advance!

Best,

-Tim
 
R

renex

Guest
I actually came into this problem multiple times, but ultimately decided to not care seeeing as this is mostly a Windows limitation that people are used to. Even titles like Dark Souls 3 only fullscreen to the primary screen. It's sad.

Things like browsers and the such don't actually use proper fullscreen - they just remove borders and fill the current display rectangle, thus not creating the added benefits of fullscreen suited for a game. Namely, mouse locking and improved vertical sync.

A dll that can return the coordinates of the multiple screens would solve this problem because the game could borderless itself into the screen it is centered at. I haven't researched into this specific solution but I believe it is fairly simple to produce.

I researched a bit and this dll package includes source code that can be modified to use this function to retrieve the area of adjacent screens.
 
J

Joshua Allen

Guest
Thanks for the response.

You actually do not need to use a DLL to get the coordinates of the multiple screens - window_get_visible_rects() returns an array which can give you the coordinates. I also don’t know a way for a GameMaker game to toggle borderless mode from inside the game and even this obviously won’t remove a taskbar.

The thing we’re looking for is the ability to call a true multi-monitor full screen solution from within our game.

Again, thank you for your continued help with the problem.

-Joshua
 
R

renex

Guest
window_get_visible_rects
Oh I had no idea this existed.

It can be exploited.
I also don’t know a way for a GameMaker game to toggle borderless mode from inside the game
If it's the main screen we can toggle normal fullscreen, which removes the taskbar. Then, on a secondary display we can hack the window rectangle to encompass the entire monitor, creating fake borderless. I could experiment a bit with this to see if it's possible, but currently I happen to not be using a secondary display (I usually do).
 
P

Pudsy

Guest
Good discussion here, which I stumbled upon after some searching.
Sorry for the slight necro, but I believe this is all still relevant, even with GMS2.

Thanks to Josua for pointing out "window_get_visible_rects()"
It seems there's still no way to toggle "borderless" mode via script? (can only set it on or off for the entire lifetime of the app via the settings window)

Did anyone get something working acceptably, using mentioned techniques or otherwise, in either GMS1 or GMS2?
eg. true fullscreen on primary display, "fake borderless fullscreen" on any other connected display, while still being able to support windowed mode with (potentially sizeable) border

No need to dig out code/examples. Just wondered whether it was feasible, or if there are any other surprises lurking, before I embark on a similar path.
Thanks!

EDIT: Oh, I also found this more recent (but only slightly-related) thread, RE: the IDE always launching the runner on the primary display. I guess the root issue is the same though...
https://forum.yoyogames.com/index.p...-from-ide-is-always-on-primary-monitor.16019/
 
Top