By using this site, you agree to our Privacy Policy and our Terms of Use. Close
DonFerrari said:

Read "the-pi-guy" answer, on Assembly translating to what I said. You may claim it is a false statement, I would say it is at most imprecise.

And I don't remember any 3rd party going this route to optimize their code, nor any MS dev, not even other Sony devs on PS3. No other company was looking this deep in tailoring the code. That was even the reason gave for why the remaster took so long to be made when compared to other ports from PS3 to PS4.

Naughty Dog wasn't writing their entire engines in Assembly. They were writing it in C++. Evidence for that has been provided.
It was actually common for developers who wanted to keep the SPE's/SPU's at 100% utilization to interface via assembly... But the bulk of their code base? C++.

This was out of a need rather than a want because of the Cell processor, one of the reasons why it was difficult to program for... Generally no one makes games in pure Assembly or Machine Code, because there is no point... Even harder for big developers/publishers because they need a team to be working on a code base and C++ is very accessible to that end.

DonFerrari said:

That also doesn't deny the fact that MS going for multiplat on PCs with DirectX will probably use less of low level specialized code for Xbox on their games.

Game engine and API are separate pieces of kit.

A game engine can support multiple API's, if Microsoft builds a game for PC, there is no reason why it couldn't leverage Direct X, OpenGL or Vulkan (Even at the same time!) and on the Xbox, use it's low-level API... This actually used to be a common practice on the PC where a game like Unreal Tournament would support OpenGL, 3DFX Glide and Direct X on the PC.

drkohler said:
Time critical stuff is always programmed in Assembly language. Other stuff might be, too, if you have talented "Hand Assemblers" in your code grouip. As compilers mature over time, less and less code is hand assembled. That rule applies to everything, not only consoles. Of course, writing in Assembler takes more time and is more error prone than simply using a high-level language, hence one tries to stay away from it as much as possible.

As time goes on, I find it's being used less often.
It was very common in the SNES and prior days as there was a greater need to extract more out of the hardware... But by today it's a rarity, it might be used by a few smaller teams making a smaller scope game with some impressive aspects like Physics, but overall, the bulk of the work is C++... Compilers have gotten substantially better as well, which has eased the burden somewhat.

In regards to programming itself, my bread and butter is objective C.

https://gamedev.stackexchange.com/questions/31987/how-much-assembly-is-really-used-in-modern-game-code

fordy said:

That's because the more advanced compilers tend to exploit a lot of the CPUs hidden features that a lot of programmers never take into account, such as interleaving instructions for optimised use of SMT, re-ordering assembly language for better use of eg. Intel's branch prediction logic, down to storage order and spatial locality.

From what I can understand, the Cell used the PowerPC instruction set. However, the way it processed these instructions was different to IBMs other CPUs, due to the architecture of the Cell. Therefore, it would make sense why ND might have manually optimised some code using assembly language, especially if the PowerPC compilers used were optimised more toward the IBMs CPUs and not the Cell.

However, on an architecture as old and thoroughly optimised as x86/x64, the benefits of assembly language over a well advanced compiler range from absolute minimal to counterproductive.

That being said, there may be a little gain if compilers aren't yet optimised toward Zen2. However, I doubt this will be anything like we saw with the Cell.

It's a bit of a stretch either way as it was an uncommon practice on the Playstation 3 even for a tiny part of a games code base.

As for compilers on x86... From what I remember a few years back, x86 compilers tend to have an advantage on Intel processors as Intel worked with developers on making the compilers shine on their hardware, plus they had the majority of the market locked up... So AMD specific instructions tended to fall by the wayside. (I.E. 3D now!)

That is rapidly changing now of course, Zen/Zen+ has been on the market for a few years and Zen2 is quickly ramping up, AMD's market share is also growing rather significantly... So that is likely to have a flow on effect.

potato_hamster said:

You're now assuming the PS5 is coming out holidays 2020. You're also assuming that a console launched a year earlier would not be more powerful than one launched after. Please correct me if I'm wrong, but wasn't the Xbox 360 more powerful than the PS3 in many ways, or at least on-par with the PS3's performance despite the year head start and the smaller price tag?

This is just one more instance of you letting your feelings get in the way of facts. Perhaps you should take your own advice on giving your own posts more thought.

Yes, the Xbox 360 certainly had a multitude of technical advantages over the Playstation 3... It had a better memory system and it had a superior GPU.
But overall, the Cell did give the Playstation 3 the advantage in the end, it just took awhile for developers to get accustomed to the chip.

In saying that, it wasn't a dramatic advantage, it was still clearly a 7th gen machine outputting games that looked 7th gen.




--::{PC Gaming Master Race}::--