Opened 2 months ago

Closed 8 hours ago

#15346 closed defect (fixed)

GRAPHICS: Text Boxes Not Appearing in External Captures

Reported by: JoLiKMC Owned by: bluegr
Priority: low Component: Engine: AGI
Version: Keywords: OBS, recording, text
Cc: Game: Space Quest 1

Description (last modified by JoLiKMC)

ScummVM version: ScummVM 2.8.1 (Mar 16 2024 13:01:03)
Operating System: Windows 10 Pro version 2H22, build 19045.4651

Game: Any title using Sierra On-Line's "Adventure Game Interpreter"
(First noticed on Space Quest, Chapter I: The Sarien Encounter.)
Version of game: All versions
(Confirmed on 1.0X 1986-09-24/DOS/English and 2.2 1987-05-07 5.25"/3.5"/DOS/English versions)
Relevant save game: Not applicable (happens anywhere)

Bug details: On occasion, the text boxes or other instances of text printing will fail to be captured in third-party video recording software. The text or text windows will, however, display just fine in ScummVM.

How to reproduce bug:
(Note: This may affect other software as well, but this is how I did it.)

  1. Open ScummVM, then open OBS Studio and make a new Game Capture window, linking it to ScummVM.
  2. Open any version of Space Quest I (AGI version) in ScummVM.
  3. Start recording and type anything to generate a text message window.

Further details:
As documented here, there seems to be a weird visual bug with ScummVM while capturing Adventure Game Interpreter engine games under certain setups, such as using OBS Studio in "Game Capture" mode. It's not consistent, or maybe it only happens on certain frames or cycles. In OBS, particularly, the text boxes disappear in both the recording and the preview window, but still appear in the ScummVM window like nothing's wrong.

I've tested this issue with a couple of different DOS games: Space Quest, Chapter I (v1.0x AGI 2.089, v2.2 AGI 2.917) and King's Quest IV (v2.0 AGI 3.002.086). Both of them displayed the same issues with OBS Studio. I tried changing the video settings as well, but that did absolutely nothing. In all likelihood, this is probably more the fault of Open Source Broadcaster than anything, but I figured it was worth retreading since this has happened to at least two other people.

I've marked this as a "low priority" bug because switching to "Window Capture" in OBS Studio seems to have solved this issue for me.

Relevant media:

Change History (18)

comment:1 by JoLiKMC, 2 months ago

Summary: [Space Quest I AGI] Text Boxes Not Appearing in 3rd Party Recordings under OpenGL Mode[Space Quest I AGI] Text Boxes Not Appearing in 3rd Party Recordings

Sorry. The video renderer makes no difference, seemingly.

comment:2 by JoLiKMC, 2 months ago

Description: modified (diff)
Summary: [Space Quest I AGI] Text Boxes Not Appearing in 3rd Party RecordingsText Boxes Not Appearing in Game Capture Recordings of AGI Games

Added considerably more details. (It affects all DOS AGI 2.0 to 3.0 titles, at the very least.)

comment:3 by JoLiKMC, 2 months ago

Description: modified (diff)
Summary: Text Boxes Not Appearing in Game Capture Recordings of AGI GamesText Boxes Not Appearing in External Capture of AGI Games

Reworded some things, retitled the report for consistency.

comment:4 by JoLiKMC, 2 months ago

Quick update: According to an OBS representative, this problem is entirely ScummVM's fault due to how it uses DirectX 9 to render. Despite the fact this problem happens with either Surface SDL or OpenGL. So, there's that.

comment:5 by tag2015, 2 months ago

I think this is still bug #13767.
Sometimes the popup messageboxes are not captured, unless you move the mouse first.

To check, do this:
Play windowed and keep both windows visible (the OBS capture and scummvm).
Trigger a messagebox, see that it doesn't appear on OBS. Move the mouse a bit, and it'll appear.

comment:6 by tag2015, 2 months ago

