AGS 3.4.1 - RC 3 (new release candidate)

Started by Crimson Wizard, Sun 09/04/2017 22:02:10

Previous topic - Next topic

Crimson Wizard

Can anyone else tell if volume drop during voice-over works in the latest build, or not?

I could not reproduce the issue. I tried -
1) Setting volume drop in audio properties.
2) Changing volume drop value in game_start with script command.
3) Changing volume drop to random values in repeatedly_execute_always (with timer), which also changed it during voice-over.

It works for me in all cases.

AGD2

I think I've narrowed it down.

If I move the line:

Code: ags
Game.SetAudioTypeSpeechVolumeDrop(eAudioTypeMusic, 45);


...from the globalscipt's game_start function, into my Title-Screen's room script (room_Load function), then everything works as intended with no issues at all.

It seems that the game bypasses Game.SetAudioTypeSpeechVolumeDrop commands if they're put in game_start function.

I also have a Game.SetAudioTypeSpeechVolumeDrop line that calls SetAudioTypeSpeechVolumeDrop in the on_event eEventRestoreGame script, which doesn't seem to work either. Might want to check that, too.

Crimson Wizard

#142
Meanwhile, I made a fix to console, but that required a tricky workaround, because it has to detect dynamic change to "game.debug_mode" variable, so I thought I better upload it for quick test:
http://www.mediafire.com/file/j59xyk20jev3lx7/acwin_dynamicconsole_fix.zip



Quote from: AGD2 on Mon 04/09/2017 18:19:57
If I move the line:

Code: ags
Game.SetAudioTypeSpeechVolumeDrop(eAudioTypeMusic, 45);


...from the globalscipt's game_start function, into my Title-Screen's room script (room_Load function), then everything works as intended with no issues at all.

It seems that the game bypasses Game.SetAudioTypeSpeechVolumeDrop commands if they're put in game_start function.

I also have a Game.SetAudioTypeSpeechVolumeDrop line that calls SetAudioTypeSpeechVolumeDrop in the on_event eEventRestoreGame script, which doesn't seem to work either. Might want to check that, too.

Well, it works for me when I set it in game_start...
Could you send me a compiled game which has this issue?

AGD2

Quote from: Crimson Wizard on Mon 04/09/2017 18:29:57
Meanwhile, I made a fix to console, but that required a tricky workaround, because it has to detect dynamic change to "game.debug_mode" variable, so I thought I better upload it for quick test:
http://www.mediafire.com/file/j59xyk20jev3lx7/acwin_dynamicconsole_fix.zip

Just tried it and yes, this resolves the issue. Thanks!

Quote from: Crimson Wizard on Mon 04/09/2017 18:29:57
Well, it works for me when I set it in game_start...
Could you send me a compiled game which has this issue?

Check your PMs.

Crimson Wizard

Quote from: AGD2 on Tue 05/09/2017 06:59:48
Quote from: Crimson Wizard on Mon 04/09/2017 18:29:57
Well, it works for me when I set it in game_start...
Could you send me a compiled game which has this issue?

Check your PMs.

