If I set up a "settings" gui and add a button for setup, how can I link in the winsetup file to get accessed?
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.
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.
You can add a button to toggle from
System.Window != System.Window;
Wow, nice, thank you.
@Ghostlady you can do that, but you should know that player may toggle between windowed<->fullscreen on their own by pressing Alt + Enter.
This is even better yet. Thank you!!!
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?
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.
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.
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 ?
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
(https://mysterymanor.net/junk/AGSSample.jpg)
I'll look at the audio stuff tomorrow.
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)
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
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?
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.
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.
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.
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.
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.
Hi CW, the issue that I mentioned about being confusing maybe I can fix if I use the USE_SIMPLE_GFX_INIT, I have reread the code so maybe I will look into that - is something specific for non-desktop plataforms.
@Ghostlady, I made a test build of the engine with some fixes, but I cannot test it myself, because I have only one monitor... Could you download it, place into the folder with your compiled game files are, and use it to launch the game (instead of game exe); then try the same situation as before, where you drag the window to the big monitor and switch modes?
Here's download link:
https://www.dropbox.com/scl/fi/rr5sur3m8db2hn4ho3ck2/acwin-361-widedisplay-issue.zip?rlkey=giedu74a3el2n94rb1lykqykf&st=xqu2i9mb&dl=0
acwin.exe System Error
I get an error message that reads: The code execution cannot proceed because SDL2.dll was not found. Reinstalling the program may fix this problem.
Quote from: Ghostlady on Sun 03/11/2024 02:15:14acwin.exe System Error
I get an error message that reads: The code execution cannot proceed because SDL2.dll was not found. Reinstalling the program may fix this problem.
The screenshot that you posted earlier sais that you are running AGS 3.6.1, in which case there should already be SDL2.dll among the compiled game files.
Where did you put this acwin.exe to? I meant it should be placed with your compiled game files (e.g. Compiled/Windows folder).
Here's an updated archive with SDL2.dll, just in case.
https://www.dropbox.com/scl/fi/rr5sur3m8db2hn4ho3ck2/acwin-361-widedisplay-issue.zip?rlkey=giedu74a3el2n94rb1lykqykf&st=tphn84l1&dl=0
Whoops, I put it just in the Compiled folder. I moved it under the Windows folder and tested and it did not fix the issue.
Could you add following lines to acsetup.cfg found inside the compiled game:
[log]
file=main:all
then run the same test,
then go to "%USERPROFILE%/Saved Games/Adventure Game Studio/"
and find a file called "ags.log" there,
and then either post that file's contents here, or upload it somewhere (like google drive) and post a link here?
One thing I noticed this time was that after the mouse froze, I was able to hit Alt Enter and get back into the full screen mode. I don't think I was able to do that before.
Here's the Log:
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2024 others
Engine version 3.6.1.29, 32-bit LE
Installing exception handler
Initializing backend libs
SDL Version: 2.28.5
Initializing game data
Looking for the game data.
Cwd: C:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows
Path arg:
Searching in (cwd): C:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows
Found game config: C:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows/acsetup.cfg
Cfg: data file:
Searching for game data in: C:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows
Found game data pak: C:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows/Oakhaven.ags
Located game data pak: c:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows/Oakhaven.ags
Opened game data file: game28.dta
Game data version: 3060114
Compiled with: 3.6.1.24
Startup directory: C:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows
Data directory: c:/Users/pondi/Documents/OakhavenRemaster/Oakhaven/Compiled/Windows/
Setting up game configuration
Logging to C:/Users/pondi/Saved Games/Adventure Game Studio/ags.log
Voice pack found: speech.vox
audio.vox found and initialized.
Initializing TTF renderer
Initializing mouse: number of buttons reported is 3
Initializing audio
Requested audio driver: default
Audio driver: wasapi
AudioCore: opened device "Default OpenAL playback device"
Supported sound decoders:
- Play modules through ModPlug : 669,AMF,AMS,DBM,DMF,DSM,FAR,GDM,IT,MDL,MED,MOD,MT2,MTM,OKT,PTM,PSM,S3M,STM,ULT,UMX,XM,
- MPEG-1 Audio Layer I-III : MP3,MP2,MP1,
- Microsoft WAVE audio format : WAV,
- Audio Interchange File Format : AIFF,AIF,
- Sun/NeXT audio file format : AU,
- Ogg Vorbis audio : OGG,
- Creative Labs Voice format : VOC,
- Raw audio : RAW,
- Shorten-compressed audio data : SHN,
- Free Lossless Audio Codec : FLAC,FLA,
Sound cache set: 32768 KB
Install exit handler
Initialize path finder library
Load game data
Game title: 'Intrigue At Oakhaven'
Game uid (old format): `1125104187`
Game guid: '{51d81780-07b1-4d1b-b2e1-68b3513ef570}'
Game GUI version: 119
Requested script API: v3.6.1 (3060100), compat level: v3.2.1 (0)
Loaded font 0: agsfnt0.wfn, req size: 0; nominal h: 18, real h: 18, extent: 0,18
Loaded font 1: agsfnt1.wfn, req size: 0; nominal h: 18, real h: 18, extent: 0,18
Loaded font 2: agsfnt2.wfn, req size: 0; nominal h: 18, real h: 18, extent: 0,18
Loaded font 3: agsfnt3.ttf, req size: 16; nominal h: 16, real h: 21, extent: -1,21
Loaded font 4: agsfnt4.ttf, req size: 16; nominal h: 16, real h: 19, extent: 0,19
Initializing resolution settings
Game native resolution: 640 x 480 (16 bit)
Mouse cursor graphic area: (0,0)-(639,479) (640x480)
Checking for disk space
Device display resolution: 1920 x 1200
Graphic settings: driver: OGL, windowed: no, screen size: 0 x 0, game scale: proportional
Graphic settings: refresh rate (optional): 0, vsync: 0
Using graphics factory: OGL
Created graphics driver: OpenGL
Supported gfx modes (32-bit):
1920x1200;1920x1200;1920x1080;1920x1080;1680x1050;1680x1050;1600x1200;1600x1200;
1280x1024;1280x1024;1280x800;1280x800;1280x720;1280x720;1024x768;1024x768;
800x600;800x600;640x480;640x480;
Attempting to find nearest supported resolution for screen size 1920 x 1200 (32-bit) fullscreen
Attempt to switch gfx mode to 1920 x 1200 (32-bit) fullscreen
OpenGL adapter info:
OpenGL: 4.6.14802 Compatibility Profile Context 21.40.18.15 30.0.14018.15002
Vendor: ATI Technologies Inc.
Renderer: AMD Radeon(TM) Graphics
OGL: Transparency shader program created successfully
OGL: Tinting shader program created successfully
OGL: Lighting shader program created successfully
Graphics driver set: OpenGL
Graphics mode set: 1920 x 1200 (32-bit) fullscreen desktop, on display 0
Graphics mode set: refresh rate (optional): 120, vsync: 0
Render frame set, render dest (160, 0, 1759, 1199 : 1600 x 1200)
Requested gfx filter: StdScale
Graphics filter set: 'StdScale', filter dest (160, 0, 1759, 1199 : 1600 x 1200)
Using gfx filter: StdScale
Texture cache set: 131072 KB
Mouse speed control: enabled, unit: 1.000000, user value: 1.000000
Touch-to-mouse motion mode: absolute
Mouse cursor graphic area: (160,0)-(1759,1199) (1600x1200)
Multitasking mode set: 0
Setting up window
Multitasking mode set: 0
Initialize sprites
Sprite cache set: 131072 KB
Initialize game settings
Precache view 0 (loops 0-3) with 40 frames, total = 0 ms, average file->mem = 0 ms, bm->tx = 0 ms,
loaded 0 sounds = 0 ms
Sprite cache: 29 -> 54 KB, texture cache: 0 -> 99 KB
Prepare to start game
Engine initialization complete
Starting game
Attempting to find nearest supported resolution for screen size 1280 x 960 (32-bit) windowed
Maximal allowed window size: 1898 x 1072
Attempt to switch gfx mode to 1280 x 960 (32-bit) windowed
Graphics driver set: OpenGL
Graphics mode set: 1280 x 960 (32-bit) windowed, on display 0
Graphics mode set: refresh rate (optional): 0, vsync: 0
Render frame set, render dest (0, 0, 1279, 959 : 1280 x 960)
Mouse speed control: enabled, unit: 1.000000, user value: 1.000000
Touch-to-mouse motion mode: absolute
Mouse cursor graphic area: (0,0)-(1279,959) (1280x960)
Multitasking mode set: 0
Attempting to find nearest supported resolution for screen size 3840 x 1620 (32-bit) fullscreen
Attempt to switch gfx mode to 2560 x 1080 (32-bit) fullscreen
Graphics driver set: OpenGL
Graphics mode set: 3840 x 1620 (32-bit) fullscreen desktop, on display 1
Graphics mode set: refresh rate (optional): 60, vsync: 0
Render frame set, render dest (840, 0, 2999, 1619 : 2160 x 1620)
Mouse speed control: enabled, unit: 1.000000, user value: 1.000000
Touch-to-mouse motion mode: absolute
Mouse cursor graphic area: (840,0)-(2999,1619) (2160x1620)
Multitasking mode set: 0
Game.SetAudioTypeVolume: type: 2, volume: 24, change: all
Game.SetAudioTypeVolume: type: 2, volume: 50, change: all
Attempting to find nearest supported resolution for screen size 1280 x 960 (32-bit) windowed
Maximal allowed window size: 1898 x 1072
Attempt to switch gfx mode to 1280 x 960 (32-bit) windowed
Graphics driver set: OpenGL
Graphics mode set: 1280 x 960 (32-bit) windowed, on display 1
Graphics mode set: refresh rate (optional): 0, vsync: 0
Render frame set, render dest (0, 0, 1279, 959 : 1280 x 960)
Mouse speed control: enabled, unit: 1.000000, user value: 1.000000
Touch-to-mouse motion mode: absolute
Mouse cursor graphic area: (0,0)-(1279,959) (1280x960)
Multitasking mode set: 0
Attempt to switch gfx mode to 3840 x 1620 (32-bit) fullscreen
Graphics driver set: OpenGL
Graphics mode set: 3840 x 1620 (32-bit) fullscreen desktop, on display 1
Graphics mode set: refresh rate (optional): 60, vsync: 0
Render frame set, render dest (840, 0, 2999, 1619 : 2160 x 1620)
Mouse speed control: enabled, unit: 1.000000, user value: 1.000000
Touch-to-mouse motion mode: absolute
Mouse cursor graphic area: (840,0)-(2999,1619) (2160x1620)
Multitasking mode set: 0
Quitting the game...
***** ENGINE HAS SHUTDOWN
Thank you.
The log shows that the mouse bounds are reasonable, there's nothing suspicious there, at least not at the first glance.
I don't have much ideas at the moment. But I'd like to ask something else: could you try if this happens only with your game, or any random AGS game too?
That's to make sure that it's purely engine's problem, and not something unusual scripted in your game.
Can you offer a suggestion for a game. I've tried two but the Alt Enter will not work because one or both of those keys are used for other things, like settings.
Quote from: Ghostlady on Sun 03/11/2024 20:02:36Can you offer a suggestion for a game. I've tried two but the Alt Enter will not work because one or both of those keys are used for other things, like settings.
How old are these games?
If they are too old to support Alt+Enter, then you could use the same acwin.exe which I sent to run them instead.
I suppose that any random game released in this year may be suitable.
https://www.adventuregamestudio.co.uk/forums/completed-game-announcements/
At last, it's possible to create a new dummy game from any template, and use that.
I downloaded King's Quest It Takes Two to Tangle - It opens in full screen mode, able to Alt Enter to windowed mode but cannot get to the top of the window to move to the other screen.
I downloaded King's Quest 1 and Alt Enter goes to a screen with a prompt to restart
I downloaded The Order - It opens in full screen mode, able to Alt Enter to windowed mode and able to move to my large screen. If I hit Alt Enter again, it flips over to my laptop screen. This one is a little strange because the first time I opened the game, I experienced my problem. The second time I can't recreate it. It opens on my laptop screen. I can toggle Alt Enter over and over and it will change appropriately. If I move to the large screen and hit Alt Enter, it constantly moves it to the laptop screen, so it will never open full window mode on large screen, it switches to the pc, but it doesn't freeze the mouse.
I'll try the new game option and see how that works.
I created a new game with just one room and the problem appeared. I was thinking maybe resolution, so I changed it from 640 x 480 (my game) to 1024 and the problem still exists.
I also tried a different monitor instead of the large one. I have a really old standard one and the problem still exits.
It's definitely the laptop causing the problem. It's still the main display but when I close the laptop, still running, the game loads up on my old monitor, I can move the game back and forth between the old monitor and newer widescreen monitor, toggle Alt Enter keys and there is no issue on either one.
I'm sorry, I didn't understand what you say about laptop... do you mean you have 1 or 2 external monitors connected to your laptop?
QuoteI downloaded King's Quest It Takes Two to Tangle - It opens in full screen mode, able to Alt Enter to windowed mode but cannot get to the top of the window to move to the other screen.
Ugh. I tried this, and apparently it has a "auto lock cursor inside window" option enabled by default.
You may turn it off in winsetup, on "Advanced" tab.
AGS is supposed to support Ctrl + Alt combo to toggle "cursor lock in window", but it does not work in the latest 3.6.1 for some reason, which is a new bug, and i will have to fix it.
"King's Quest 1", - if you are are referring to VGA remake, then it is probably made with the old version of AGS.
Yes, I have 2 external monitors hooked up to my laptop. If I close my laptop, the game will load onto one monitor and I can move the game back and forth on the two monitors with no problem. This tells me it's not any coding specific to my game but somehow laptop related.