Porting games

HBYR

Chassis Packer
Original poster
Feb 23, 2019
16
2
Hi guys,

There's something that has been bothering me for the last three days.
How does game porting work and why is it so difficult?
Taking into consideration an Xbox One and a PS4, they both run on x86-64 instruction set, and an AMD GPU.
Shouldn't be as easy as replacing the custom compiler to the default compiler on the PC?
Can someone explain it to me please? (And please, don't shy away from details?)
 

Choidebu

"Banned"
Aug 16, 2017
1,198
1,205
In my time of writing softwares for a living, I learned that the closer a codebase is to the bare-metal, the harder it is to port it to different architecture or platform.

Now porting cross-architecture, if the source architecture is easier, e.g older, slower, well-documented, most of the time it is much more easier and economically viable to emulate it. Have the code run on top of a VM of sort.

For the rest, the story isn't that easy (not that designing and emulator is easy - jist ask dolphin devs)..

Game developers used to have to squeeze every last bit of performance out of their system. This often means assembly code. Consoles were even worse back then, you would have system calls to specific hardware blocks that does specific things, in the name of speed. These would need to be translated and coded seperately when ported to a more generic computing device, i.e a PC.

OS is another layer that you cannot simply emulate. On consoles this is often a home grown specific OS that does special security and resource allocation. Not just memory request, also multi process/threading, and hardware access to the input device and feedback etc. Consider a Wii sensing device or xbox's kinect. The system designer will have no pressure to make the interface universal, with usb for example.

Speaking of interface, it is another problem. Each consoles have their own controllers. Porting a game to another means you need to adjust the experience to mimic, or best the prior, otherwise dissapointing consumers. If you have PvP, it gets worse - on a point and shoot game for example, do you lump PC users with their superior mice and console users with their puny thumb keypad and how about a wii nunchuck etc... For some games the experience is too tailored for specific input device it's not even worth the development time to port.

Modern game is supposedly better at this, you already said the first reason; that more and more consoles are embracing x86-64 architecture instead of special arch (remember Cell?). Second is consumer demand for gaming on multiple devices. More people liking the idea of seamless experience over console, mobile and pc gaming. Third, faster development cycles - release fast, fix later, release expansion, sell DLCs, sell content. The only way they can do this is to share more code between platforms.

All these gave rise to game engine companies. You heard them - Unreal, Unity, Unigine, Cocos... These engines abstracts the uderlying differences of these platforms (and even archs) so game companies can focus on core game dynamics and experience, rather than porting features between platforms.
 
Last edited:

Kilrah

SFF Lingo Aficionado
Feb 20, 2017
128
112
This is a good example:

The PS4 is as you say an x86 CPU and an AMD GPU... but it's got so many customizations, quirks and deviations from standards sometimes for good reasons but often for no reason that seems to make any sense that it's a whole lot of mess.