Summary: Text Boxes Not Appearing in External Capture of AGI GamesGRAPHICS: Text Boxes Not Appearing in External Captures

comment:7 by JoLiKMC, 2 months ago

Okay, it's just plain absurd that wiggling the mouse refreshes the picture in OBS. Especially since I specifically have mouse input disabled for my AGI games. What in the world am I supposed to do? Set my mouse to automatically jitter while recording?

Anyway, this version of the bug only affects AGI games whereas the bug you linked affects SCI or AGI games. I cannot get the bug I'm describing to happen in any SCI game whatsoever, be it Space Quest III (1.052, SCI S.old.114), King's Quest IV (1.000.111, SCI 0.000.274), or Leisure Suit Larry: Love For Sail (1,01, SCI 3.000.000).

Additionally, it doesn't matter if I'm running ScummVM in OpenGL or Surface SDL mode. The problem still happens. If it helps, though, OBS Studio appears to use Direct3D 9 to hook into and capture ScummVM regardless of video mode. It uses DirectX Graphics Infrastructure or OpenGL, directly, with other games.

comment:8 by tag2015, 2 months ago

I think you completely misunderstood my message, I wasn't suggesting a workaround but just a couple steps to check the beahavior.
If in you case the problem affects only AGI games, fine, maybe it's not the same bug but they're probably closely related.

comment:9 by sluicebox, 7 weeks ago

This is definitely a duplicate of #13767. Reading what I wrote on that ticket, I can't believe it's been two years and this still isn't fixed. It affects multiple (all?) engines with the default (OpenGL) renderer, it's easy to trigger, and it was quickly triaged.

I use the SDL Surface renderer so I haven't thought about this since then.

I just don't know who the right person is to get this in front of; I assume it takes OpenGL expertise. I tried my best to label it two years ago. I'm embarrassed by this bug!

comment:10 by JoLiKMC, 7 weeks ago

I understand the thinking behind it, but I'm convinced it's not a duplicate of #13767. As tag2015 said, it's probably related to that bug since it's a rendering issue of sorts, but it's not specifically that bug as the bug I submitted here doesn't appear to happen in SCI games. Maybe this is because SCI games refresh the screen in a different way. I don't know. All I know for certain is that since I changed from Game Capture to Window Capture, I haven't had any problems.

I'd love to help figure this out, but I genuinely can't think of anything else I could possibly do to test things. I'm open to suggestion, though. I really do want to help.

Last edited 7 weeks ago by JoLiKMC (previous) (diff)

comment:11 by sluicebox, 6 weeks ago

I know a good way to settle this: let's get somebody to fix this in any way shape or form, and we'll see if it fixes it everywhere. =)

[ Prediction: It Will ]

But it's been two years! How do we achieve Step One??

I appreciate the offer to help, but this is so comically easy to reproduce for *YEARS* that it's a sad indictment on the developers. I choose to believe it's just because the people responsible haven't seen these tickets? I am *MORTIFIED* by this bug because of its age.

It kills me that no one remotely responsible for these features has participated in these tickets. It makes me wonder if I've misplaced my time in this hobby?

comment:12 by bluegr, 6 weeks ago

The issue here is that if there is no screen update (e.g. from mouse movement), no frame is emitted to OBS. Sometimes, this happens right before a text box is shown.

Recently, a new implementation has been added where ScummVM will *always* update the screen, even if there isn't any change.

To enable this:

  • Open your scummvm.ini file (for Windows, this is located in C:\Users\<user>\AppData\Roaming\ScummVM)
  • Add the following in line 2, under the [scummvm] section, at the very top: force_frame_update=50
  • Make sure you're using the OpenGL backend (Global Options -> Graphics mode -> set to OpenGL)

I've just tested the change above, and it seems to solve the issue with OBS. Could you please verify it works for you?

Last edited 6 weeks ago by bluegr (previous) (diff)

comment:13 by JoLiKMC, 5 weeks ago

