API Information and Questions

I thought it would be good to have a thread about the various APIs out in the wild, what APIs actually do, and is one API better than the others.

The PlayStation uses Sony’s own APIs. There is a low level API called GNM, and a high level API called GNMX. The PlayStation has its own shader language called PSSL as well.

I have heard it said that Sony’s APIs are very close to Direct X, which makes it easier for devs to convert PC games to the PS.

The Xbox Series S and X obviously use Direct X 12 Ultimate, along with its various extensions such as Direct ML, Direct RT and Direct Storage etc. This the exact same as the Direct 12 Ultimate API used for PC, other than the fact that the Xbox DX12U API also has an even lower level of access to the GPU to get closer to the metal on console than PC.

The PC has both DX12U, Vulkan and OpenGL. Vulkan and DX12U seem to be pretty close to each other in abilities, while OpenGL seems to have fallen behind.

So questions about APIs? Do you have to use an API to make a game, or can you just access the GPU and code without one?

Idtech7 uses Vulkan on PC, how much work ot required to convert that to either DX12U or GNMX for consoles?

Do certain APIs work better on certain engines? Why is this the case?

This generation of RDNA 2 cards, the XSX and the previous versions of Nvidia cards all now have Mesh Shader, VRS and Sampler Feedback through DX12U and other APIs, so what’s next in regards to API extensions that will improve graphics into the future?

When Sony first introduced the PS4 to European indie developers, they emphasised how similar GNM was to DirectX 11. They even said it was like DirectX 11.1+.

APIs tend to abstract the inner workings of software and hardware, otherwise we would have to write different code for every graphics card out there.

IdTech Engines have been ported to consoles for a while. While they don’t really have DirectX support on PCs, in order for the engine to work on Xbox, they would have to use the Xbox’s DirectX SDK.

As with anything, sometimes an API would get more attention than another API in the same product. Microsoft seems to be giving a lot of game engines grants to improve Windows SDK implementation or the ability to use .Net Framework in some capacity.

Low level api like directx are mostly directly used by engine makers. It allows them to support more hardware without coding specifically for them (like it was on PC pre DX) and the apis being similar allows more easily for them to port among different platforms

Save for the actual api implementation being more efficient over the other this shouldn’t be the case. What can happen however is an api to offer more control and with such control the developer to make something that impact it’s performance (It was common on early dx12 and Vulkan days, where despite being lower level some devs would make optimizations that were less efficiency than what nvidia did on a driver level for dx11 for example, so even though developers had in theory more flexibility ot increase performance they ended up losing it)

MS said they want to align new DX versions with xbox releases. So likely AMD and Nvidia will continue to work with Ms to add some custom extensions that will be used by a select number of PC games for a couple years, and then when the next generation of xbox comes it will incorporate them.

Most of the DX12U spec was like this already for example.

This is exactly the sort of info I am interested in learning about.

I know very little about how API’s work but I understand they are very important.

Would a fair analogy be that the raw hardware is like a car engine whereas the API dictates how well that power can be transferred to the road? (Apologies if this is way off base)

API is application programming interface, its the collection of functions a programmer can use.

A better analogy would be a cooking recipe. The cooking API would define which steps you can use in the recipe, like mixing, chopping, boiling etc. If your cooking API has no heating this will limit the recipes you can cook.

3 Likes

No, think of api more as a wheel or a shift. They are simplified ways that let you control the car, without you having to control or implement it yourself, and they are abstracted enough that you can control many cars with the same interface (likewise with dx you can talk to pretty much any modern gpu)

1 Like

Thanks both for quick replies! This is definately a thread I’m going to follow closely. @LucasTaves @CallMeCraig

Has there been any further info on whether the developer model for indie developers is changing or evolving (not ID@Xbox, what used to be called “creators”)?

In the past, this was a subset of what used to be called UWP with C#, or else developers would use a middleware engine like Game Maker or something that output a UWP project, I think.

But I don’t have a very good understanding of how those APIs relate to the standard Xbox APIs / programming model.

I think the main thing about creators is that you have more limited access to Xbox Live but there is less of an approval process than something like ID. It appears to support modern engines like Unity.

The Creator Collection UWP titles will still target DX12U (baseline) and will still feature the same hardware restrictions as before (limited CPU access, full GPU access).

When it comes to the topic of APIs, these middleware engines (Unity, Game Maker, the unofficial Unreal Engine fork) deal with Direct X for graphics and audio. You would also be dealing with an Xbox Live API to add Live functionality like leaderboards and user sign-in.

The only apparent change made to the Creator’s Collection UWP games is how they appear on the Xbox Store. They no longer have their own section and are now listed with all other games on the Xbox Store. I actually just realized this two days ago, too. Since this is an aside topic I won’t comment on it too much; I will just say that this change great for Indies just starting out.

3 Likes