a drawn signature made of animated wiggling letters that say Harley Denham

Lena

Upcoming — A tiny, handmade game framework in Odin
A screenshot showing a text editor with a simple Odin program using the Lena library. A second square window is the the running game, displaying a small pixel-art koi fish seen from above
Projected release
2024
Role
Design & Implementation
Disciplines
Programming
API

Lena is a small, handmade toolkit for building portable little cross-platform games.

Lena was inspired by constraint-driven game design tools, like Bitsy and the Pico-8 fantasy console. It's also an exercise in tiny library design, aiming to provide the most useful, unobtrusive features in the smallest footprint, without making any decisions about the architecture of your game.

Lena is also a single-import library, designed to be vendored so that its code can be hacked and modified as needed. Lena is for programmers who prefer to work entirely in code and gives complete control to those who want it.

Finally, games made in Lena are not locked in. The framework's API is small enough to be practically impossible to lock in... and I've already made a 'secret' SDL port, so even if Lena somehow dies or breaks, any existing games can be easily compiled against a far larger, massively supported backend.

Your games are yours to distribute as you see fit, without lock-in, proprietary host programs or your players needing to own those programs to participate.

package main

import "lena"

main :: proc() {
    lena.init("Title", 128, 128, .FPS_60)

    for lena.step() {
        lena.clear()
        lena.draw_text("Hello, world!", 10, 10)
    }
}

Philosophy

Where most 'small game engines' are designed to enforce constraint on the designer, Lena eschews this in favour of being more useful for larger projects. Without modification, its graphics are constrained to palettised pixel art sprites, but there are no limits on the scale or number of assets from which a game may be built.

A game may start as the tiniest fantasy console project, but it may grow into as large and sprawling a Game Boy Advance-era RPG as you like.

All Lena projects start with this simple entry point, which can be memorised in a few minutes, and grow to whatever heights you wish.

Programming

Lena is written as a library for the Odin language. It's built from scratch and all of its platforms are natively supported and the whole thing is compact, portable and fast. Lena's only external dependencies are the Odin compiler and a few bits from the Odin standard library.

Odin is a young competitor to C. Of publicly-available modern languages, it 'feels most like' Go, but also takes inspiration from the unreleased Jai. It also side-steps most of the nonsense perpetrated by the Go compiler.

Its direct, native integration with each platform it supports also allows extremely clean operating system handling. Lena doesn't just wrap your game in whatever ugly, unstyled window the operating system gives you by default, it provides proper windowing that behaves correctly for users. It also, depending on the platform, may have some easter egg features — like an era-appropriate Windows 95 mode.

%2

Release

Lena currently runs natively on Windows and Linux, but will not ship until it also supports macOS, which is currently in progress. A WASM port is also intended, but this requires some planned (and not yet delivered) work in the Odin compiler before it can be promised.

Once released, it will be available under the MIT license.