Hi! I'm a game developer and programming educator. I've made these things:

Understanding the Odin Programming Language

Do you want to learn Odin and demystify low-level programming? Then this book is for you!

CAT & ONION

A short cat adventure packed with curious characters, strange environments and good vibes!

Latest Newsletter

Blog


Handle-based maps: Three implementations

In my post “Handles are the better pointers”: An Odin gamedev follow-up I talked about how one can implement a handle-based map in Odin. In this post I want to follow that up by talking about three specific variants of a handle-based map, and highlight what sets them apart. The three variants are available in this repository: https://github.com/karl-zylinski/odin-handle-map NOTE: In the old post I used the term “handle-based array”, I’ve since then switched to saying “handle-based map”....

April 10, 2025

Mistakes and cool things to do with arena allocators

When programming in Odin you can use arena allocators. If you use an arena allocator combined with a dynamic array, then there are a couple of pitfalls that may not be apparent at first. Let’s look at what arenas are, how you can run into trouble when naively using them with dynamic arrays and what you can do instead. What’s an arena? How does it work? Arenas and arena allocators are useful for grouping allocations that have the same lifetime....

April 4, 2025

Generate Odin bindings for C libraries

I’ve written a binding generator for Odin. You can check it out here: https://github.com/karl-zylinski/odin-c-bindgen In this blog post we’ll look at what it is and how to use it. What is it? This binding generator takes header files from C libraries and outputs Odin code. This Odin code can then be used to interface with the library. This code is known as “binding”: It glues the world of Odin together with that of the C library....

April 2, 2025

"Handles are the better pointers": An Odin gamedev follow-up

Background Andre Weissflog wrote an article in 2018 called “Handles are the better pointers”. In it he talks about how one can use handles instead of pointers when one wants to store permanent references to elements in an array. I think there are many nuances regarding handles that only become apparent after some real-world usage. Here we’ll look at an implementation in Odin and discuss it. I use the Odin Programming Language and the examples are game development-centric....

March 25, 2025

Writing 'Understanding the Odin Programming Language'

In this post I’ll share some details on how I wrote the first book about the Odin Programming Language. I’ll talk about how I got started, what the process was like, as well as some technical things related to writing programming books. The book is called “Understanding the Odin Programming” language. It’s a digital book (HTML and EPUB). It was released on December 6, 2024. The book is available at https://odinbook....

January 21, 2025

Data-oriented ideas for small gamedev teams

If you are a game developer then you might have heard about data-oriented design. You might have read that programming in a data-oriented way can make your game run faster. However, if you come from some object oriented approach then the ideas you’ve seen can feel a bit overwhelming. It may seem like you need to completely redo all your gameplay code. Where do you even start? So let’s try to keep it simple....

August 15, 2024

Introduction to the Odin Programming Language

Preface NOTE: I have created a whole book, loosely based on this article! You can read more about it at odinbook.com. For comparison: This article contains 12400 words, the book contains 76000 words. This article is an introduction to the Odin Programming Language. It is aimed at people who know a bit of programming, but have never touched Odin. It is not a reference guide, rather I try to keep things informal and talk about what I think are important aspects of the language....

June 7, 2024

Solodevs and the trap of the game engine

Since I was 19 I’ve wanted to make my own video games, as in creating everything in the game myself, often referred to as being a solo developer, or solodev. But I was bad at committing to anything and I always thought that I lacked some specific skill such as music making, game design skills and art skills. Now I’m 35 and just released my own game (see trailer below). I’ve made everything in it myself....

May 23, 2024

Make games using Odin and Raylib #3: An animated player

Today we will make our game look less dull by adding a run animation to the player character. We will download an image containing an animation, draw it in game and then make the animation play properly. A theme throughout today’s post is that we will try the different procs for drawing graphics on the screen that Raylib provides, and see how they can be used in different circumstances. A new thing in this post is that each section ends with a “Full code + what changed in this section” expandable item....

February 20, 2024

Make games using Odin and Raylib #2: A controllable player

In this second post about making games using Odin and Raylib we shall look at how to add a simple player character and make it moveable. We will first introduce some simple left to right movement, and after that add gravity and the ability to jump. Here’s the companion video for this post. If you get confused by this post, then chances are that the companion video can help you understand:...

February 11, 2024