My Universe

Mens Insana in Corpore Ignavo

Dataref Caching Revisited

2023-09-27 X-Plane

Earlier this year I wrote about caching datarefs. Back then we only looked at caching single datarefs, which quickly leads to bloated code once applied in a wider context. So here we are again, taking a closer look at caching many datarefs efficiently.

What About Trees

“Are we going to leave those poor little Datarefs here in this horrid, dark, dank, tree-infested — I mean… charming, quite charming, forest?”

— unknown dwarf coder

Continue reading

Configuration File with XPPL

2023-09-23 X-Plane

In this blog post we’re looking into using XPPL to enhance a plugin with a configuration file. Working with XPPL’s configuration module is follows this five-step sequence:

  1. initialize a configuration context
  2. register configuration properties
  3. load the configuration file
  4. access the configuration values
  5. clean up

First, we need a configuration context. Since we will need to keep it alive throughout the whole plugin life cycle, we declare it as static, global variable:

Continue reading

Introducing XPPL

2023-09-22 X-Plane

Are you tired of (re-)writing the same boilerplace code for every X-Plane plugin project — over and over again? Well, at least that’s how I felt when I started my fourth or fifth plugin. Sure, I reused a lot of my boilerplate code, but with every project, I refined and enhanced it. Backporting those changes to older plugins became a tedious task though; therefore I started the X-Plane Plugin Library (XPPL).

Continue reading