Linking to the Winsetup through a settings panel

Started by Ghostlady, Fri 25/10/2024 04:24:50

Previous topic - Next topic

Ghostlady

If I set up a "settings" gui and add a button for setup, how can I link in the winsetup file to get accessed?
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Khris

#1
You can change some settings like language and fullscreen/windowed while the game is running. So the question is, what do you want to achieve?

My point is, even if there was a way to open winsetup from inside the game, I don't think it's the solution to your problem. Winsetup changes acsetup.cfg, which is only read when the game is started.

Ghostlady

What I was looking for was an option to play in window mode through a settings panel. Since it's an older game with older graphics, playing in a windowed mode may be beneficial to some.
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

eri0o

You can add a button to toggle from

Code: ags
System.Window != System.Window;

Ghostlady

My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Crimson Wizard

#5
@Ghostlady you can do that, but you should know that player may toggle between windowed<->fullscreen on their own by pressing Alt + Enter.

Ghostlady

My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Ghostlady

The Alt + Enter definitely works, but when I moved my game over to a very large screen, about 27 inches in length, it hosed up the game.  I couldn't move the cursor.  I had to kill it with task manager.  Is there something in the settings that needs adjusted?
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Crimson Wizard

Quote from: Ghostlady on Mon 28/10/2024 04:41:05The Alt + Enter definitely works, but when I moved my game over to a very large screen, about 27 inches in length, it hosed up the game.  I couldn't move the cursor.  I had to kill it with task manager.  Is there something in the settings that needs adjusted?

AGS had certain issues on very wide monitors. One of the known bugs is that switching from fullscreen to windowed on a ultra-wide monitor can lead to wrong window size. From your description I cannot tell what was the case though.

Which graphics driver do you have set in setup? I may suggest trying OpenGL, if Direct3D does not work. Also the general recommendation is to have "Fullscreen as borderless window" checked by default.

Ghostlady

That is exactly the problem. When I move it over to my large screen in window mode, all is ok. I change to fullscreen, all is ok. When I go back to windowed mode on my large screen, that's where I experience the mouse freeze.  I changed the setting to OpenGL but the problem still existed. "Fullscreen as borderless window" was already the default.

I also noticed that when I run the game through the AGS Editor I have sound/music but if I select the game exe I have no sound or music. Is there something I need to do.  I remember a "compile" function in the older versions which I don't see anymore.
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Crimson Wizard

#10
Quote from: Ghostlady on Wed 30/10/2024 02:21:01That is exactly the problem. When I move it over to my large screen in window mode, all is ok. I change to fullscreen, all is ok. When I go back to windowed mode on my large screen, that's where I experience the mouse freeze.  I changed the setting to OpenGL but the problem still existed.

This does not seem like exactly the same problem, as in the previous user case which I knew about it was Direct3D problem, and switching to OpenGL handled the issue. Also, I don't think they had a mouse freeze, they only mentioned window not resizing. The mouse freeze in game could be a result of mouse cursor being not inside the window though (as an example).

To clarify, have you changed to OpenGL in winsetup or in editor's "default setup" pane? What is displayed if you press "Ctrl + Alt + V" in game?

Is it only mouse that is freezed, or whole game; does the game continue to run, animate, etc?



Quote from: Ghostlady on Wed 30/10/2024 02:21:01I also noticed that when I run the game through the AGS Editor I have sound/music but if I select the game exe I have no sound or music. Is there something I need to do.  I remember a "compile" function in the older versions which I don't see anymore.

The command is "Build -> Build EXE", and there's also "Build -> rebuild all files".
Is your audio configured to be packaged inside "In Main Game Data" or "In Audio VOX"? This may be found when you select audio folders.
Do you have audio.vox present in the Compiled/Windows ?

Ghostlady

#11
Some interesting observations.  If I change my large monitor in be the "main display" the issue does not happen.
I had originally changed to OpenGL in the winsetup.  Tonight I changed it in the editor's "default setup" pane.  Issue happened in both places.
I found it happens in the room where there is animation going on. It's the mouse that freezes. I was able to capture it for you in video. You can see the mouse in the middle of the screen shaking. It is froze.

https://youtu.be/xjffgv36iuM



I'll look at the audio stuff tomorrow.


My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Ghostlady

For the Audio:
The command is "Build -> Build EXE", and there's also "Build -> rebuild all files". (saw these and did that)
Is your audio configured to be packaged inside "In Main Game Data" or "In Audio VOX"? This may be found when you select audio folders. (I can't find the setting for this)
Do you have audio.vox present in the Compiled/Windows ? (Yes, audio.vox and speech.vox)
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Crimson Wizard

#13
Quote from: Ghostlady on Thu 31/10/2024 18:51:23The command is "Build -> Build EXE", and there's also "Build -> rebuild all files". (saw these and did that)

So it still does not work when you run game.exe from Compiled/Windows?
Which version of AGS are you using?
Do you have anything set in "audio driver" in winsetup other than "default"?

Quote from: Ghostlady on Thu 31/10/2024 18:51:23Is your audio configured to be packaged inside "In Main Game Data" or "In Audio VOX"? This may be found when you select audio folders. (I can't find the setting for this)

It's in Project Explorer -> Audio -> Double-click any audio folder ("Music", "Sound" etc) -> DefaultBundlingType

Ghostlady

This time when I looked in the compiled folder the game file was not there.  So I redid the Build EXE and it created a new one.  Now the music works.  ???  So a little confused about that but I am happy it is working now.
Did you see my post above about the frozen mouse?
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Crimson Wizard

Quote from: Ghostlady on Fri 01/11/2024 00:42:21Did you see my post above about the frozen mouse?

Yes, it looks as if the engine restricted mouse movement to a tiny rectangle in the middle of a screen.

eri0o

Perhaps it's using the native game resolution as the dimension to restrict the mouse?

The video code that figures the exclusive fullscreen video resolutions is a bit confusing.

Crimson Wizard

#17
Quote from: eri0o on Fri 01/11/2024 10:17:58The video code that figures the exclusive fullscreen video resolutions is a bit confusing.

Please elaborate, how is it confusing?

Note, the problem happens when switching to the windowed mode, with OpenGL renderer too (which does not support exclusive fullscreen) and the user said that she has "borderless window" checked in setup.

Quote from: Ghostlady on Thu 31/10/2024 06:21:39Some interesting observations.  If I change my large monitor in be the "main display" the issue does not happen.

I think this may hint what the source of the problem is, the engine likely relies on the "main display" settings when selecting size of the window and drawing rectangle.

Ghostlady

Going forward, should I put the setting back to what it was or leave it as OpenGL.  I am thinking of when the game is complete and put on Steam, I would prefer the best possible performance and less people having to fiddle with settings.
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Crimson Wizard

Quote from: Ghostlady on Fri 01/11/2024 18:14:50Going forward, should I put the setting back to what it was or leave it as OpenGL.  I am thinking of when the game is complete and put on Steam, I would prefer the best possible performance and less people having to fiddle with settings.

Only settings in Default Setup are written into the config in Compiled/Windows,
you may still experiment and test the game with different settings by changing them in winsetup. Winsetup writes config file in your user documents, and that won't affect the game that you distribute to others.

As for which setting is best, I cannot tell that personally, it may be worth asking game developers with popular commercial releases, they likely track these and other usage statistics.

SMF spam blocked by CleanTalk