Martin Chalifour, concertmaster of the Los Angeles Philharmonic, performs the eerie concertolike solo in “Welcome to Rapture,” part of Garry Schyman’s score for BioShock. In Prince of Persia, Stuart Chatwood plays the oud and other instruments to add an exotic touch to Inon Zur’s sweeping orchestral score.

The field has also attracted major film composers like Danny Elfman, Howard Shore and Hans Zimmer. The composer Michael Giacchino began his career writing for games (including the Medal of Honor series) before branching into film and television. And more composers might follow his path now that schools like the Berklee College of Music in Boston have started game scoring classes.

For composers and performers accustomed to struggling to find steady work even in flush times, there’s good money to be made in an industry that, according to the NPD research group, generated $21.6 billion in retail sales in the United States alone in the 12 months that ended in November. Tommy Tallarico, a game composer who founded the Game Audio Network Guild to promote the field, said the typical fee for a composer is $1,000 per minute of music, with top names making up to $2,000. For a typical game, which requires one to two hours of music, a composer could make $60,000 to $240,000.

The increasingly nuanced scores reflect “the growing maturity of the games industry, which is getting better at storytelling” and weaving moral dilemmas into game plots, said Sean Decker, general manager at DICE, the division of Electronic Arts that created Battlefield. The main challenge for composers is switching from a linear to an interactive medium in which the music has to reflect several possible outcomes at each stage of the game. Different music is needed, for example, depending on whether a gamer perishes or emerges victorious from a tussle with a venomous monster.

Jesse Harlin, music supervisor at LucasArts (which uses scores by John Williams, among others, for its Star Wars games) is swamped with demos from composers. He encourages them to write music that reflects what is happening to the gamer in the story and to avoid loop-based scores that can result in listener fatigue. Music can be “dynamically mixed in real time by the game itself,” he said, meaning that if the gamer gets into a hectic combat situation, for example, brass and percussion can be layered on top of a string track.