Jump to content
Sign in to follow this  
David Mills

The Same Code, or Not?

Recommended Posts

Someone please help me understand what appears (to me) to be a contradiction. On the one hand, I read in this forum that the PC and Xbox versions of MSFS actually run the identical code. On the other hand, I also read in this forum that the Xbox version is DX12 while the PC version is DX11. So is it the same code, or not?


Processor: Intel i9-13900KF 5.8GHz 24-Core, Graphics Processor: Nvidia RTX 4090 24GB GDDR6, System Memory: 64GB High Performance DDR5 SDRAM 5600MHz, Operating System: Windows 11 Home Edition, Motherboard: Gigabyte Z790 Aorus Elite AX, LGA 1700, CPU Cooling: Corsair H100i Elite 240mm Liquid Cooling, RGB and LCD Display, Chassis Fans: Corsair Low Decibel, Addressable RGB Fans, Power Supply: Corsair HX1000i Fully Modular Ultra-Low-Noise Platinum ATX 1000 Watt, Primary Storage: 2TB Samsung Gen 4 NVMe SSD, Secondary Storage: 1TB Samsung Gen 4 NVMe SSD, VR Headset: Meta Quest 2, Primary Display: SONY 4K Bravia 75-inch, 2nd Display: SONY 4K Bravia 43-inch, 3rd Display: Vizio 28-inch, 1920x1080. Controller: Xbox Controller attached to PC via USB.

Share this post


Link to post
Share on other sites

It would literally be impossible for it to be identical code due to the multiple configurations and hardware a PC could have. 

  • Like 2

ASUS ROG STRIX Z390-E GAMING / i9-9900k @ 4.7 all cores w/ NOCTUA NH-D15S / 2080ti / 32GB G.Skill 3200 RIPJAWS / 1TB Evo SSD / 500GB Evo SSD /  2x 3TB HDD / CORSAIR CRYSTAL 570X / IPSG 850W 80+ PLATINUM / Dual 4k Monitors 

Share this post


Link to post
Share on other sites

Without, obviously, actually knowing what the code looks like, here's my interpretation, as a software engineer, of what I've read.

The vast majority of the code is going to be the same across PC and Xbox. Small parts of the code, however, have to differ because the platforms are different. As you mention, Xbox uses DX12 while PC uses DX11. That's only going to affect the lowest level of the graphics code, though... there will likely be a layer that "abstracts away" this difference, and everything that builds on top of that will be the same.

Another area where you'll see differences would be some of the UI, but again, those differences will be confined to small parts of the code. Finally, some internal configuration "knobs" will likely be set to different values on Xbox and PC. 

  • Like 10
  • Upvote 1

Share this post


Link to post
Share on other sites
16 minutes ago, Ianrivaldosmith said:

Pardon my ignorance, but, why does it matter? 

It's AVSIM. People could have 20 page debate over which bottled water is more wet 

  • Like 19
  • Upvote 4

ASUS ROG STRIX Z390-E GAMING / i9-9900k @ 4.7 all cores w/ NOCTUA NH-D15S / 2080ti / 32GB G.Skill 3200 RIPJAWS / 1TB Evo SSD / 500GB Evo SSD /  2x 3TB HDD / CORSAIR CRYSTAL 570X / IPSG 850W 80+ PLATINUM / Dual 4k Monitors 

Share this post


Link to post
Share on other sites
1 hour ago, David Mills said:

I also read in this forum that the Xbox version is DX12 while the PC version is DX11. So is it the same code, or not?

The X-Box version isn't running on true DX12, it's still DX11 like PC, just running in a wrapper that emulates DX12.

It isn't on PC yet because it isn't using any DX 12 features.

Edited by Tuskin38
  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, David Mills said:

Someone please help me understand what appears (to me) to be a contradiction. On the one hand, I read in this forum that the PC and Xbox versions of MSFS actually run the identical code. On the other hand, I also read in this forum that the Xbox version is DX12 while the PC version is DX11. So is it the same code, or not?

A little bit of what martinboehme said earlier.  In software development, most architecture is separated into layers, and you try to abstract each layer from the other.  The general idea is, if you abstract the layers well, you can swap out one layer with something entirely different, but the other layers will continue to function as before.  In other words, the other layers don't know the details of how another layer functions (hence, it's important to "abstract" them), which allows you to swap out whole layers this way.

