Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TripTilt on Sat 26/11/2011 19:42:39

Title: Modal AGS
Post by: TripTilt on Sat 26/11/2011 19:42:39
So after tangling around with AGS for some time, reading all kinds of interesting topics within the forum and seeing how creative and open minded this community is I had an idea to make this wonderful Engine even better and thought I better share it. :D

Modal AGS
When you are not playing fullscreen but in a window a really nice feature would be to set the window on top of everything and black out the rest. It doesn't have to be all black, 90%-95% opacity black should be enough. Setting the opacity in winsetup would be even better. And clicking into the black just resumes the normal behavior of the desktop, just like when you click on another window when running an AGS game now. This will help the player concentrate on the game better when he can't see his browser or IM behind the game all the time ;)
Title: Re: Modal AGS
Post by: Monsieur OUXX on Wed 30/11/2011 14:22:40
Not a silly idea
Title: Re: Modal AGS
Post by: Ali on Wed 30/11/2011 14:40:08
Agreed, I've been wishing for this for ages!
Title: Re: Modal AGS
Post by: monkey0506 on Wed 30/11/2011 14:58:57
Here's how you can make this happen:

- Press Print Screen
- Open M$ Paint
- Make the canvas really small
- Paste
- Select all
- Delete
- Paint bucket, flood fill all black
- Save
- Set as desktop background

:P It's an interesting suggestion, I've seen some web apps do the same thing.
Title: Re: Modal AGS
Post by: Khris on Wed 30/11/2011 15:44:47
I had a black jpg I opened with an image viewer and set to fullscreen in the background.
In XP's image viewer, just hit F11.
Title: Re: Modal AGS
Post by: Calin Leafshade on Wed 30/11/2011 17:09:25
This is pretty doable without too much alteration of the engine i think.

Someone sort that..
Title: Re: Modal AGS
Post by: Shane 'ProgZmax' Stevens on Wed 30/11/2011 17:44:02
You could take away the windows borders around the game viewport as well, that way you have a seamless effect. 
Title: Re: Modal AGS
Post by: Wyz on Wed 30/11/2011 18:56:28
I've been using Khris' method but a built-in feature would be cool, never really thought about it. Let's create one!
I think it can be done with a plugin: setting the window mode to borderless and spawning a new window that is transparent for the background.
Title: Re: Modal AGS
Post by: ddq on Wed 30/11/2011 19:50:40
Related, but I'd like some sort of border in windowed mode that doesn't respond to clicks. Too many games put room edges and hotspots way too close to the edge.
Title: Re: Modal AGS
Post by: DoorKnobHandle on Wed 30/11/2011 20:03:14
While we're at it, we should have a 'borderless' (I and most commercial games that implement this refer to it as 'fullscreen (windowed)' mode rather) mode in addition to windowed, fullscreen and this windowed with black border stuff! It looks exactly like fullscreen but in reality it's just a fullscreen window without borders (and the contents are scaled of course, just like in fullscreen mode). It's a relatively new thing (Starcraft II has this mode for example), but I already wrote Direct 3D applications that allowed this mode - it's extremely easy to implement. With it, you can alt-tab super quickly and it also takes much less time to initialize when your game starts!
Title: Re: Modal AGS
Post by: David Ostman on Wed 30/11/2011 23:51:09
I experimented with this a few weeks ago since I played Skyrim in a borderless fullscreen window, and it was fantastic (google SBW.exe and Skyrim).

It's just an AutoHotKey script that you can compile into an EXE as a launcher for your game.

The code I had launched my AGS game, but this is basically the same thing, found a sample code on some forum. Ctrl-Alt-F will fullscreen your windowed game and remove the border and title bar:

!^f::

Screen_X = %A_ScreenWidth%
Screen_Y = %A_ScreenHeight%

WinSet, Style, -0xC40000, A
WinMove, A, , 0, 0, Screen_X, Screen_Y
;WinActivate, A
return


Problem is it stretches the game to fit the screen. I'd rather just play a 640x400 game at 2x nearest neighbour with black border,  but I have no idea how to do that.

Second problem is if you alt-tab into another window and then re-activate the game by clicking on the window with the mouse (instead of alt-tabbing back), you lose all mouse interaction with the game until you alt-x and restart the game.

I would prefer something built into AGS for this, but honestly, an AHK script might just do fine with some tuning and we wouldn't have to wait for any official builds, after whatever fork is chosen, and things are organized enough.