Openhood

Openhood Experiments

Let's share our tech experiments and discoveries.
By Openhood
odin gamedev tools Estimated reading time:

Building a sprite atlas cli in Odin

Let's build a small sprite atlas CLI in Odin and use it to compare six rectangle-packing algorithms on the same folder of PNGs. Given loose sprites and a width limit, the tool packs them into one RGBA8 texture and writes each sprite's name and rectangle as JSON or a Godot 4 SpriteFrames resource.

Odin fits this kind of data-oriented tool well: the packers operate on plain slices of sizes and rectangles, and we only touch pixel buffers once every sprite has coordinates. Odin's core library covers the rest without third-party packages: core:flags parses command-line flags, core:image/png decodes and encodes PNGs, and core:encoding/json serializes the layout struct.

Install Odin (installation instructions) and check your setup with odin version. Every example below targets dev-2026-11a.

Read more

Read more: Building a sprite atlas cli in Odin
By Openhood
elixir phoenix docker gitlab ci Estimated reading time:

Speed up Docker-in-Docker jobs in GitLab CI

A one-line edit to a Phoenix template shouldn't send CI back through mix deps.compile. Our Docker-in-Docker (DinD) jobs start with a fresh Docker daemon, so we keep the build cache in GitLab's Container Registry. The Dockerfile here is for Elixir/Phoenix. The GitLab job works the same way for any image you build with Buildx in DinD.

Read more

Read more: Speed up Docker-in-Docker jobs in GitLab CI
By Openhood
ruby bundler dev til Estimated reading time:

bundler/inline for single-file ruby scripts

Sometimes you want to create a single ruby script using exact versions of some gems, but you don't want to have to create a directory just to have a Gemfile and your script file in it, then have to do the bundle install/bundle exec dance to run it properly.

Read more

Read more: bundler/inline for single-file ruby scripts
By Openhood
nginx sysadmin Estimated reading time:

NGinx Useful Tips

During an epic debugging session with an NGinx configuration for a project, I discovered some useful, but not so common (at least to me) configuration.

Read more

Read more: NGinx Useful Tips