Friday, December 30, 2005

Sceney Loading in X-Plane 830

Scenery loading has changed a lot in 8.30. Before 8.30 we loaded 6 scenery tiles (DSFs or ENVs) and completely built them up into memory before we let you fly. We then loaded any new texures while flying. The result is a possible hit on framerate right after a scenery load for textures, and a very long pause while the scenery area gets built.

In 8.30 we now read the full DSF and build the terrain, then start the sim running. We then build the local 3-d "clutter" (objects and roads) while you fly, but we only build up the ones near your plane. As you fly, the ones behind you are destroyed and new ones in front of you are built.

This means a few things:
- Shorter scenery pauses, because we have to do less before we can start the sim.
- Lower framerates right after a load because the sim is doing extra work while you fly to finish the load.
- Lower framerates occaisionally while you fly as a few more roads are built and objects destroyed. This is pretty minimal though because these items come into range gradually.
- Lower memory usage, since only the roads nearby are fully built, not all of them.

This strategy works out particularly well for people with dual-processor or dual-core machines; some of the work to do this "clutter-building" is done on the second CPU while you fly, so the framerate hit is a lot less noticable. Basically we are taking work that was done by the main CPU while you waited and doing it on the second CPU while you fly.

One problem still in 830: when you place the plane, we do not pre-build the roads (but we DO pre-load the textures). If we did not preload the textures, you would be placed in a gray area and see the textures come in. So hopefully in a later beta I will preload the roads if you place the plane using the airport-picking dialog box. This should help provide good framerates as soon as your plane is placed.

No comments: