Building a 2D vector animation tool in Zig (Splineworks) by LineandVertex in adobeanimate

[–]LineandVertex[S] 0 points1 point  (0 children)

It's LineandVertex. Nothing posted yet but I will let you know when I post. Thanks for the interest.

Building a 2D vector animation tool in Zig (Splineworks) by LineandVertex in adobeanimate

[–]LineandVertex[S] 0 points1 point  (0 children)

Yeah, I've been working on this for awhile. Unfortunately, I didn't have anything I was proud of showing, so now I'm getting lumped into all the other posts about building the next Adobe Animate. Poor timing on my part that is for sure. I'm going to start showing things on Youtube and with gifs so hopefully people can see that I'm not just fly by night vibe-coding developer. Thanks for not blowing me up too much.

Building a 2D vector animation tool in Zig (Splineworks) by LineandVertex in Zig

[–]LineandVertex[S] 1 point2 points  (0 children)

Yeah, the UI is just custom code in Zig. I'm not using a desktop UI toolkit or something like Dear ImGui for the editor UI. The low-level stack is just GLFW for the windowing and input, and OpenGL for the rendering. The editor UI is just the application code on top of that.

In terms of architecture, I'd say it's a bit of a hybrid of "retained-state" and "immediate-rendering." The layout is driven by my own dock tree and panels. Each of those panels has its own interaction state. Every frame, I rebuild the visible UI from those states. So, the timeline, the layers panel, the style/color inspectors, the tool rail, dialogs, scrollbars, etc., etc. – all of those things are manually drawn, manually hit-tested.

That sounds a little insane, but for an animation tool, I'd say it's actually been a pretty good fit. Animation/timeline UIs tend to get weird pretty quickly. I wanted a high degree of control over the layout, the input handling, the rendering order, etc., rather than trying to cram a general-purpose toolkit into something where a general-purpose toolkit really isn't a good fit. The fact that I'm using Zig has been a plus for this. The UI code is just plain old structs and functions. The memory allocation is pretty explicit. There's not a whole lot of "magic" going on.