Back to search

What kind of dark magic allows the game to track an object that is on a rotating planet and keep it all in proper relation to everything else in a massive solar system at millimeter precision?

TL;DRChris Roberts explains that moving vector math from 32-bit to 64-bit gives millimeter precision across huge distances, and planet-relative physics grids let players move with a rotating planet.

Chris RobertsCEO and Project Director

Well, we've obviously talked about the fact that we shifted to 64-bit mathematical precision. I do notice a lot of people get confused between 64-bit binaries and 64-bit vector math. So it's not really 32 or 64-bit binary stuff, because that's not the issue here. We've moved the vector math from 32 bits to 64 bits, and that's important because it's floating point, and with floating point, even though a 32-bit floating point number can describe a very large number, billions in size or much bigger than that, the problem is when you move to the big numbers, your precision at the low end becomes not very good at all. All of a sudden, your precision becomes in the meters or the kilometers that you get in really big numbers, as opposed to the millimeters, which is what we need, because no matter what, we're in first person. You can see your hands. There's not much distance between my hand and here. All this kind of detail up close that you expect to see, yet all this detail has to exist in a star system that is millions, billions of kilometers across. You just need a bigger range in your floating point to be able to describe very high precision, but also the large numbers. And that's why we had to move to 64 bits. So that's one of the things that enables the scale, say, that we showed in the demo at CitizenCon, where you can see this planet, you fly past that space station. And we could have been way further out. We had what was called TrackView, which is the in-engine, in-game, that was all real-time rendered. You can see on the video, you can see the frame counter going. TrackView is where we put a camera on a spline path and fly it in. And we basically did it there instead of you flying in a Constellation because to cover that distance that we were covering in a short period of time for a demo, we don't want everyone sitting there going... So we could have been further out and the planet could have been just a dot. Or you may even see it and then you fly in and you go past it. But that's what you're doing. So you have to have this massive scale, but then get down on the ground and you're driving around or walking around, and it has the resolution, the texel density, the detail of the models, whether it's a plant or anything, that hold up to what you've seen in the most recent first-person game on the highest-end PC or high-end next-gen consoles or whatever. So you need the 64-bit to do that. So we've talked about that. That's one of the things that enabled 2.0, the large world.

And then the second thing that we have on the planets, which is also an extension of what we did for the multicrew, is we have our physical worlds that we simulate. And so we have more than one that we're doing, which we call the physics grids. And so we had the big global grid that is basically the star system's physical space. And then if you're flying around in a spaceship, there's the local grid, so the interior of it. And that's in essence its own separate physical world simulating inside a bigger physical world. Well, a planet is really just a big version of that. And we have a special version of a physical grid that is projected around a planet sphere, where we determine the transition is actually the atmospheric level. That's how we detect when we do the atmospheric effects and everything else like that. There's a certain distance above the surface of the planet that the atmosphere emits. When you enter that, you basically transition into the grid. The grid of the planet is relative to the planet. It's in what we call the planet zone. If we start rotating the planet and you're inside that grid, you just move with it. As far as you're concerned, you're relative to the world. You don't care about where you are relative to the star system. It's essentially just a very big version of what we use for spaceships, but projected onto a sphere, and in some ways it kind of simulates, it's a very coarse, rough simulation of what really happens in gravity, because at some point you enter, say, the Earth's atmosphere and via its gravitational pull you come into the frame of reference of the Earth, and essentially when you're in the local grid of the planet you're in the frame of reference of the planet. We don't have to be rocket scientists to figure out all the kind of trajectories that NASA's figuring out: okay, we're going from Earth, we're going to Mars, or whatever it would be. But that does allow us, if you're flying around in your ship and you come to whatever the planet is, rotating on its axis, you come in, once you enter its grid you will now be in its frame of reference. That's how we can do it, and that's the important thing. The sunsets and the sunrises are not moving the sun, it's the planet itself moving.

Tony ZurovecPersistent Universe Director

I would add one more thing, which is this is just one of the classic examples on this project of building the proper foundation and how it has so many benefits down the road. Back when the company was much smaller, there were a number of engineers devoted to this conversion. In other words, it was a real investment when there was nothing to show for it, and then all of a sudden that functionality was done and now you could start to build upon that. If we didn't have the 64-bit space, we wouldn't have interplanetary travel. We could have basically done a little area where you can run around, but there would be no way to get from that area to another without doing the instancing. Now that we have the 64-bit, now we have the option to basically have this seamless transition from planet to space station. We could not have those if we were limited to 32-bit space.

Chris RobertsCEO and Project Director

If we had 32-bit, we couldn't even have, even on the planet itself, the range we do, because that's typically why most games, whether it's a Battlefield or whatever, they have a certain limit to their map size, because when you get to the edge of the map size, you start to have precision errors. And if anyone remembers back in the old days of Arena Commander, when we had map sizes, if you got to the edge of the map size, you would probably see some hands shaking because it was having precision errors. But for us, when we say, yeah, no, that is not a skybox, that's a real mountain you can go to. You can. You can only really do that when you're doing those.

Tony ZurovecPersistent Universe Director

Doing things in this way, it inevitably makes the initial parts of the game much more difficult, much more time consuming. You tend to see less up front, and then as you get these pieces in place, you do start to get this exponential...

Chris RobertsCEO and Project Director

It's the systemic stuff. It's like while you're down on the planet and you look in the sniper sight and you can see the space station you flew past. And that is the space station. That's not something we faked in. That is literally the space station in the system map.

Tony ZurovecPersistent Universe Director

But when we build the system map, everything is sitting there. All of a sudden, you can see, it's like, hey, there's a raging battle going on there. And I know, just because I looked up at the sky and I saw it, I run over to my ship and I get up and I go to assist those guys, et cetera, et cetera. And so all of these things start to play off one another when you basically do them to this level of fidelity.

Reverse the Verse›Special Edition·
Published on this date.13 Oct 2016