stil — essentialist game engine

Hello y’all. After months of introspection on my game creation process — that I chose to omit here, but please indicate if you find the meta stuff interesting — I decided to go a very radical route and design a very light game engine.

stil — git repository

It encourages linear game programming instead of loop-based programming, very fast iteration process and simplistic aesthetics. The goal is both to use this for prototypes and “finished products”.

The name is a homage to De Stijl. The tech stack is Zig stable, SDL.zig and Ziglua for Luau scripting. The resulting statically linked binary for Windows 2.9 Mo, with the possibility to embed the game script. The API is inspired by my past experience prototyping games in Basic Casio. License tbd, will probably be MIT.

Here’s a sample project — a box cursor moving around, placing and removing eXes.

x, y = 2, 1

resize(8 * 2 + 1, 8) -- sets display dimensions, in chars

while true do
	locate(x - 1, y, "[")
	locate(x + 1, y, "]")
	local k = getkey() -- refresh the screen and wait for input
	locate(x - 1, y, " ")
	locate(x + 1, y, " ")

	--movement
	    if k == 4  then x -= 2
	elseif k == 7  then x += 2
	elseif k == 26 then y -= 1
	elseif k == 22 then y += 1
	elseif k == 44 then locate(x, y, peek(x, y) == "x" and " " or "x")
	end

	--limit to screen
	x = math.clamp(x, 2, dwidth - 1)
	y = math.clamp(y, 1, dheight)
end

And a screenshot.
2025-04-25_01-04-1745537301