Opened 18 years ago

Closed 18 years ago

Last modified 6 years ago

#8605 closed patch

SWORD1: Cutscene subtitles

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: Sword1
Version: Keywords:
Cc: Game: Broken Sword 1

Description

This patch is intended as a possible starting point if we ever want to add subtitles to the Broken Sword 1 movie cutscenes. It currently has a few shortcomings, though. See TODO / FIXME comments.

Also, I have only implemented the subtitle drawing for DXA cutscenes, not MPEG. And, of course, someone will have to actually transcribe the subtitles, since they're not included in the game (as far as I know).

Ticket imported from: #1657061. Ticket imported from: patches/710.

Attachments (2)

sword1-subtitles.diff (13.2 KB ) - added by eriktorbjorn 18 years ago.
Patch against current SVN
intro.txt (239 bytes ) - added by eriktorbjorn 18 years ago.
Subtitles for intro cutscene

Download all attachments as: .zip

Change History (17)

by eriktorbjorn, 18 years ago

Attachment: sword1-subtitles.diff added

Patch against current SVN

by eriktorbjorn, 18 years ago

Attachment: intro.txt added

Subtitles for intro cutscene

comment:1 by eriktorbjorn, 18 years ago

Owner: set to sev-

comment:2 by eriktorbjorn, 18 years ago

I'm attaching subtitles for the intro cutscene, just as an example. Assigning to sev, since I think he was the one that brought it up in the first place. File Added: intro.txt

comment:3 by johndoe123, 18 years ago

Just my two cents: Wouldn't it be better to move the subtitle support directly into the DXA player code? Then in the actual game code the DXA player class would have to be subclassed to add the actual text rendering code. Another idea: To speed up text rendering, pre-render all subtitles and save them as RLE-compressed bitmaps in a separate file (similar to DVD subtitles). Just my thoughts on the topic.

comment:4 by eriktorbjorn, 18 years ago

> Just my two cents: Wouldn't it be better to move the subtitle support > directly into the DXA player code? > Then in the actual game code the DXA player class would have to be > subclassed to add the actual text rendering code.

Hmm... Wouldn't that make things more difficult, since the subtitles still need to work with the Broken Sword 2 MPEG and "dummy" players?

> Another idea: To speed up text rendering, pre-render all subtitles and > save them as RLE-compressed bitmaps in a separate file (similar to DVD > subtitles).

The text three colours - text, border and transparency - so it would have to be at least two bits per pixel, but I think I see what you mean.

Is text rendering speed really a problem, though? Each text is word-wrapped and rendered once, using the game engine's text rendering mechanism. (I think the SMUSH player re-renders subtitles every frame they're drawn, but I'm not sure.)

I'm not saying your ideas are bad, but it would be easier for me to see what you mean if you would attach an updated patch to demonstrate them.

comment:5 by fingolfin, 18 years ago

I also fail to see the advantage of prerending the text, unless the text renderer is very slow -- given that we use very simple text renderes (no fancy unicode glyph layout, no subpixel accurate positioning, no antialiasing), they tend to be fast enough. Using a text file for the subtitles also makes it a lot easier to maintain and translate them.

But maybe I am, too, missing something, so some explanations might be helpful.

comment:6 by johndoe123, 18 years ago

Sorry, I thought the subtitles were rendered for each frame. The way it is now is ok. And I didn't think about the Mpeg2 and dummy players either...oh well :)

comment:7 by fingolfin, 18 years ago

Brazilian subtitles (for testing of this patch) are available at <http://forums.scummvm.org/viewtopic.php?t=3359&start=15>

comment:8 by fingolfin, 18 years ago

Sadly, the brazilian guys didn't use this *sigh*. But I wonder: Any reason not to commit this now? Even if we need to tweak it later, there is no harm in that, is there? The advantage of this being in SVN would be that the daily builds would contain it, making it easier (and thus far more likely) for translators to use them...

comment:9 by sev-, 18 years ago

Yes, Torbjorn, please, commit it. Though it rot a bit, there is much higher chance for me to finish it.

comment:10 by sev-, 18 years ago

Owner: changed from sev- to eriktorbjorn

comment:11 by eriktorbjorn, 18 years ago

I probably won't have the time to look at it before the weekend (which is still pretty soon :-)

If my memory serves me, there were four things I considered as maybe unfinished, or open to debate.

1) No support for subtitles in the MPEG player.

2) The subtitle file format is the one I proposed, which is slightly different from the one sev proposed.

3) The bit where data is copied from the frame to the subtitle buffer is a bit inefficient. I was too tired when I wrote it to do it right.

4) I only prepared that one subtitle file, not a complete English set.

I could be misremembering though.

comment:12 by eriktorbjorn, 18 years ago

I've committed an updated and slightly cleaned up version of the patch. The issues I listed earlier remain, but I have no immediate plans for them. I don't know if it's even worth the trouble of implementing subtitles for the MPEG movies.

comment:13 by eriktorbjorn, 18 years ago

Status: newclosed

comment:14 by SF/simsaw, 17 years ago

Please also add support for DXA movies in general. The Feeble Files uses DXA movies under ScummVM, too, so it would be great to be able to write subtitles for the movies there. Please consider the issue of "double subtitling" when OmniTV is running and there's a running conversation at the same time in The Feeble Files to avoid that these subtitles interrupt each other and are displayed both instead.

comment:15 by digitall, 6 years ago

Component: Engine: Sword1
Game: Broken Sword 1
Note: See TracTickets for help on using tickets.