Lessons from InterfaceAPI


InterfaceAPI is getting a C# port. What's so big about C# when the work in Odin is already a work-in-progress, and works really well?

Shift in Thinking

Most of the work involving Odin is very impacting, but there has been a lesson to learn about its' development. It is currently using Raylib as its rendering backend, which is great -- there's nothing wrong with it -- except there are some things you need to do manually which require the extra effort. Text rendering is somewhat inconsistent. Some text is rendered against back buffers, others direct to screen. This causes a slight issue if you're not careful about texture filtering.

It's easily missed; setting texture filtering to POINT to ensure crisp text (Raylib's default is BILINEAR), without which would cause text to blur slightly and wasn't noticed until much later in development. The font glyphs are already rasterized using FreeType into a texture atlas, but it's a lot of extra work.

Add on top the glyph shaping work and ensuring width values match the width of rendered characters despite all the features Harfbuzz gives to support this process is still time consuming, and the fine tuning required to ensure consistency is challenging.

Most of the InterfaceAPI library is AI generated. Some of the initial concepts were hand-written, then it was handed off to AI to prompt, design, plan and implement the various features it has today.

It is a fairly complete UI library and contains perhaps the most UI widgets of a free, open source library anywhere written in Odin. Because of the substantial library, it becomes difficult to consider switching to another language for the sake of it, so why change?

Read more on desinda.dev.

Get InterfaceAPI

Leave a comment

Log in with itch.io to leave a comment.