Work and World

Why Video Games Are Made Of Tiny Triangles

This is me in Red Dead Redemption 2. It’s an action-adventure game with over
60 hours of stunning gameplay. I’m about to brush this horse, and you’re
going to see the dust fly off. Games today are meticulously detailed. They’re mysterious and heartwarming, and
colorful and stylized. And inside every one of these games — Fortnite,
PUBG, Rocket League — you’ll find… these. Put thousands, sometimes millions, of these tiny
triangles together and you can make a person…
or a car… or an entire world. But you never see them. So… why triangles? Take another look at this game. Technically, what you’re seeing is all squares. Your screen is divided into pixels, and each
pixel can display exactly one color. That’s been true since the earliest video
games. Like Pong. “It was just squares, right, so it was just like a pile
of squares to make two paddles and one square that was the ball. And the fact that I could move something and it moved, was like super beautiful.” That’s Brett Bibby. He grew up playing Pong — and now he leads
the engineering team at Unity, one of the top game engines in the world. A game engine basically gives you the tools
you need to build elaborate environments. “Let’s imagine you wanted to make a wild
west game and you wanted to ride into town and have a shoot-out. So you might start off just creating some boxes,
to represent the saloon, the bank and other things. The main road. And it would just be all white. You would just try to get a sense of size
and scale.” “Kind of like Legos, right. Just trying to get a sense of the space. And so I’m iterating and developing it slowly.” And when you’re done, the detailed game that you
made needs to show up as pixels on a players’ screen. That process is rendering. And the player’s computer is going to have
to do a ton of math to follow through. In the last 20 years, the amount we can show
on screen per second has gone up — way, way up. This is a standard measure of computing power. It tells you the number of calculations the
machine can perform per second. … in billions. You’d think that a more powerful computer
would make it easier to render games. And it does. Except that gamemakers keep competing to add
more and more detail, pushing the limits of what even the newest technology can do. So the game engine’s job is partly to keep
the number of computations needed for each detail as low as possible, so that gamemakers can
fit more in. Which brings us back to these guys. Triangles are used almost exclusively in rendering
for video games. They’re a way for a game engine to batch
pixels, allowing the player’s computer to process more detail. From the computer’s point of view, everything
in your game really looks like… This. The game engine creates sets of instructions
that the computer translates into pixels on your screen. This “V” means these are coordinates for
vertices — the corners of some kind of shape. Imagine playing connect the dots. You’d use straight lines, right? Especially if you didn’t know what shape
you’re making yet. The player’s computer is playing three dimensional
connect the dots, sometimes thousands of times every second. For them, the equivalent of straight lines
is flat surfaces. Flat surfaces are the easiest to render because
they don’t require a computer to do any additional math to figure out curves or dents. So the game engine needs to convert curved
surfaces into flat ones for the player’s computer to process. And it turns out, the best way to do that
is through triangles. Try picking out three dots in the air in front
of you. No matter where you choose to put them, they’ll
always be on the same plane. York: “The surface of the triangle is always
flat.” And no other shape with vertices is like that. York: “If you have four points, then those
four points could actually describe a very complex object —” “Four points can describe a pyramid for
example.” “That results in a more mathematically complex,
higher processing power ask just to figure out the pixels on the surface.” So triangles it is. Triangles and the ongoing improvements in
game technology make it easier for creators to develop the beautiful games that exist today. “So in the old days it was like, well this
is what I can do: I can have a fixed screen with 8 things moving on it.” “I think nowadays, pretty much whatever you want to create, you could find a way to create.” If you’d like to learn more about how to make videogames, you should click the link and head on over to Skillshare. Their massive library of over 20,000 classes on design, business, and technology, also includes a bunch on how to make videogames. Including my favorite, which is all about how to make that classic snake game. They have a premium membership too, which can offer unlimited classes on how to improve your gamemaking skills. Or whatever else you’re excited about. And because you’re a Vox fan, they’ll give you two months of Skillshare for free. To sign up, just click the link in the description and the first 500 of you will get two months of unlimited classes, no charge. Skillshare doesn’t directly impact our editorial at all. But their support helps make videos like this one possible. So go check them out.
Video source: https://www.youtube.com/watch?v=U93RImC-by4

Related Articles

Back to top button