↓ Skip to main content
  1. Blog/

How GTA 6 Got Ported to PC Without an Emulator

·7 minute read
Oral Ersoy Dokumaci
Author
Oral Ersoy Dokumaci
AI and ML systems for labor markets. Python developer. Former quant.

GTA VI Launch
#

A boat crosses the bay toward the city under the date November 19 and the PlayStation 5 and Xbox Series X logos

Grand Theft Auto VI came out on November 19, on PlayStation 5 and Xbox Series consoles. An official PC version hasn’t even been announced yet, but on the same day, a group released a copy of the Xbox version. The copy was without the executable file needed to run the game on a PC. They promised that people would have the game running on PCs within a week, even past 30 frames per second.

A character walks to the gate of the Vice City Marina under a folder icon labeled 209 GB and a dashed outline of a missing file labeled executable

Achieving this without an emulator that can run GTA VI is so unprecedented that people bet it would never be playable at 30 FPS before an official PC version, let alone in a week.

A Reddit comment over a seaplane, its username blurred: ‘you guys are so stupid lol, it’ll never be anywhere close to playable even at 30fps by the time the port comes out on PC’, ending with a highlighted promise to livestream a penalty if an emulated version runs at 30fps first, and 23 popcorn reactions

On November 23, four days after launch, the executable hit the internet. By that evening, a PC could show the game’s menu. The next day, the world appeared, at about 2 FPS. Take-Two, Rockstar’s parent company, calls the files stolen, so GitHub blocked the biggest related project and its copies. But at that point, there was no putting the genie back in the bottle.

A card over a street: Take-Two Interactive, DMCA notice, ‘…stolen game files from an Xbox Series build of Grand Theft Auto VI were publicly distributed.’

By the 26th, three days after the executable came out, one version was reported running an early scene in 4K at 25 to 30 FPS.

A list by date over a parking lot at dusk: November 23, menu; November 24, 1 to 4 fps; November 25, 3 to 8 fps; November 26, 25 to 30 fps, reported

A quick disclaimer: you shouldn’t try to run these pirated copies, especially if you don’t want to see one of these on your PC.

A ransom screen with a padlock: your files are encrypted, send $500 in bitcoin to get them back, time left 71:59:58

But the interesting question is, how do you get a console game running on a PC within a week, with no emulator?

The Xbox Series X logo, labeled Xbox version, with an arrow and a question mark pointing to a PC

30 FPS
#

Nine days before Grand Theft Auto VI launched, Rockstar announced that it targets 30 frames per second, while keeping the density of its world and its inhabitants. But why 30? On the same consoles, you can play GTA V at 60. You might be guessing that the graphics are too heavy in the new GTA.

Rockstar Games’ statement of November 10 over a crowd outside a bar at night: Grand Theft Auto VI targets 30 frames per second ‘while maintaining the density and visual fidelity of all its environments and inhabitants’

A console has a central processor, a CPU, and a graphics processor, a GPU, built into one chip together. The GPU is responsible for drawing each picture: the light, the shadows, and the reflections. The CPU runs the world inside it. It moves the people and the cars and helps load the map ahead.

One chip outlined around two icons: the GPU, labeled light, shadows, and reflections, and the CPU, labeled people, cars, and map loading

A PlayStation 5 Pro has a stronger GPU than a regular PS5. It gives you a sharper picture and ray-traced shadows, but still not at 60 FPS. Is GTA VI held back by the GPU, or is it the CPU, or maybe both?

RAGE
#

An engine is the software that runs a game’s world. Rockstar’s is called RAGE, the Rockstar Advanced Game Engine. Because Electronic Arts bought RenderWare, the engine under GTA III, Rockstar faced two options. Either keep using a third-party engine like Unreal, which could have eventually cost them hundreds of millions in royalties, or build their own engine.

Two options over a city skyline: the Unreal Engine logo with the word royalties, and their own engine

RAGE grew out of AGE, the Angel Game Engine, made by Angel Studios, which Take-Two bought in 2002. In 2006, Rockstar released a table tennis game built on RAGE. It was made to show off the engine’s physics.

GTA IV followed in 2008. By then, RAGE was already a mature engine that held a renderer, physics, audio, networking, animation, and a scripting language.

Under the heading RAGE 2008, the engine’s parts: renderer, physics, audio, networking, animation, and scripting, over a GTA IV boardwalk

RAGE has used some outside software as well. In GTA IV, a program called euphoria simulated a character’s body and muscles, so a fall was worked out as it happened instead of replayed from a recording. Parts of the physics library Bullet were built together with Rockstar and merged into RAGE.

How GTA Works
#

While you play, your screen is redrawn many times each second. Each picture is called a frame. At a steady 30 frames per second, a new frame is due every 33 milliseconds. If the processing work misses the deadline, the frame comes late, and you keep seeing the last picture a little longer.

A bar labeled one frame, ending at 33 ms, with an orange line running past its end, over an aerial view of the city’s highways

The CPU running GTA VI has a few different tasks.