Alright, I did a little debugging, and this is what I got. There are several changes to audio drop made since game start:
- Audio type 2 set to drop 20 from game_start in module #7 (module index is zero-based).
- Audio type 3 set to drop 20 from game_start in module #7.
- Audio type 1 set to drop 20 from game_start in module #7.
- Audio type 2 set to drop 45 from game_start in module #37
- Audio type 2 set to drop 0 from room_AfterFadeIn function (room #99).

If audio type 2 is music, then that explains why it does not drop in the start.


PS. Completely unrelated, but engine also logs thousands of sprite cache errors while running this game. There is some bugs in the sprite system of AGS which were never properly attended, they do not seem to cause any direct issues, but I am a bit worried. It seem to start behave strangely when a very big sprites are loaded and then unloaded during the game (probably dynamic sprites). Setting sprite cache to higher values (I tried 512 MB) made those errors go away.

AGD2

Interesting. I usually always hold the escape key to skip the introduction sequence (room 99), which must have bypassed the Game.SetAudioTypeSpeechVolumeDrop call in that location (it was located inside a StartCutscene/Endcutscene block) and thus, I didn't notice it before. The recent betas must have started calling the function, despite me still holding the Escape key to skip past it. I've now shuffled some of the lines around to work around this.

Anyhow, after resolving that, I'm still getting the issue with the music audio volume level spiking back up, when a queued music piece starts playing, rather than staying at the value set in Game.SetAudioTypeSpeechVolumeDrop(eAudioTypeMusic). I'll PM you some instructions on where to test that.

QuotePS. Completely unrelated, but engine also logs thousands of sprite cache errors while running this game. There is some bugs in the sprite system of AGS which were never properly attended, they do not seem to cause any direct issues, but I am a bit worried. It seem to start behave strangely when a very big sprites are loaded and then unloaded during the game (probably dynamic sprites). Setting sprite cache to higher values (I tried 512 MB) made those errors go away.

Yeah, this is probably due to the combat system, as it uses a lot of dynamic sprites. I'll just distribute the game with the sprite cache set to the highest possible value by default.

Crimson Wizard

My problem was that the music in that room is not very loud on its own so it was hard for me to tell if volume changes or not. I will try with the new test shortly.

AGD2

If your speakers have independent volume controls, try turning those up (or otherwise in Windows). Works for me.

edmundito

Hello, I had an issue with the OpenGL driver that may be worth investigating. I had some of the unusual conditions.

- I was testing a graphically intense game for the usual AGS standard: 60fps, 640x480, occasional full screen animation effects, The game was running in windowed mode.
- I was running on a Windows VM inside a mac laptop (using Parallels desktop), keep in mind that I've been playing AGS games this way for the past 5 years without any problems.
- Laptop is about 6 years old, AMD Radeon HD 6750M graphics processor with 512MB of GDDR5

The graphics "card" burned out. This could be coincidental as the laptop was old, but this was the first time I was playing a game with the OpenGL driver.

If you would like more info, please feel free to DM me here or find me in the AGS discord.
The Tween Module now supports AGS 3.6.0!

Crimson Wizard

Quote from: Edmundito on Wed 06/09/2017 06:20:29
Hello, I had an issue with the OpenGL driver that may be worth investigating. I had some of the unusual conditions.
<...>
If you would like more info, please feel free to DM me here or find me in the AGS discord.

I do not even know what I can do with this information. How am I supposed to investigate that, I am clueless.

Crimson Wizard

#150
Found a weird logical issue in how volume is applied to the sound clips in AGS. For some reason any kind of preset modifiers are ignored when the playback starts. Since I would not like to make any drastic changes to that code at the moment, I just modified the order at which volume drop is set to queued clip (rightt after playback started, as opposed to just before it started):

http://www.mediafire.com/file/9uw56dp9jlixfo3/acwin_queuedmusicdrop_fix.zip

AGD2

Thanks for your diligence in investigating this issue, CW. This fix works like a charm, and the music drop volume seems to now transition across perfectly in all the locations I have tried it in.

selmiak

Talking about audio in AGS... is it possible to somehow cache or buffer some 5-10 seconds of the current music playing when a screen transition is about to happen? This music stuttering when changing rooms is making me uncomfortably angry every time :P

Crimson Wizard

Quote from: selmiak on Wed 06/09/2017 19:10:52
Talking about audio in AGS... is it possible to somehow cache or buffer some 5-10 seconds of the current music playing when a screen transition is about to happen? This music stuttering when changing rooms is making me uncomfortably angry every time :P

It is possible in theory, but I am not doing that now when this release is long overdue.

Radiant

Quote from: selmiak on Wed 06/09/2017 19:10:52
Talking about audio in AGS... is it possible to somehow cache or buffer some 5-10 seconds of the current music playing when a screen transition is about to happen? This music stuttering when changing rooms is making me uncomfortably angry every time :P
This should not normally be necessary; unless your computer is already heavily overloaded and/or obsolete or you're doing something really weird with AGS memory requirements, I've never had complaints about music stuttering on a room change.

NicolaGs

I encountered sound stuttering in many AGS games and on several PC, not being old. And I've seen several threads talking about this issue. (but it seems indeed normal not to add another modification to this current version)
My first game : I Want Out!

selmiak

hehe, just mentioning it, in the wrong place though :P

Snarky

It's a known AGS issue, but it occurs mainly in DirectDraw mode. With the recent fixes to Direct3D and with the OpenGL renderer, it should be increasingly irrelevant.

selmiak

oh nice. Though increasingly irrelevant is not fixed ;)

Crimson Wizard

#159
Quote from: Snarky on Wed 06/09/2017 22:23:54
It's a known AGS issue, but it occurs mainly in DirectDraw mode. With the recent fixes to Direct3D and with the OpenGL renderer, it should be increasingly irrelevant.

I doubt driver selection will change anything about stutter during room transition, because that stutter is caused by loading next room data rather than displaying anything.

Stutter may be resolved by enabling audio processing on the separate thread (manually adding "threaded=1" into [sound] section of config), but that may cause desynchronization issues if game script is relying on audio position (also if music is playing during video playback, as a separate layer).
(Also its current implementation is causing issues on Linux)

SMF spam blocked by CleanTalk