Adventure Game Studio | Forums

AGS Development => Engine Development => Topic started by: selmiak on 24 Apr 2013, 13:28

Title: Skinning the winsetup
Post by: selmiak on 24 Apr 2013, 13:28
Would it be possible to have another tab in the editor where you could custom skin the winsetup display. Like a custom background image and move around and resize the buttons and dropdownmenues to your likings?
For the latter part I imagine having some checkboxes in the properties where you can just turn on/off the visibility of the menu items so that noone has to search all that long if he accidentaly deleted a button.
Also customizing the font color and background colors and frames of the displays and dropdownboxes would be neat :)
also custom icons for mini/maximize and close and the ability to drag them around and also custom forms (who wants to be square all the time?) would be really great!

Should I add a feature request/suggestion to the tracker? Also, if this is engine related (which I doubt) please move it there.
Title: Re: Skinning the winsetup
Post by: Crimson Wizard on 24 Apr 2013, 13:45
The setup is a part of engine. "Winsetup.exe" just calls engine with "--setup" argument, which makes it display configuration window before running the game.
The look of the window is defined by resource description, incorporated in the engine.
At the moment, the engine displays setup even before loading any of the game data.
I guess it may be possible to change this, but it would be pretty messy IMO.
What about making separate (and cross-platform!) application instead?
Title: Re: Skinning the winsetup
Post by: selmiak on 24 Apr 2013, 17:52
Engine it is then  (laugh)

you mean an extra program AGS-winsetupmaker? Hell yeah! Sadly I know nothing about application coding...
Then again if this was included in the editor, maybe in general setting with something like (_) create custom winsetup and a new node appearing in the options tree then I also wouldn't oppose, also it would be less hassle with extra programs.
Title: Re: Skinning the winsetup
Post by: Joseph DiPerla on 24 Apr 2013, 20:54
Technically CW, since the engine setup writes a cfg file, anyone could write an app that creates or edits the config file. Maybe I am mistaken, but I think that would work.
Title: Re: Skinning the winsetup
Post by: selmiak on 24 Apr 2013, 21:34
wait, after bouncing this a bit around in my head, the setup window that opens when winsetup is run is actually part of the engine, hardcoded into the compiled game so to say?
Title: Re: Skinning the winsetup
Post by: Joseph DiPerla on 24 Apr 2013, 21:38
As far as CW is saying, yes. And after testing acwin.exe --setup without winsetup.exe in the directory, CW is right about that. But again, you can still make your own setup to edit or create the cfg file and it would work the same.
Title: Re: Skinning the winsetup
Post by: selmiak on 24 Apr 2013, 21:57
Alright. Then it still would be cool to have it all in the editor like I hallucinatedimagined and described above and when compiling just have it create an alternative userstyled winsetup.exe that doesn't run the acwin.exe with with --setup parameters but manipulates the cfg file. Maybe in 3.3.1 or 3.3.2 :)
Title: Re: Skinning the winsetup
Post by: Crimson Wizard on 24 Apr 2013, 22:01
Well, it is possible (and not much difficult) to make a window app, that reads the control layout from xml document.

But I have doubts that would have much use apart from setting background image. Why would you change list/button positions for every other game?
Title: Re: Skinning the winsetup
Post by: JanetC on 24 Apr 2013, 23:14
But I have doubts that would have much use apart from setting background image. Why would you change list/button positions for every other game?

This would actually be incredibly useful for commercial games. The problem with the current winsetup is that it confuses customers, since most of the options don't even apply for specific games. This is no big deal for AGSers because everyone knows what all the buttons do already.

Of course, it would be even more useful if you could change settings from within games!
Title: Re: Skinning the winsetup
Post by: Joseph DiPerla on 25 Apr 2013, 02:23

This would actually be incredibly useful for commercial games. The problem with the current winsetup is that it confuses customers, since most of the options don't even apply for specific games. This is no big deal for AGSers because everyone knows what all the buttons do already.

