Adventure Game Studio

Community => Adventure Related Talk & Chat => Topic started by: MoonBird on Thu 25/07/2024 17:25:32

Title: Text speed in AGS-games
Post by: MoonBird on Thu 25/07/2024 17:25:32
Hi AGS community. I've enjoyed tens of AGS-produced games. Some more, some less. The biggest problem for me is that I'm extremely slow reader. And because AGS-games rarely offer a setting in options to slow down the subtitles, I am practically unable to play a huge pile of great games just because my inability to read fast. It doesn't help that English is not my native language, nor the fact that I have dyslexia. Will there not be any chance to update the AGS engine for already released games which could add that kind of setting? I've also tried to play AGS-games through ScummVm, so that I could adjust the text speed from there, but unfortunately ScummVm's Subtitle speed setting doesn't work with AGS games, so I'm out of luck there :(
Would there ever be any possibility, that I could enjoy those tens or even hundreds fantastic games, which now are practically unaccessible to me, because I don't manage to read half of their text.

Thank you kindly for answers in advance :)

Antti
Title: Re: Text speed in AGS-games
Post by: Snarky on Thu 25/07/2024 18:16:46
This is a good example of accessibility support, which we recently discussed (https://www.adventuregamestudio.co.uk/forums/engine-development/proposal-to-introduce-accessibility-in-adventure-game-studio/). @Crimson Wizard expressed openness to adding some kind of player override functionality to settings like this. I don't think it's exactly on any roadmap, though.
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 25/07/2024 19:10:33
I think I was one of the people who noted this problem many years ago.

The success here largely depends on which method is used to display a text. Because engine will need to be able to guess what and when to slow down.

Standard functions that display temporary game texts (such as speech) may be easily overridden, because engine knows what they do.

However, there are games that use custom user-written functions to display speech, where the text display is made up of a number of lower-level commands. They achieve a effect in combination, which may not be obvious to the engine. In this case the situation is complicated.

From the top of my head, there are following options:
- a "speech skip style" parameter. Engine may force this style to not include "timeout" and only player input, in hopes that custom function relies on this parameter.
- a "text reading speed" parameter. Engine may try to adjust that to a lower speed value, again in hopes that custom function actually uses that.
- WaitMouseKey and similar commands that have a timeout: engine may override these to have a larger or infinite timeout. These functions may similarly be overridden to react to any kind of input: in case game is scripted to be skipped by a mouse but player has only a keyboard, and so on.

EDIT:
An alternative (or complementary) to above could be a configurable hotkey that pauses the game or slows game speed until pressed again.
Title: Re: Text speed in AGS-games
Post by: MoonBird on Thu 25/07/2024 20:41:00
This would really mean a world to me, if it would even be possible. I understand that not every written text is possible to make clickable or even slow down, but if it would be even partly possible in most of the games, it would mean tens of more games to play for me  :wink:
Title: Re: Text speed in AGS-games
Post by: heltenjon on Fri 26/07/2024 19:29:41
If the text could be made to stay onscreen for longer/until clicked away, this would also make it easier to play games in foreign languages. Most read slower in languages they don't know well. If you're playing with a google translate app, your phone or tablet need a few seconds before being able to translate the text it views on your computer screen.

I guess the same tech could be used to read the writing from the screen out loud.
Title: Re: Text speed in AGS-games
Post by: Khris on Wed 07/08/2024 16:56:21
You can also pause most* AGS games at any point by playing them in windowed mode with the Windows desktop in the background. Simply click outside the game window and the text will stay visible indefinitely. Switch focus back to the game by clicking inside the window, and it'll continue.


(*Afaik it's possible to keep the game running without focus but this is off by default.)
Title: Re: Text speed in AGS-games
Post by: Rik_Vargard on Wed 14/08/2024 11:05:28
For what it's worth, in the global script, in repeatedly_execute(), I have this :


Game.TextReadingSpeed = 10;
Game.MinimumTextDisplayTimeMs = 2500;

I found it somewhere on the forums some time ago  :P
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Wed 14/08/2024 14:14:47
Quote from: Rik_Vargard on Wed 14/08/2024 11:05:28For what it's worth, in the global script, in repeatedly_execute(), I have this :


Game.TextReadingSpeed = 10;
Game.MinimumTextDisplayTimeMs = 2500;


If you put this in repeatedly_execute, that would run N times per second over and over again for no reason.
Settings like that are supposed to be initialized once in game_start, and perhaps when player uses some menu control if you support changing them in game.

Adding such things to repeatedly_execute is a lazy way when a person does not know the correct way, just because it suddenly works. It seems that AGS users used to do this a lot in the past, and older forum threads mention this kind of examples, but that is wrong.
Title: Re: Text speed in AGS-games
Post by: Rik_Vargard on Wed 14/08/2024 17:26:35
Quote from: Crimson Wizard on Wed 14/08/2024 14:14:47If you put this in repeatedly_execute, that would run N times per second over and over again for no reason.
Settings like that are supposed to be initialized once in game_start, and perhaps when player uses some menu control if you support changing them in game.

Adding such things to repeatedly_execute is a lazy way when a person does not know the correct way, just because it suddenly works. It seems that AGS users used to do this a lot in the past, and older forum threads mention this kind of examples, but that is wrong.

Yeah I found it in an old thread back then and it worked so I thought that was the way to do it  :P
Thanks for your input, I'll go change that  (nod)
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Mon 26/08/2024 08:42:29
@MoonBird

So, here's an experimental version of the AGS that has a text skipping config setting:
https://cirrus-ci.com/task/5372902994870272

if you download a link called "archive" it would contain the whole Editor, but you only need a file called "acwin.exe" to run the existing games.

Place "acwin.exe" in the game folder, and then insert following into the config file (acsetup.cfg):
[access]
speechskip=input

Then run "acwin.exe" to start the game (not the original game exe).

Other possible values are:
"any" - will skip speech by input and time
"time" - will skip speech by time only
Title: Re: Text speed in AGS-games
Post by: MoonBird on Thu 07/11/2024 08:02:06
Quote from: Crimson Wizard on Mon 26/08/2024 08:42:29@MoonBird

So, here's an experimental version of the AGS that has a text skipping config setting:
https://cirrus-ci.com/task/5372902994870272

if you download a link called "archive" it would contain the whole Editor, but you only need a file called "acwin.exe" to run the existing games.

Place "acwin.exe" in the game folder, and then insert following into the config file (acsetup.cfg):
[access]
speechskip=input

Then run "acwin.exe" to start the game (not the original game exe).

Other possible values are:
"any" - will skip speech by input and time
"time" - will skip speech by time only


This seems really great! Got it to work. It works well in the spoken dialogue, but as far as I tested, it doesn't stop the text in the environment or item descriptions. Would it be possible to strech to them too?

Edit: Actually this seems to be depending on the game. Some do work with all the text, some don't. For example Cedric And The Revolution works with only spoken dialogues. Cirque De Zale works perfectly with everything,

Then I tried to Play Shards Of God, but acwin.exe crashes most times when you try examine things with right click. When running the game through normal exe, it doesn't crash. The crash report reads:

Illegal exception:

An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00410059; program pointer is + 1004, engine version 3.6.2.0, gtags (14, 14)

AGS cannot continue, this exception fas fatal. Please note down the numbers above, remember what you were doing at the time and contact the game author for support or post these details on the AGS techincal forum.

Most versions of Windows allow you to press CTRL+C now to copy this entire message to the clipboard for easy reporting.

An error file Crashinfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
Title: Re: Text speed in AGS-games
Post by: FortressCaulfield on Thu 07/11/2024 10:14:10
I added a text speed slider to my settings page, but players still complained about some text going too fast. I found I had to trick the system into thinking some very short phrases were longer than they actually were by padding them out with spaces. Maybe it would help if there was a minimum, or the derived time for shorter text was increased.
Title: Re: Text speed in AGS-games
Post by: Snarky on Thu 07/11/2024 10:25:50
Quote from: FortressCaulfield on Thu 07/11/2024 10:14:10Maybe it would help if there was a minimum

Game.MinimumTextDisplayTimeMs (https://adventuregamestudio.github.io/ags-manual/Game.html#gameminimumtextdisplaytimems)

I do recommend looking in the manual from time to time. This property is linked from Game.TextReadingSpeed.
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 07/11/2024 12:44:55
Quote from: MoonBird on Thu 07/11/2024 08:02:06This seems really great! Got it to work. It works well in the spoken dialogue, but as far as I tested, it doesn't stop the text in the environment or item descriptions. Would it be possible to strech to them too?

Edit: Actually this seems to be depending on the game. Some do work with all the text, some don't. For example Cedric And The Revolution works with only spoken dialogues. Cirque De Zale works perfectly with everything,

Since this post I've added a second option called "textskip" which works for the message boxes.
This feature is now included in 3.6.2 Beta release (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-2-beta-1-a-wip-3-6-update/), where it may be also selected inside a winsetup dialog (you have to run "acwin.exe --setup" from command line if you are using it to run other games).


Quote from: MoonBird on Thu 07/11/2024 08:02:06Then I tried to Play Shards Of God, but acwin.exe crashes most times when you try examine things with right click. When running the game through normal exe, it doesn't crash.

I suggest trying game using the latest posted 3.6.2 Beta then, as it may contain some bug fixes.
I'll try myself later too.
Title: Re: Text speed in AGS-games
Post by: MoonBird on Thu 07/11/2024 12:59:04
Quote from: Crimson Wizard on Thu 07/11/2024 12:44:55
Quote from: MoonBird on Thu 07/11/2024 08:02:06This seems really great! Got it to work. It works well in the spoken dialogue, but as far as I tested, it doesn't stop the text in the environment or item descriptions. Would it be possible to strech to them too?

Edit: Actually this seems to be depending on the game. Some do work with all the text, some don't. For example Cedric And The Revolution works with only spoken dialogues. Cirque De Zale works perfectly with everything,

Since this post I've added a second option called "textskip" which works for the message boxes.
This feature is now included in 3.6.2 Beta release (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-2-beta-1-a-wip-3-6-update/), where it may be also selected inside a winsetup dialog (you have to run "acwin.exe --setup" from command line if you are using it to run other games).


Quote from: MoonBird on Thu 07/11/2024 08:02:06Then I tried to Play Shards Of God, but acwin.exe crashes most times when you try examine things with right click. When running the game through normal exe, it doesn't crash.

I suggest trying game using the latest posted 3.6.2 Beta then, as it may contain some bug fixes.
I'll try myself later too.

Actually, I updated the Shards of God to version 1.2 and the problem disappeared. So the game was faulty, not the acwin.exe.
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 07/11/2024 13:45:56
Quote from: MoonBird on Thu 07/11/2024 12:59:04Actually, I updated the Shards of God to version 1.2 and the problem disappeared. So the game was faulty, not the acwin.exe.

"An exception 0xC0000005" is engine's error. Maybe they stopped using some command that cause this error in v1.2.

Unfortunately, i dont have an old version of the game anymore, so I cannot compare.
Title: Re: Text speed in AGS-games
Post by: MoonBird on Thu 07/11/2024 16:01:36
Tested Resonance by Wadjet Eye just a moment ago with new beta. Speech is interupted, yes. But not the tought-bubbles, unfortunately. Maybe they use some different thing there.

Also tested Cedring And The Revolution again. Not all text is waiting for clicks. Only spoken lines. Also: music doesn't work trough acwin.exe.
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 07/11/2024 16:42:04
Quote from: MoonBird on Thu 07/11/2024 16:01:36Tested Resonance by Wadjet Eye just a moment ago with new beta. Speech is interupted, yes. But not the tought-bubbles, unfortunately. Maybe they use some different thing there.

"Resonance" used a lot of custom scripted things. This solution can only affect the script that relies on "speech skip style" and "message skip style" setting. If the game's script ignores these settings and uses its own thing, there's nothing that we can do from engine's perspective.

After a quick thought, the only remaining chance is to override settings like TextReadingSpeed and MinimumTextDisplayTimeMs, and hope that they are referenced by game's script. But there's never a 100% guarantee.


Quote from: MoonBird on Thu 07/11/2024 16:01:36Also tested Cedring And The Revolution again. Not all text is waiting for clicks. Only spoken lines. Also: music doesn't work trough acwin.exe.

Okay, I will check that out too...
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 07/11/2024 16:56:54
@MoonBird could you please post links that you use to download games (except commercial)?

I tried downloading "Cedric and revolution" from AGS database page, but i get connection errors.

EDIT: okay, I found it in the agsarchives torrent.
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 07/11/2024 18:17:16
In case of "Cedric and the Revolution":

1. The "look at" descriptions seem to be implemented as background (non-blocking) speech. This does not use skipping style, but apparently uses text reading speed. I believe that increasing TextReadingSpeed and / or MinimumTextDisplayTimeMs to a very big value might solve this problem. But keep in mind that this won't let skip it with a input, the overlay will disappear only when timing out, replaced by something else, or character changes rooms.

2. Music in this game is MIDI. Since 3.6.0 AGS engine cannot play MIDI tracks entirely on its own, you have to install Timidity sound patches on your system.
This is explained in here in the manual:
https://adventuregamestudio.github.io/ags-manual/MIDI-playback.html

Title: Re: Text speed in AGS-games
Post by: MoonBird on Thu 07/11/2024 20:05:36
can you adjust TextReadingSpeed or MinimumTextDelay from ags acsetup.cfg? And if it can be done, what would be the commandlines for them?

Anyway, thank you very much at this point already! You've done a wonderful favor for me, and opened tens of new games, which were subtitled too fast before. I mean, lot of games work beautifully with this Speechskip=input command. Some games have minor glitches, but it's a small price for a controllable dialogue! Those small glitches include some temporary freezing / long delays (for example in Infinity Strings) and some magenta-colored backgrounds in logos and menus (Murder In A Wheel as an example)
Title: Re: Text speed in AGS-games
Post by: eri0o on Thu 07/11/2024 20:12:00
Can you link the game binaries of Murder In A Wheel?
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Thu 07/11/2024 21:52:03
Quote from: MoonBird on Thu 07/11/2024 20:05:36can you adjust TextReadingSpeed or MinimumTextDelay from ags acsetup.cfg? And if it can be done, what would be the commandlines for them?
Not at the moment, but I was planning to add this along with the existing options.


Quote from: MoonBird on Thu 07/11/2024 20:05:36Some games have minor glitches, but it's a small price for a controllable dialogue! Those small glitches include some temporary freezing / long delays (for example in Infinity Strings) and some magenta-colored backgrounds in logos and menus (Murder In A Wheel as an example)

Please do report glitches found when running old games (you may do so in "Engine development" forum section, or in engine release topic).
We define AGS v3.* as backwards compatible, and suited for running old games. There's also ScummVM port of AGS which shares most of our code. So fixing it here might also help ScummVM developers to fix theirs.


Quote from: eri0o on Thu 07/11/2024 20:12:00Can you link the game binaries of Murder In A Wheel?

https://www.adventuregamestudio.co.uk/site/games/game/941-murder-in-a-wheel/
https://www.mediafire.com/?82ikmzlzixi
Title: Re: Text speed in AGS-games
Post by: heltenjon on Thu 07/11/2024 23:22:28
Quote from: Crimson Wizard on Thu 07/11/2024 16:56:54I tried downloading "Cedric and revolution" from AGS database page, but i get connection errors.

Off Topic: I checked this, and I can download it just fine, as long as I override the Windows 11 message (I think) about it being unsafe (which it does for all http adresses now, I guess). I added a mirror link to the depository on archive.org anyway, to make it more accessible.
Title: Re: Text speed in AGS-games
Post by: MoonBird on Fri 08/11/2024 06:27:13
Quote from: Crimson Wizard on Thu 07/11/2024 21:52:03Not at the moment, but I was planning to add this along with the existing options.

Please inform me if there is any further changes to the situation.
Title: Re: Text speed in AGS-games
Post by: cat on Thu 14/11/2024 19:53:57
Parts of the discussion were moved here by request: https://www.adventuregamestudio.co.uk/forums/engine-development/re-text-speed-in-ags-games/ (https://www.adventuregamestudio.co.uk/forums/engine-development/re-text-speed-in-ags-games/)
Title: Re: Text speed in AGS-games
Post by: Crimson Wizard on Tue 19/11/2024 20:32:45
Quote from: MoonBird on Fri 08/11/2024 06:27:13Please inform me if there is any further changes to the situation.

So, I added "text reading speed" option to "Accessibility settings" in setup.
Download: https://cirrus-ci.com/task/4742122312564736
or here (acwin.exe only): https://www.dropbox.com/scl/fi/5lr7rvv1z9czrjidn581s/acwin-3.6.2-textspeed.zip?rlkey=q91tj5qmuuofrv609n3l7g8p5&st=q9rpeybq&dl=0
EDIT: this feature is now available since 3.6.2 Beta 3 release:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-2-beta-1-a-wip-3-6-update/

The option is a slider that can be 0 (meaning use game settings), or range from 1 to 30 chars per second. AGS default is 15, so any lower will make text stay longer, and any high will make it go faster.


EDIT:  I tested couple of games mentioned in this thread.
Although it works in "Cedric and Revolution", but still not in "Bustin' the Bastille" for some unfortunate reason. Possibly they are using purely custom settings in their game.