Week 42/2012: Scriptsys incoming

edited 2012 Oct 22 in Developers
Last week I was busy revising the engine's plugin loading mechanism. This is part of the libdeng2 file system work I've been doing in the scriptsys branch. I intend to merge the changes to the master after today's build.

There is a number of important low-level changes incoming from the scriptsys branch:
  • libdeng2 now has scriptsys, containing the Hawthorn scripting kernel. However, this will initially be disconnected from the rest of the engine. The kernel needs some serious tune-up and polishing before it can be put to proper use.
  • libdeng2 now has the de::FS file system, as this is required by the scripting kernel.
  • Plugins are now deployed in a separate directory (bin\plugins on Windows, lib/doomsday-plugins on Unix, DengPlugins inside the Doomsday.app bundle). They were also renamed to remove the name prefixes: the type of plugin is queried using the deng_LibraryType() entrypoint.
  • Plugin libraries are now loaded using libdeng2. The main plugin loader is still in the engine, but it's mostly a C wrapper for the libdeng2 functionality. The library files are located using de::FS, loaded via de::LibraryFile, and accessed using de::Library. None of this is platform-specific code any more. The various platform-specific details are all hidden by de::FS: the plugin binaries can be found under virtual path /bin on every platform.
  • de::App (libdeng2-based application core) now has its own Config class (Haw script based config) and an instance of de::FS. The latter is used for locating the .de config scripts under virtual path /config. This is the foundation for the new script based configuration mechanism. At this point it is still read-only and contains variables that are libdeng2-specific or thus far have been hard-coded; we're relying on the old .cfg files for all actual configuration until the console subsystem gets revamped to run on scriptsys.
  • Internal refactoring: the main libdeng2 console output log buffer (de::LogBuffer) was moved from de::LegacyCore to de::App. All log output is ultimately printed to doomsday.out through this. Certain config variables (number of entries to keep in memory, log file name, log message level) are configured using the config scripts (/config/deng.de). The long-term objective for de::LegacyCore is to disappear completely in favor of de::App -- for the moment de::LegacyCore serves the needs of the 1.9 engine architecture.
  • libdeng2 now has the tests subdirectory, including the "kitchen sink" test script.
I'm waiting after today's build so there's sufficient time to iron out any remaining glitches I've missed before Friday.

Merging scriptsys, de::FS and the revised plugin loader into the master is an important step forward, but it is only the first step of many. I'm looking forward to scrapping the old console subsystem and having a proper interactive script shell. Next on the Roadmap, however, is some work with Snowberry.
Sign In or Register to comment.