Interview from a grade schooler

One of my wife’s students (a third grader interested in game development) recently “interviewed” me for a report she was writing, and after typing out the responses, I thought they might be of interest to some of my non-developer friends. So… enjoy!

What is the most common language of programming that you use?

Most of X-Plane is written in C and C++. (C++ is very closely related to C—it’s sort of the “next evolution” of C.) We use these because we want X-Plane to be as fast as possible, because the faster it runs, the more detailed we can make the graphics and physics. (It wouldn’t be any fun to fly in X-Plane if it ran so slow that the plane looked like it was in slow motion!)

C and C++ are fast because they are “low-level” languages. That means that the code is closer to what a computer “understands” than it is to a human language like English. Low-level languages, as a rule, are much faster than high-level languages (like Python), which “feel” much more natural to the people that have to read and write them. So, C/C++ are hard for humans to understand and program without bugs, but the resulting code can be much faster than doing the same thing in a high-level language like Python.

Many, many of the game developers I know also use C++ like us, because despite it being more difficult (and taking so much more time to write), in the gaming world, speed is king. No matter what it takes to make the game run faster, people will do it.

Of course, for some code we write, speed really doesn’t matter—it makes no difference to us if that particular piece of code runs 10× slower that it (theoretically) could—and for that, I really prefer Python.

How do you get your ideas to make your video games?

For X-Plane, it’s really easy: our goal is simply to make a simulator that’s as realistic as possible. That means when it comes time to add new features to X-Plane, we do things like:

  • talk to real-world pilots and ask them what they think would make flying in X-Plane more realistic,
  • read academic papers to see what other people have discovered about things like improving game physics or graphics, or
  • simply looking at the simulator ourselves and saying “that doesn’t look quite right, I wonder how we could make it better.”

Sometimes that means simulating something we didn’t before (like fuel trucks that drive around the airport and fill up your plane). Other times it means improving something that we already had—for instance, we recently had one of our artists create clouds that look a lot better.

What is the process to getting a game published?

These days, if you want to publish a computer game, it’s pretty incredibly easy—the hard part is really just creating the game in the first place!

For us, our web site is the number one place people go to get X-Plane. That means to publish a new version, it’s as simple as updating our own web site! This is how most game developers these days get their start: they make a cool new game and put it online.

Eventually, if your game is popular enough, you’ll probably want to get it other places, too. In that case, you can talk to an online game distributor (Steam is the biggest one) about selling your game in their virtual store. The process Steam uses to decide who gets to sell their game on their store is pretty straightforward: They tell Steam users that they’re considering your game, and they have users vote on which games they’ll actually publish. Then, the games that get the most votes each month get to be sold on Steam.

Now, if you want to publish a game on a video game console (like the Playstation or Xbox), it’s much more difficult: not only do you have to pay the game console company for the tools (Sony and Microsoft charge thousands of dollars to get started!), but you also have to write a lot of your game to be specific to that console. (That is, there’s a lot of special Playstation-specific or Xbox-specific code you’ll need to create.) That’s changing slowly—console games are getting closer to using the same code as their PC versions—but it’s a pretty big barrier to entry. That’s why most of the “independent” game developers these days start out creating games for the PC.

How do you make the graphics look so realistic?

Most game developers build their game using a game engine. Two of the most popular engines are Unity and Unreal (a funny name for an engine that is very “real”!). Game engines take care of a ton of the work of making a game look great. In essence, you give the engine your 3-D models (which you might create in a program like Blender), and the engine takes care of the hard part of drawing those models in-game and making them look great. (So, even though there might be 10,000 games out there that use the Unreal engine just like your game, none of them will look the same, because only your game has the special characters/enemies/backgrounds/etc. you made.)

Experienced game developers can built a prototype of a game (a very rough draft of maybe the first couple levels) in just a couple weeks using a game engine—it seriously speeds up development time!

X-Plane is a little weird, in that we do not use an existing engine—we’ve built our own (over the course of many, many years). That means that we’ve had to do the hard work of creating all our graphics code from scratch. We wound up doing a lot of the same work that the people who made Unity and Unreal had to do: we read a bunch of academic papers about how lighting, and shadows, and reflections, and fog, and so on work, and we combined those into a complete drawing solution. Every so often, we’ll find a new paper that gives us new ideas for “tricks” we can do to make things look better, so the drawing gets better all the time.

A lot of the amazing effects you see in games rely on the computer doing an unbelievable number of calculations each second. Reflections are an example of this: to draw the reflection of, say, a building off a body of water, we essentially do calculations that imagine thousands of individual rays of light hitting all the surfaces in the scene, and we calculate how those rays of light “bounce around.” That takes millions of mathematical calculations every second! That’s why speed is so important to us: if the program runs really, really fast, we can do more advanced graphics drawing “tricks” and still be “fast enough.” (If the program were slow from the start, we couldn’t afford to spend time doing those advanced graphics tricks.)

How do you pick the music for your games?

X-Plane is, again, a little weird in this respect. Because we want to be the most realistic simulator possible, we don’t actually have in-game music. What we do have is sounds: the sound of the airplane’s engines, the sound of each individual button and switch in the instrument panel, the sound of the landing gear hitting pavement, and so on. We get those sounds from one of two places: either we find a person online who went out and recorded the sounds already (this is the “best” case, because it means we can buy the sounds and get them instantly!), or we have to go out to the real plane and record the sounds. (While this is less efficient for us, it’s certainly cool!)

When we record the sounds used in X-Plane, we basically set up a bunch of microphones all around the plane (in the cockpit, near the wings, near the engine, etc.) and we slowly go through all the functions of the plane: we press all the buttons, we go through the engine starting sequence, etc. Later, in our sound editing program, we can link those sounds to things that might happen in your simulated airplane—we say “when you press the landing gear button, in addition to making the gear go down, we need to also play the clunk sound of the button being pressed, followed by the whrrrrrr of the gear extending.”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s