Will there be a PDK for WM4?

I’m thinking of trying/looking at some plugin development for WM, but saw the latest PDK is for build 3028. I was wondering if releasing a PDK is on the roadmap, and if there are other users who would like to take a look at developing their own plugins.

4 Likes

Seconded! I was just thinking about this the other day!

Here’s a “feature upvote” link for python scripting support. I think it’ll make more sense than older kind of PDK, should work better across version updates.

https://worldmachine.featureupvote.com/suggestions/194710/python-scripting-support

The PDK for WM 4xxx builds is available for company internal use.

For more broadly available plugins, direct access to WM’s internal systems proved to be a headache. Any plugin would rapidly fall out of date and need to be recompiled to keep up with each new release; This inevitably meant that either you wouldn’t have the cool plugin if you upgraded, or you wouldn’t upgrade because of the plugin, and neither is ideal.

I am very interested in making it much easier to develop custom devices. There are essentially two options:

  1. Formalize a C communication API that decouples the WM C++ app internals from the plugin internals. This would allow you to write the plugin in basically any language, as pretty much everything can talk C ABI.

  2. Allow higher-level plugins via a runtime language (Python, etc).

I’m leaning towards #2 right now as it opens up custom device development to many more people as you could create your custom device right within WM itself, making for a convenient development environment.

The other benefit of #2 is that the plugin can be sandboxed, making it much more suitable for sharing across the internets.

3 Likes

Would a Python device be able to have the same level of performance and optimisation as a device written in C++?

The C API sounds like it gives a lot more freedom, but I agree that it would not be as easy to use as just “plugging in some Python”. I would probably try to write a plugin in Haskell for example if the C API were chosen.

I think it’d be best to first implement the higher-level plugins route, and later exposing the C API. Either way, I’m really looking forward to hacking about World Machine.

On the topic of user customisation, will there be support for:

  • Custom themes/layouts
  • Community governed language packs (probably in a YAML or JSON format?)

To be honest, no. That’s definitely not Python’s strength, even if numpy is included. A device trying to do actual per-pixel work would be 1-2 orders of magnitude too slow. I have some exciting ideas on this front but I don’t want to talk about them yet in case it proves impractical. :slight_smile:

In terms of customization possibilities, LTE was built with language packs in mind from the ground up, so that is both possible and more or less ready to go, modulo actually having translations available.

Design customization is indeterminate at this time.

3 Likes

Hey Stephen, any developments on this? I’d love to write my own custom devices