For example, you have a business layer and a database layer for your company's application.  The database layer currently runs on an Oracle database.  One day, management tells you that they want to switch from an Oracle Database to and SQL Server Database.  If the abstraction was done correctly, you should be able to switch to the SQL Server Database quite easily.

Back to MSFS.  I assume there is a layer responsible for rendering the graphics with DirectX.  Most likely, Asobo has abstracted that layer into a graphics rendering layer.  For the X-Box, it runs on DirectX 12 (I have read in other posts that it may actually be a DirectX 12 wrapper at the moment).  On PC, that same graphics rendering layer is running on DirectX 11.

A lot of the other code for both PC and X-Box is probably the same.  There may be a few other differences too, such as controller inputs, etc.  So to answer your question, I assume most of the code for X-Box and PC is the same. But there may be some layers swapped out in X-Box, such as the graphics rendering layer, that is still running on the PC version of MSFS.

Edited by abrams_tank
  • Like 2

i5-12400, RTX 3060 Ti, 32 GB RAM

Share this post


Link to post
Share on other sites

To take a very simple example. On my XBOX Series X if you go into the graphics settings then there is one option. Just ONE. It is to turn HDR on/off. That is it. On the PC version there are loads of options. However, the code might be identical. e.g. Frst bit of the graphics menu code says 'If Xbox go to Xbox page subroutine else carry on an run PC graphics subroutine.

 

CJ

  • Like 1

Share this post


Link to post
Share on other sites

Worth bearing in mind, is that the XBox (various versions), is essentially a standardised PC using a version of the Windows OS to run it and standardised CPU and GPU units which are typically comparable to contemporary desktop gaming PCs in regard to their components, with the economy of scale purchasing allowing this to made comparatively cheaply. So it basically has to use broadly similar code to that of a desktop PC, and has always been intended to be that way because it was developed to counter the threat to desktop PCs and more specifically the sales of gaming software for them which was coming from the Sony Playstation.

Thus the XBox is basically a loss-leader, which uses what some people refer to as the 'shaving razor' business model, i.e. selling the razor handle cheaply, then making the money off continued sales of blades for it, the blades being the software. Each XBox has sold multiple millions, some versions selling over eighty million units, with most previous versions selling at least 50 million units. But typically, a top-selling title for the XBox, such as Call of Duty, sells about eight million units and most users will buy lots of titles for their XBox, or a gaming subscription (and sometimes both), so it's a business model which definitely works.

Currently an AMD Zen eight core CPU and an AMD custom GPU running Windows 10 is at the heart of the XBox, but previous models used what was essentially an ATI Radeon GPU, apart from the first XBox, which used an NVidia Geforce 3 for the GPU. The main clue as to the similarity between an XBox and a PC, apart from the fact that Microsoft is the maker of it and deliberately developed it that way, is the name of the thing. This derives from the suggested name for the first version, which has subsequently been the name of all of them. It was going to be called the Direct X Box, but this was then shortened to XBox.

So it is essentially a cheap (ish) PC sold at a bit of a loss. As such, it can share most of the code for a desktop PC, but be written to work specifically well for that exact combination of components.

Edited by Chock
  • Like 5
  • Upvote 1

Alan Bradbury

Check out my youtube flight sim videos: Here

Share this post


Link to post
Share on other sites

Exactly. Like a car. You may not have heated seats, but the software is programmed to use it, often the wiring is in place, and you just need the switches, seats and a programmer to turn the routine on. 

  • Like 2

Share this post


Link to post
Share on other sites

Also, and this is just a guess, the data in the "Official" folder is probably the same across the two versions. It's just the EXE that is slightly different.

...jim

 


ASUS Prime Z790-E, Intel i9 13900K, 32Gb DDR5 Ram, Nvidia 3090 24Gb, Samsung 970 EVO Plus 500 GB and 1 TB, Samsung Odyssey G9 Ultrawide 49" G-SYNC Monitor.

Share this post


Link to post
Share on other sites
2 hours ago, JimBrown said:

Also, and this is just a guess, the data in the "Official" folder is probably the same across the two versions. It's just the EXE that is slightly different.

...jim

 

I doubt the EXE is different between XBox and Windows.  As Matt said, it's just a different configuration flag that is set, and the code will know how to perform differently on the XBox and the PC.  

  • Like 2

i5-12400, RTX 3060 Ti, 32 GB RAM

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...