The fighting game featuring Darth Vader, Yoda, and The Apprentice was Soulcalibur IV.
Developed by Project Soul and published by Namco Bandai Games, Soulcalibur IV launched in 2008 for the PlayStation 3 and Xbox 360. Its most recognizable crossover feature was the inclusion of three Star Wars guest fighters alongside the series’ weapon-based roster.
The console versions did not initially contain identical guest lineups. Darth Vader appeared on PlayStation 3, while Yoda appeared on Xbox 360; the opposing character versions were later offered as downloadable content. The Apprentice, the secretive protagonist of Star Wars: The Force Unleashed, was available in both versions.
Soulcalibur IV also introduced online multiplayer, character creation, and the Tower of Lost Souls mode. It is easy to confuse the game with other crossover fighters, but Mortal Kombat vs. DC Universe, Virtua Fighter 5, and Tekken 6 did not feature this specific trio of Star Wars combatants.