Karaoke You Say?
We have tackled several technical challenges in developing The Bard’s Tale in
order to make the game play and look as good as possible. One thing we pride
ourselves on is putting in interesting moments that may or may not have anything
to do with completing a quest but are entertaining for the player to experience.
These aren’t afterthoughts and we got to great lengths to make these moments
detailed and polished. For example, there are a several scenes in The Bard’s
Tale where NPC’s break out into song. Some are just for laughs while some also
have helpful clues in the lyrics. In either case the game design called for the
classic yellow karaoke ball to bounce across the text of the lyrics in time to
the singing. While this is far from the bigger technical hurdles we have leapt
in making the game, I was a bit concerned about this feature since it meant we
would have to create the timing data for each of several songs across several
languages. That is a lot of grunt work for some poor sucker and I had a feeling
it would end up being me since I’m primarily responsible for our language
localization system.
So I did what any good programmer would do in this situation. I put it off
hoping the feature would be cut. Ha ha! Just kidding Brian! Lucky for me a
decision came down a while later not to translate the songs for foreign markets.
That cut the chore down to a less threatening size but still the problem
remained of how to create the karaoke data with the least amount of grunt work.
I wasn’t worried about making the ball bounce on the words. I figured that was
the easy part. Little did I know.
My initial thinking was that I would have to create time offset and text
offset pairs for every word in the song. I started by defining a timing notation
I could insert into the actual lyrics text for each word in the song. But it
soon dawned on me that I could take advantage of the fact that songs have
regular beats for the most part and the words tend to fall on beats or
half-beats. So instead of having to time every word, I made the parser assume
that words fall on half beats. Then I only needed a couple initial time markers
to establish the beat, plus some rests beat markers and occasional time
corrections. I also needed a way to note exceptions to the word per half-beat
rule. I made up notation for breaking a long word into syllables for multiple
ball bounces and for merging multiple short words into a single bounce.
That worked out great and I was able to pretty quickly annotate the lyrics
text for a pretty good match on the first pass. It then took a surprisingly few
additional time notations to really tighten up the timing. At this point I was
just highlighting the words to check the synchronization. Now it was time to
bring in Mr. Ball!
Page 2 of 2 »