First, the simulation of the world. Here, we see a test on an Xbox Series X by Digital Foundry. A character walks through an airport crowd at 30 FPS. Then the character fires a gun into the air, which makes the pedestrians run for the exits, which in turn makes the FPS fall into the 20s. This is because the fleeing inhabitants take more work to simulate than the walking ones.

Second is the physics. If you blow up a car, its wheels and doors fly off as separate pieces. The CPU needs to work out the path of each projectile. In the tests, fast crashes often show lower FPS.

Third, the map. GTA VI is a download of up to 212 gigabytes, but while you play, it has to fit in the console’s memory. A PlayStation 5 holds 16 GB of RAM. So the map has to load as you move, which is called streaming.

A grid of dots labeled up to 212 GB, its first 16 dots in orange and labeled 16 GB of memory, over a street

The streaming solution is older than RAGE. For example, GTA III already streamed its city from the disc. In fact, its makers worried that all that disc movement would wear out home consoles. GTA III’s first island originally had a long main road. At high speeds, the game struggled to load all the buildings along it. So the road layout was changed to slow you down. In other problem spots, cars got about 5% more air resistance. Similarly, in GTA VI, frames can come late as you accelerate, because the CPU helps load the map.

Last is the light. GTA VI lights its world by following rays of light through the scene, which is called ray tracing. The GPU calculates these traces. But keeping the scene up to date as cars and people move can take a lot of CPU power.

On the other hand, the GPU running GTA VI has two main jobs: drawing each picture and tracing the rays of light. The GPU work is unlikely to be the bottleneck for GTA VI because as consoles evolved from the PS5 to the PS5 Pro, the GPU got much better, but the CPU stayed roughly the same chip.

The PS5 and the PS5 Pro side by side, each a chip with a GPU and a CPU, the PS5 Pro’s GPU drawn larger, in orange, and marked +67%

So, for example, at a targeted 60 FPS, the same work would need twice the processing speed for both CPU and GPU. The GPU can catch up with that target, but the CPU is the main limit.

The one-frame bar with a mark at 16.7 ms, halfway to 33 ms, above the CPU’s four tasks: people, physics, streaming, and ray-tracing updates

Rockstar could give you an emptier world, which would mean less CPU work, but they don’t want to compromise that. Take notes if you want to develop a similar game. That’s a free lesson from Rockstar telling you what you should be caring about in your product.

How GTA Works on PC
#

Now that we have some understanding of how GTA VI works on consoles, let’s try to understand how these projects could port the game to PC so fast. AI tools are a big help, obviously, but the task is still not so easy from the outside. Let’s go from the easiest to the hardest problems to tackle along the way.

A later Reddit comment, its username blurred: ‘I may have slightly underestimated the advancements in AI and the dedication of nerds on this one.’

First, the console’s CPU needs almost no emulation. The Xbox Series has the same kind of CPU as a PC has, so the leading versions run the game’s own code natively. On Intel processors, you need to imitate a few CPU instructions that only AMD processors have, but that wasn’t too much work.

The Xbox Series chip, its CPU in orange, linked to a PC’s CPU under the label x86-64

Parts of the console’s system are rebuilt. These projects work like Wine or Proton, the tools that run Windows games on Linux.

The Wine and Proton logos over a marina

They load the game into a Windows program. Windows answers some of the game’s requests to the console. You also have to write your own code for the rest: the player, saved games, files, sound, and Xbox’s graphics interface.

The graphics programs are translated. GTA VI ships about 25,000 small programs for the graphics card, already built for the console’s AMD chip. The projects translate them for PC graphics cards. This is a relatively big task.

25,000 graphics programs, with an arrow from the Xbox chip’s GPU to a PC graphics card

But the real challenge is the memory. On the console, both CPU and GPU share one memory. A PC with a graphics card has two separate memories. Every frame, the projects copy what changed from one to the other.

This communication cost, which does not exist on the consoles, can be even more than half of all work for each frame.

The PC’s CPU and GPU, each above its own memory, with a one-frame bar filled in orange to just over half

Apple Macs have unified memory. Do you think it would be easier to port the game there?

A laptop labeled Mac above a single memory labeled one memory, beside a question mark

GTA Engineered
#

We covered how GTA VI might be working at a very high level, but RAGE is a closely kept secret. Even if it were to be open source, it could take years to understand the complexity behind it. One thing is for certain: GTA VI itself is an incredible engineering achievement that pushed the consoles to their absolute limit.

Footage: Adrianus, Digital Foundry, Dreamscape Gaming, DubStepZz, GRANDOS, Hobby Cantina, Ice’s Gaming Vault, Isaac4K Gaming, LKG21, PhysicNation, and Robot89. Proton logo: ProtonLogo.jpg, Valve Software & Codeweavers, CC BY-SA 4.0, keyed and cropped. Wine logo: WINE-logo.svg, Joel Holdsworth, from Jon Parshall’s design, GNU LGPL.

Real Production Systems - This article is part of a series.
Part 2: This Article