Using Polygon without Jai
Last week I mentioned a test: the ability to generate and compile Polygon scenes with C instead of Jai. Polygon is written in Jai, but since Jai isn’t public yet, it prevented extending Polygon. My test was successful, so I’m rolling this out now in today’s release 2.0.66. Here is what this unlocks:
Smaller web exports from Canvas
Polygon Canvas, the edition that needs no coding, could already export scenes for the web. But the export was far too large. It was embarrassing.
Now Canvas can export and build the scene using C, which compiles your scene with only the nodes it needs. This generates a much smaller build.
Native apps from Canvas
This also unlocks native app exports. Just like you can export for the web, you can export for the OS you are running Polygon on: Linux, macOS or Windows. You then get an executable you can distribute as you want.
The SDK in C
If you are prepared to code, the SDK is where the C bindings unlock the most. Today, a C program can load your scene and run it, natively or in the browser. Later, you’ll be able to create your own plugins and nodes, and your own runtime code that runs in any of the hooks Polygon provides (when the scene is loaded, at each frame, etc).
You can already start a project with polygon sdk new --language c (or cpp).
I’ll be honest: it’s still rough around the edges. I tested it against the ring configurator and it works, but expect a few missing pieces and some setup that isn’t as smooth as it should be. If you try it, I’d love to hear where it gets in your way.
As always, tell me what you build, and what is missing. Reply to this email, or say hello in the Discord, Bluesky or Twitter.
Gui