You and Dave were exactly who I was thinking about for this. It would be a huge benefit to commercial developers. As was said, not every option on winsetup applies to all games. Not to mention that it is a bland screen when it comes to commercial properties. But as was said, anyone can really develop a customized winsetup app (In Java, VB, Visual C#, etc...) externally from AGS and it could work. The CFG file after all is a plain text file and nothing more.

Janet, as for your last point... Again, you can do it from within the game. Take a look at the File scripting commands in AGS. Specifically ReadRawLineBack and ReadStringBack to edit the config file from within a game. The unfortunate thing about editing cfg files within a game is, that changing those settings would require a reboot of the game as most of those options are graphic/hardware related. For Game Translations, I just recently learned this, you can at the very least change THAT in-game using ChangeTranslation, Game.TranslationFileName and IsTranslationAvailable. In the game/global functions scripts there are other things that could qualify as "Settings" that you might also want to take a look at. Just a thought.
Title: Re: Skinning the winsetup
Post by: Calin Leafshade on 25 Apr 2013, 05:48
I think several custom winsetups have been made. AJA made one, Tzachs made one, I made one. They arednt difficult, we just need a standardised system for creating them.
Title: Re: Skinning the winsetup
Post by: JJS on 25 Apr 2013, 08:37
Maybe extending the script functions (if that is even necessary) and generally implementing the setup as an AGS game would be a good idea. The problem I see with having a dedicated windowed application is that it either requires a different GUI framework for different platforms or you have to add huge library dependencies. Having the setup run inside the engine would make it instantly cross-platform (ScummVM works like this) and configurable by the average AGS developer (no need to compile anything).

If the engine in setup mode starts with sane defaults (windowed, software rendering, 640x480, 32 bit game, sound disabled maybe) it should work as well as the current winsetup.
Title: Re: Skinning the winsetup
Post by: Crimson Wizard on 25 Apr 2013, 09:18
Maybe extending the script functions (if that is even necessary) and generally implementing the setup as an AGS game would be a good idea.
<...>
Having the setup run inside the engine would make it instantly cross-platform (ScummVM works like this) and configurable by the average AGS developer (no need to compile anything).
I have certain worries about relying on script in this task. This would mean that it will depend on game developer to insert a proper setup inside a game. On other hand, commercial developers (and some freeware) may stand against having "standartized" setup in their game. Hard-coded feature would work for emulator (like ScummVM) but not for engine meant to run games that are not yet developed.
There should be some compromise, like hard-coded "default" setup gui with possibility to customize it. But it should be protected against developer's attempts to completely remove or break it maybe?

If the engine in setup mode starts with sane defaults (windowed, software rendering, 640x480, 32 bit game, sound disabled maybe) it should work as well as the current winsetup.
Would it be nice to have a setup callable at ANY moment in game with an option to reboot the game if hardware settings were changed?.
In this case we would need a "technical" mode that would unconditionally freeze the game.
Rebooting should not be done with common save/load functionality, IMO, because that may trigger unexpected side-effects. There might be separate function that just stores current game state and reloads it next time game is launched (with certain command arguments) without calling for "on save"/"on restore" script events.
Title: Re: Skinning the winsetup
Post by: Calin Leafshade on 25 Apr 2013, 09:25
I think to *provide* a standardised setup is good for AGS but i think we should allow developers to override those functions and provide their own. The best of both worlds.
Title: Re: Skinning the winsetup
Post by: Snarky on 25 Apr 2013, 17:03
I don't really see why anyone who wants a special setup GUI can't just make one, and simply delete winsetup.exe. That way, people can still access the default setup GUI through the command line, which is something only savvy (or desperate) users will do, and game devs can make the setup utility exactly how they like, with just the options they want and just the layout they want. I'm a bit worried that otherwise, Wadjet Eye for example might take away the DirectDraw option because it confuses most of their users - and that's a setting I use. I'd rather not have to edit the cfg file by hand.

As people have said, it's really simple to build a native Windows app to read from and write to the CFG file. (And if you use something like wxWidgets or Qt to make it, it should be easy to make it cross-platform as well; although you'd probably need to make a separate one for tablets.)

I don't think it's a good idea to put effort into complicating AGS by adding features for making/customizing a regular Windows app, thereby duplicating functionality that is better supported by other tools. If the people who are interested in this don't know how to make it, I think it'd be better to just ask someone who can (or has already done so) to open-source their code.

(Whether the default winsetup.exe could be improved and made more user-friendly is another matter. I'm sure it could.)

On the other hand...

Of course, it would be even more useful if you could change settings from within games!

I'm in total agreement with this!

The unfortunate thing about editing cfg files within a game is, that changing those settings would require a reboot of the game as most of those options are graphic/hardware related.

I don't see why this can't be solved. Lots of other games manage to change graphics resolution, sound etc. from in-game without restarting.

Would it be nice to have a setup callable at ANY moment in game with an option to reboot the game if hardware settings were changed?.
In this case we would need a "technical" mode that would unconditionally freeze the game.
Rebooting should not be done with common save/load functionality, IMO, because that may trigger unexpected side-effects. There might be separate function that just stores current game state and reloads it next time game is launched (with certain command arguments) without calling for "on save"/"on restore" script events.

If AGS can't be made capable of changing these settings while the game is running, that sounds like a useful workaround.
Title: Re: Skinning the winsetup
Post by: JanetC on 27 Apr 2013, 18:17
Being able to change settings in the game itself would be ideal. I don't think there is currently a way to restart the game from inside the game - am I wrong? I would like to be wrong. :) I'd particularly like to be able to switch between windowed and non-windowed mode.
Title: Re: Skinning the winsetup
Post by: Joseph DiPerla on 30 Apr 2013, 20:35
I think there is a RestartGame function, but I believe it just sets the game to the launch point, but not really restart the engine itself.
Title: Re: Skinning the winsetup
Post by: Crimson Wizard on 30 Apr 2013, 21:24
I think there is a RestartGame function, but I believe it just sets the game to the launch point, but not really restart the engine itself.
The "RestartGame" take the use of the hard-coded save slot number. Also, game may set different restart point ( SetRestartPoint ).
Similar technique could be used in this case, but my point was that it should not be done as a normal save/load, because saving/loading may trigger user-defined events in game which may prevent from keeping game state 100% identical to what it was before.
Title: Re: Skinning the winsetup
Post by: Monsieur OUXX on 31 May 2013, 10:35
Why would you change list/button positions for every other game?
This would actually be incredibly useful for commercial games.

I recall Gemini Rue annoyed the tester when it got graded by a games testing magazine, because it had that "I'm old and I have weird, archaic start-up options" in-your-face attitude.
As an example, it would have been  much clearer for players if "DirectX5" and "Direct3D9" could have been replaced at will (by the developer) with "no hardware acceleration" and "hardware acceleration".

Title: Re: Skinning the winsetup
Post by: Monsieur OUXX on 31 May 2013, 10:37
Specifically ReadRawLineBack and ReadStringBack to edit the config file from within a game. The unfortunate thing about editing cfg files within a game is, that changing those settings would require a reboot of the game as most of those options are graphic/hardware related.

There's a module that does this: you change the settings in-game, then the game reboots and brings you back where you were.
Title: Re: Skinning the winsetup
Post by: Joseph DiPerla on 02 Jun 2013, 12:52
Oh. Well that can be helpful to many then. Do you know what it was called or have a link for the fine folks that would like to use it? Thanks Monsieur OUXX.