I think I forgot to blog this when it happened, but: a few weeks ago Chris shipped a free update to X-Plane 10 Mobile, completing an odyssey that has been going on behind the scenes for a few months now: X-Plane 10 mobile runs the complete desktop flight model from X-Plane 10 global. We now have one flight model to rule them all.

This is big for X-Plane 10 mobile not only because it brings a lot of additional detail to the flight model, but because it makes it possible to implement new features a lot more easily, since the complete simulator is backing these features.

How did we get here? X-Plane for the iPhone started when Austin and I ported X-Plane 9 to the original iPhone. We had a working prototype in two weeks and a shipping product in four (after which we, like, slept).

We were able to do this so quickly because the original iPhone was such a tiny device. The final program used between 28 and 30 MB of RAM total for everything. That’s all the code, all of the scenery data, all of the flight model data, all of the 3-d objects, and even all of the textures! By comparison, X-Plane 10’s startup screen is 16 MB.

Because our RAM budget was so insanely tight, we produced the product by starting with a blank slate on iPhone and X-Plane 9, and we moved only what absolutely had to be moved over to mobile. So instead of taking the whole flight model and then cutting fat, Austin copied in only what he absolutely had to have for those first few planes.

The technique worked – by keeping such tight control over what made it in, we kept our RAM budget down. But it also meant that the resulting code was pretty different from X-Plane – it was like someone took a book, cut out a bunch of words and taped them together into a short story.

Mobile devices are a lot more powerful than they used to be – at this point the top-end mobile devices are just about on par with the bottom end of desktop hardware. X-Plane 10 Mobile took a lot of technology from X-Plane 10 Global, and for the first time started giving back technology to the desktop as well.

Since the products have started sharing common code, we decided to try to re-unify the flight model (by bringing the desktop flight model as a whole to mobile); this makes it easier to move things around and saves us development time. With this process now complete, Chris will be able to move faster in developing mobile features, and we’ll be able to use more of his code.

(I like mobile as a test lab for the desktop version of X-Plane.  Since the product is closed, we can rapidly prototype systems without compatibility concerns; when we’re done we can take the system to the desktop and the code will be blazingly fast because it was tight enough to run on mobile devices.)

As an example of code movement between the two products: X-Plane 10 mobile’s user interface started its life as…the panel editor in Plane-Maker! When I rewrote the panel editor (in X-Plane 8) I wrote a quick & dirty OpenGL UI toolkit to get some of the features that Plane-Maker didn’t already have.

Chris took that code to mobile and built it out into a complete user interface solution, with a richer set of classes, DPI independence, gesture support, performance optimization, and real font support.

That code is coming back to desktop, giving us things like DPI independence (4K monitor users know why this is important), beautiful typography, and the right tools to make a really great looking user interface. It’s nice to loan a piece of code to mobile and get the same code back only better. I think flight model sharing will provide similar benefits.

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.

7 comments on “One Flightmodel to Rule Them All

  1. Sounds great! If both platforms will profit from that I’m happy.

    BTW, I believe you have a typo in the first paragraph: “X-Plane 10 mobile runs the complete desktop flight model from X-Plane 10 mobile” [So X-Plane mobile runs the flight model from the mobile version. Oh wow, impressive 🙂 ]

  2. Hi Ben,

    Some irrelevant questions.

    Will a new meshtool be released where one could have forests baked within the mesh ?

    Will weather be upgraded ?

    Rgds.

    Rgds.

  3. I can’t see the papi lights. I use samsung s4. Please help me. And please make all the buttons on the side of the screen invisible and only appear when I touch the screen. Thx

Comments are closed.