You're talking about Proton.
Proton, while spearheaded and massively contributed to by Valve, is totally open source, any linux user can use it anyway they want to, and there are others like GloriousEggroll, with his own significant tweaks and optimizations, there's a whole dedicated branch specifically for running Titanfall 2...
The only games that are not compatible either are so by choice of intentionally refusing to make their anti cheat work on linux, or they are brand spanking new and use some newfangled DX12/Nvidia specific thing, which then has to be reverse emgineered so that it works with Proton.
On average, that happens in 3 to 6 months after the game is released.