top | item 22171526

(no title)

Crisco | 6 years ago

So I have no experience in 3D graphics and very little experience in game design (I wrote a 2D game in high school but that's it), but if they are already going from DX9 to DX11 why don't they go to another library that supports all the platforms they already develop for such as Vulkan? I'd imagine that would better future-proof their game to make adapting to other platforms that are released in the future easier. So how hard would it be to go from DX to something else? As stated before, I have no experience in this area so I'm being completely sincere with my question.

discuss

order

Pfhreak|6 years ago

Typically a DirectX revision bump would be less work than a totally different API.

To answer "How hard could it be?", the answer is, "Surprisingly hard". Games rely on weird interactions with hardware and need to smoothly render at a consistent FPS. Often a revision bump in a library might introduce subtle changes (for example, a difference in how numbers are rounded might cause z-fighting or change the way shadows are rendered). All of those need to be discovered and fixed. Not to mention that DirectX uses a totally different shader language than Vulkan, so you have to get in there and translate all that code over.

It's definitely non-trivial. Doable, but non-trivial. I don't blame the devs for making a cost/benefit analysis and realizing they would never recoup the cost.

Given the economies of the games industry (where studios are basically always one step away from complete failure and being dissolved into nothing), I appreciate the need to focus on not losing money in this way.

tambre|6 years ago

> Not to mention that DirectX uses a totally different shader language than Vulkan, so you have to get in there and translate all that code over.

Vulkan doesn't really have a shader language unless you want to write SPIR-V assembly. Thus you'd use either GLSL or HLSL. Microsoft's own DirectX HLSL compiler[0] supports SPIR-V as a target in addition to DXIL.

[0]: https://github.com/microsoft/DirectXShaderCompiler

Crisco|6 years ago

Thanks for the explanation. I guess part of why I'm confused is that they have not stated any plans to stop supporting Switch and Playstation 4 versions of the game and in my mind those are probably just as difficult to maintain as the macOS and Linux version. Do Nintendo and Sony provide support here that make it easier for Psyonix to port to their platforms, or are there just so many more players on those platforms that it is worth the investment?

ssully|6 years ago

The developer has come out and said that as of the announcement of them dropping support for Mac/Linux, the two platforms combine make up 0.6% of their active player base [1]. I am guessing they just did the math and decided the cost of switching APIs to something like Vulkan is not worth it when such a small portion of their users would benefit from it.

[1]: https://arstechnica.com/gaming/2020/01/rocket-league-will-dr...

Crisco|6 years ago

Yeah, that is completely understandable. I was just curious why they wouldn't invest in developing for a different but more cross-platform library so that maintaining Rocket League on platforms such as the Switch and Playstation 4 (as well as the future consoles from both manufacturers) would be easier. They have stated no plans to remove support from those consoles, and I don't imagine they are much easier to maintain compatibility with than macOS or Linux.

fsloth|6 years ago

As they stated, most of their players are on windows. If windows is your target market, then DirectX is generally the graphics API you want to support. You don't want to make architecture decisions because one or other approach would be untenable to below 1% of your target. Cross-platform is not a value as such.

cwyers|6 years ago

At some point, somebody needs to actually tell the hardware what to do. If you're doing 3D graphic rendering in real time, that point is probably now. There are no magical abstraction layers that can let you do performant 3D graphics without paying attention to what's going on at the API level.

protanopia|6 years ago

Rocket League is made with Unreal Engine 3 so if they wanted to port the game to using Vulkan they would also have to upgrade the game to Unreal Engine 4.

pandaman|6 years ago

Reading the article, it appears that the issue is with the supported functionality and not with the literal library. They already had been using OpenGL instead of DX9 on Mac/Linux but they cannot use it instead of DX11 because the features they need are not available in that version of OpenGL.