Last week my team and I spent some time in Bellvue working with Valve's Linux team on their port of Left 4 Dead 2.
It was the most successful work trip I've ever had. The guys at Valve were amazing to work with. They are sharp, driven, and have an aggressive plan. Looking at how far they've come and the short amount of time in which they've done it, I have every confidence that they're going to kick their plan right in the butt. It's going to be a good time to be a Linux gamer.
We had three main goals going in:
- Help them tune their game for our driver / hardware.
- Find out where our performance is lacking.
- Find out what OpenGL features they need / want.
I think we scored on every point. We helped them find some performance bugs in their vertex buffer management (which also affected other GPUs / drivers) and some places where the accidentally triggered shader recompiles. This gave some healthy performance improvements.
We also found some areas where our driver really, really needs to improve. They have a couple shaders that devolve into register spilling nightmares. There are also a few places where we eat way, way too much CPU. A lot of these problems mirror issues that we've seen with other game engines (e.g., Unigine).
These have been a lot easier to diagnose on L4D2 because we have access to their source code. Being able to take a profile that shows times in the driver and in the application makes a world of difference. Being able to tweak little things in the app (what happens if I do this...) is also helpful for diagnosing performance problems. Eric has already started landing patches for L4D2 performance, and there will be many more over the coming weeks.
The funny thing is Valve guys say the same thing about drivers. There were a couple times where we felt like they were trying to convince us that open source drivers are a good idea. We had to remind them that they were preaching to the choir. Their problem with closed drivers (on all platforms) is that it's such a blackbox that they have to play guess-and-check games. There's no way for them to know how changing a particular setting will affect the performance. If performance gets worse, they have no way to know why. If they can see where time is going in the driver, they can make much more educated guesses.
We also got some really good feedback about features. The biggest feature they want is better output from GL_ARB_debug_output. They really want to know when they do things that fall off performance paths, trigger shader recompiles, etc. We hacked out some initial versions of this, and it was a big help. Some patches in that area should hit the mailing list soon.
They're also interested in what they call "smart vsync." Swaps that are scheduled soon enough will have vsync, and the application will be vsync limited. Swaps that are scheduled too late happen immediately. In their words, "Tearing is bad, but dropping to 30fps is worse." On GLX, we can expose this with GLX_EXT_swap_control_tear.
What should Valve be doing for Linux and open-source software? They don't plan to just release the Steam client and select titles for Linux and then suddenly scream "MISSION ACCOMPLISHED!"
With their inaugural Linux blog post from yesterday, on their blog it clearly states "We are also investigating open source initiatives that could benefit the community and game developers." So what should they do? Going back to April this was something Gabe Newell, Mike Sartain, and I were talking about were some of the different possibilities. Now that they've begun to mention this extra commitment publicly on their blog, I guess I am free to write a bit more.
Valve is treating Linux very seriously and as you can see they're actually releasing real games and the Steam client with a goal of achieving the same performance under Linux as in Windows. They aren't doing anything like EA's shit on Linux nor are they just trying to pipe their game engine over Wine. They're looking to go beyond the basics and fundamentally improve Linux -- their end goal isn't just to release the Steam client with a handful of titles for Ubuntu and then congratulate themselves on being the biggest native Linux game publisher. They want to do much more.
Among the recommendations I made to Gabe back in April were: improving the available documentation for Linux since it can be hit-or-miss, dedicate some resources to the advancement of the open-source Linux graphics driver, and provide some resources to help in legal-related matters (Gabe was stunned to learn that S3TC isn't enabled by default in the open-source drivers over legal/patents fears). Other possibilities were also talked about from creating a new debugger for Linux to marketing.
Valve's games simply being officially available on Linux is a huge statement for the industry by itself. But before getting too excited when hearing "Valve" and "open-source" together, there is no indication that they have any plans at all to open-source the Source Engine or Steam Client. That was never mentioned at all in talking with them, and frankly, it wouldn't provide them any real return or huge benefit. I assume they would also have a similar feel to why Unigine, as mentioned in Phoronix articles in the past, won't open-source their engine or tools.
As Mike Sartain mentioned in a recent email to me about the ongoing hiring of more Linux developers, "Our goal is to help Linux become a great entirely open gaming platform for everyone – not just Valve. There is a ton of work that has nothing to do with our game or engine and we’d love to talk to any good Linux developers about possibilities. I personally (along with several others on this team) want to help Linux improve in general as well. We’re hoping that getting more folks using the platform via games is how we can best contribute to that goal." Additionally, "what a company like Valve could do to help gaming or gaming development on Linux? Might be something like improving tools (apitrace, perf, etc.) or working on drivers (Intel graphics, audio, keyboard, mouse, etc.) or SDL or X or [redacted]? Or something else we haven’t even thought of yet?"
What do you think Valve can do to better embrace Linux and open-source? The Phoronix community is very vocal and diverse, so there's surely to be some great original ideas out there (in addition to last month's What Are The Biggest Problems With Linux?, These Are The Biggest Problems With Linux, and Linux Driver Support Still Leaves A Lot To Desire). Post using the comments link below and they'll likely see it or you can also fire them off an email.
As I wrote back in May, "I'm very confident in Valve and their Linux intentions; the impact of their work can greatly benefit the entire Linux ecosystem in huge ways. Whether you're a Linux gamer or not, it's to everyone's benefit that Valve's striking Linux work is steaming with greatness. Without the very best developers the Valve Linux cabal could be left for dead or ricocheting through a portal that has a half-life that is too short to make everything a reality."
tudo excelentes notícias para o linux.
Mas a mim o que me faz confusão é o seguinte: Porque é que a valve está a investir tanto em linux, o que é que eles esperam ganhar? Publicidade? Mais uma plataforma? É que mercado é quase "não existente".
Ah e espero que não se cinjam ao uso do Ubuntu, pode ser um pouco mais complicado para eles, mas era excelente ter esta plataforma disponivel para todo o linux.
Se melhorassem os drivers, e se os jogos disponiveis em linux futuramente fosse praticamente os mesmos que o windows, certamente migraria o meu fixo para esse S.O ^^
Jogos para Linux só tem mercado nas lojas de aplicações como o Ubuntu Software Center e o Valve Steam (do qual deverá suportar jogos compilados, via Wine ou híbridos na mesma aplicação), e não nas edições a retalho.
Jogos para Linux só tem mercado nas lojas de aplicações como o Ubuntu Software Center e o Valve Steam (do qual deverá suportar jogos compilados, via Wine ou híbridos na mesma aplicação), e não nas edições a retalho.
De qualquer maneira, a distribuição Linux com maior sucesso comercial chama-se Android.
Jogos para Linux só tem mercado nas lojas de aplicações como o Ubuntu Software Center e o Valve Steam (do qual deverá suportar jogos compilados, via Wine ou híbridos na mesma aplicação), e não nas edições a retalho.
De qualquer maneira, a distribuição Linux com maior sucesso comercial chama-se Android.
Se os jogos fossem feitos em sandboxes, adaptados às lojas virtuais, só tínhamos que nos preocupar com as lojas virtuais, mas é quase impossível, por causa de hardware, DirectX, coisas assim... Era preciso uma norma universal 3D qualquer.
Sim, eu sei disso tudo. O que falei não era o motor gráfico do jogo, referi-me mesmo às API's gráficas.Essa coisa que falas é o motor gráfico do jogo e já existe uma API gráfica universal, que é o OpenGL. É utilizado por muitas plataformas, não só PC's, como Wii, Playstation 3, sistemas ARM como smartphones, etc. É mais antigo que o DirectX.
Falaste em sandbox e o que mais se aproxima desse termo é um motor gráfico.Sim, eu sei disso tudo. O que falei não era o motor gráfico do jogo, referi-me mesmo às API's gráficas.
O DirectX é muito mais usado nos jogos de topo em PC. O OpenGL é muito bom, mas há conteúdo a mais para o DirectX. Por isso, não há norma 3D alguma, pois cada companhia usa a sua. E enquanto houver tanto conteúdo DirectX, o monopólio de jogos em computador será da Microsoft.