Well, anything is definitely worth a shot. Unfortunately, this did not seem to do anything. Here's what I did:

  1. I added the line "force_frame_update=50" to my scummvm.ini file.
  2. I opened ScummVM 2.8.1, changed my renderer (back?) to OpenGL, closed the client, then re-opened it.
  3. I opened OBS Studio 30.2.3 and set my Game Capture to record the from scummvm-v2.8.1.exe I then opened the Preview Window so I could see what it saw.
  4. I opened three different AGI games:
    • Space Quest, Chapter I (2.2, Interpreter 2.917)
    • Space Quest, Chapter II (2.0F, Interpreter 2.936)
    • King's Quest IV (2.0, Interpreter 3.002.086)
  5. After opening a game, I typed something into the parser and hit Enter.

Like before, after hitting Enter, the Capture Preview and Recording occasionally (not consistently) failed to show the text box that followed whatever I typed in.

Thanks for trying, though.

Last edited 5 weeks ago by JoLiKMC (previous) (diff)

comment:14 by tag2015, 5 weeks ago

You need to use a daily build. Go here https://buildbot.scummvm.org/#/dailybuilds and download the "latest branch master" for your platform

in reply to:  13 comment:15 by antoniou79, 5 weeks ago

Replying to JoLiKMC:

Well, anything is definitely worth a shot. Unfortunately, this did not seem to do anything. Here's what I did:

  1. I added the line "force_frame_update=50" to my scummvm.ini file.
  2. I opened ScummVM 2.8.1, changed my renderer (back?) to OpenGL, closed the client, then re-opened it.
  3. I opened OBS Studio 30.2.3 and set my Game Capture to record the from scummvm-v2.8.1.exe I then opened the Preview Window so I could see what it saw.
  4. I opened three different AGI games:
    • Space Quest, Chapter I (2.2, Interpreter 2.917)
    • Space Quest, Chapter II (2.0F, Interpreter 2.936)
    • King's Quest IV (2.0, Interpreter 3.002.086)
  5. After opening a game, I typed something into the parser and hit Enter.

Like before, after hitting Enter, the Capture Preview and Recording occasionally (not consistently) failed to show the text box that followed whatever I typed in.

Thanks for trying, though.

The additional feature for "force_frame_update" was added very recently to the ScummVM code base. As such, it's only supported in the daily development versions (2.9.0git) and recent ones at that.

Please test again, using a daily development build from here (column: "ScummVM Latest Branch Master)
https://buildbot.scummvm.org/#/dailybuilds

comment:16 by JoLiKMC, 5 weeks ago

Seeing is believing, and I believe I see results.

https://i.imgur.com/RgwzDJZ.png
A screenshot of King's Quest IV (AGI) running on ScummVM 2.90 Oct 7 2024 04:50:17 daily build.
Screenshot taken through OBS Studio's Preview screenshot function, showing a dialogue box.
Yes, I chose that word on purpose.

bluegr was absolutely right — this seems to have fixed it. Using the version 2.90 Oct 7 2024 04:50:17 build with the previous instructions, I persistently did the old "F3 Shuffle"* about 30 times on each of the aforementioned games, and not once did I see OBS Studio fail to display the correct frame.
(* F3 to repeat a line, Enter to display the text window, Enter to close the window.)

Question is… will that string become part of the default INI file, and does it have any negative impact on anything? If everything's all good, I think this can be certifiably labeled as "Fixed (To be implemented)". 👍

Hopefully, this also fixes that related issue that affects AGI and SCI games, too!

Last edited 5 weeks ago by JoLiKMC (previous) (diff)

comment:17 by JoLiKMC, 4 weeks ago

Resolution: pending
Status: newpending

comment:18 by bluegr, 8 hours ago

Owner: set to bluegr
Resolution: pendingfixed
Status: pendingclosed

Thanks! Closing

Note: See TracTickets for help on using tickets.