<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts on Karl Zylinski</title><link>https://zylinski.se/posts/</link><description>Recent content in Posts on Karl Zylinski</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 20 Feb 2026 22:04:00 +0200</lastBuildDate><atom:link href="https://zylinski.se/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Audio in Karl2D: Software mixing, OS APIs and general design</title><link>https://zylinski.se/posts/audio-in-karl2d-software-mixing/</link><pubDate>Fri, 20 Feb 2026 22:04:00 +0200</pubDate><guid>https://zylinski.se/posts/audio-in-karl2d-software-mixing/</guid><description>As I&amp;rsquo;ve been making my own game creation library Karl2D I&amp;rsquo;ve noticed something about audio: While many people are fine with writing their own rendering, they still go for some library when implementing sound. For example, you might end up using the library miniaudio.
I decided to try to implement my own audio in Karl2D, and so far I&amp;rsquo;d say it has been easier and more straight-forward than rendering. It has also been quite fun!</description></item><item><title>Iterating strings and manually decoding UTF-8</title><link>https://zylinski.se/posts/iterating-strings-and-manually-decoding-utf8/</link><pubDate>Tue, 23 Sep 2025 09:29:00 +0200</pubDate><guid>https://zylinski.se/posts/iterating-strings-and-manually-decoding-utf8/</guid><description>This post is an adapted excerpt from Understanding the Odin Programming Language &amp;ndash; the acclaimed eBook on learning Odin and understanding low-level concepts. Visit https://odinbook.com for more information.
Text strings in Odin use Unicode. Unicode is a standard that makes it possible to use characters from most languages. You can mix different languages within the same string, and even use exotic things such as emojis!
Odin has two primary types for representing text: string and cstring.</description></item><item><title>Know why you don't like OOP</title><link>https://zylinski.se/posts/know-why-you-dont-like-oop/</link><pubDate>Tue, 26 Aug 2025 22:15:00 +0200</pubDate><guid>https://zylinski.se/posts/know-why-you-dont-like-oop/</guid><description>Programmers tend to fight about why Object-Oriented Programming (OOP) is good or bad.
Among the anti-OOP crowd, I often see junior programmers hate on OOP and &amp;ldquo;rebroadcast&amp;rdquo; what they&amp;rsquo;ve heard experienced programmers say. But when challenged to explain why OOP is bad, they have a hard time explaining it. It&amp;rsquo;s usually because they haven&amp;rsquo;t really experienced those things first hand.
I&amp;rsquo;d like to take a positive spin on this and say: Just write your code in a way that makes sense to you.</description></item><item><title>Understand the Temporary Allocator; Understand arenas</title><link>https://zylinski.se/posts/temporary-allocator-your-first-arena/</link><pubDate>Mon, 25 Aug 2025 20:45:00 +0200</pubDate><guid>https://zylinski.se/posts/temporary-allocator-your-first-arena/</guid><description>Odin is a manually memory managed language. Beginners of such languages are often afraid of memory leaks, meaning that you forget to deallocate memory.
The first remedy for this is to use the tracking allocator. It will warn you about memory you forgot to deallocate. Nifty!
But you can also think along these lines: Can I simplify things a bit, so I don&amp;rsquo;t have to think about the deallocation?
What you can do is to try to use the temporary allocator whenever possible.</description></item><item><title>Odin: A programming language made for me</title><link>https://zylinski.se/posts/a-programming-language-for-me/</link><pubDate>Mon, 12 May 2025 13:04:00 +0200</pubDate><guid>https://zylinski.se/posts/a-programming-language-for-me/</guid><description>In my book Understanding the Odin Programming Language I wrote that &amp;ldquo;Odin incorporates some of my favorite C best practices, straight into the language&amp;rdquo;. But I didn&amp;rsquo;t really elaborate on the details. Let&amp;rsquo;s do that here!
This brings me to talking a bit about a previous job I had. Back in 2021 I worked at a place called Our Machinery. We were creating a whole game engine in plain C. We used a very comfortable and powerful way to program C.</description></item><item><title>No-engine gamedev using Odin + Raylib</title><link>https://zylinski.se/posts/no-engine-gamedev-using-odin-and-raylib/</link><pubDate>Mon, 28 Apr 2025 13:04:00 +0200</pubDate><guid>https://zylinski.se/posts/no-engine-gamedev-using-odin-and-raylib/</guid><description>Games can be made in many different ways. Many games are made using big, general purpose game engines such as Unity and Godot. I enjoy using the Odin Programming Language combined with Raylib.
Odin is a C-like programming language and Raylib is library for drawing graphics, checking input and playing sounds. So it&amp;rsquo;s just a program that uses a simple library, no engine!
There are no objectively best ways to create games.</description></item><item><title>Handle-based maps: Three implementations</title><link>https://zylinski.se/posts/handle-based-maps-three-implementations/</link><pubDate>Thu, 10 Apr 2025 16:43:00 +0200</pubDate><guid>https://zylinski.se/posts/handle-based-maps-three-implementations/</guid><description>In my post &amp;ldquo;Handles are the better pointers&amp;rdquo;: 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 &amp;ldquo;handle-based array&amp;rdquo;, I&amp;rsquo;ve since then switched to saying &amp;ldquo;handle-based map&amp;rdquo;.</description></item><item><title>Mistakes and cool things to do with arena allocators</title><link>https://zylinski.se/posts/dynamic-arrays-and-arenas/</link><pubDate>Fri, 04 Apr 2025 12:29:00 +0200</pubDate><guid>https://zylinski.se/posts/dynamic-arrays-and-arenas/</guid><description>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&amp;rsquo;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&amp;rsquo;s an arena? How does it work? Arenas and arena allocators are useful for grouping allocations that have the same lifetime.</description></item><item><title>Generate Odin bindings for C libraries</title><link>https://zylinski.se/posts/generate-odin-bindings-for-c-libraries/</link><pubDate>Wed, 02 Apr 2025 19:30:00 +0100</pubDate><guid>https://zylinski.se/posts/generate-odin-bindings-for-c-libraries/</guid><description>I&amp;rsquo;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&amp;rsquo;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 &amp;ldquo;binding&amp;rdquo;: It glues the world of Odin together with that of the C library.</description></item><item><title>"Handles are the better pointers": An Odin gamedev follow-up</title><link>https://zylinski.se/posts/handle-based-arrays/</link><pubDate>Tue, 25 Mar 2025 12:59:00 +0100</pubDate><guid>https://zylinski.se/posts/handle-based-arrays/</guid><description>Background Andre Weissflog wrote an article in 2018 called &amp;ldquo;Handles are the better pointers&amp;rdquo;. 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&amp;rsquo;ll look at an implementation in Odin and discuss it.
I use the Odin Programming Language and the examples are game development-centric.</description></item><item><title>Writing 'Understanding the Odin Programming Language'</title><link>https://zylinski.se/posts/writing-a-book-about-odin/</link><pubDate>Tue, 21 Jan 2025 16:28:00 +0100</pubDate><guid>https://zylinski.se/posts/writing-a-book-about-odin/</guid><description>In this post I&amp;rsquo;ll share some details on how I wrote the first book about the Odin Programming Language. I&amp;rsquo;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 &amp;ldquo;Understanding the Odin Programming&amp;rdquo; language. It&amp;rsquo;s a digital book (HTML and EPUB). It was released on December 6, 2024. The book is available at https://odinbook.</description></item><item><title>Data-oriented ideas for small gamedev teams</title><link>https://zylinski.se/posts/data-oriented-ideas-for-small-gamedev-teams/</link><pubDate>Thu, 15 Aug 2024 20:45:45 +0200</pubDate><guid>https://zylinski.se/posts/data-oriented-ideas-for-small-gamedev-teams/</guid><description>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&amp;rsquo;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&amp;rsquo;s try to keep it simple.</description></item><item><title>Introduction to the Odin Programming Language</title><link>https://zylinski.se/posts/introduction-to-odin/</link><pubDate>Fri, 07 Jun 2024 21:16:00 +0200</pubDate><guid>https://zylinski.se/posts/introduction-to-odin/</guid><description>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.</description></item><item><title>Solodevs and the trap of the game engine</title><link>https://zylinski.se/posts/solodevs-and-the-trap-of-the-game-engine/</link><pubDate>Thu, 23 May 2024 00:00:00 +0000</pubDate><guid>https://zylinski.se/posts/solodevs-and-the-trap-of-the-game-engine/</guid><description>Since I was 19 I&amp;rsquo;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&amp;rsquo;m 35 and just released my own game (see trailer below). I&amp;rsquo;ve made everything in it myself.</description></item><item><title>Make games using Odin and Raylib #3: An animated player</title><link>https://zylinski.se/posts/gamedev-for-beginners-using-odin-and-raylib-3/</link><pubDate>Tue, 20 Feb 2024 00:00:00 +0000</pubDate><guid>https://zylinski.se/posts/gamedev-for-beginners-using-odin-and-raylib-3/</guid><description>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&amp;rsquo;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 &amp;ldquo;Full code + what changed in this section&amp;rdquo; expandable item.</description></item><item><title>Make games using Odin and Raylib #2: A controllable player</title><link>https://zylinski.se/posts/gamedev-for-beginners-using-odin-and-raylib-2/</link><pubDate>Sun, 11 Feb 2024 15:47:11 +0200</pubDate><guid>https://zylinski.se/posts/gamedev-for-beginners-using-odin-and-raylib-2/</guid><description>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&amp;rsquo;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:</description></item><item><title>Make games using Odin and Raylib #1: Setup + First Program</title><link>https://zylinski.se/posts/gamedev-for-beginners-using-odin-and-raylib-1/</link><pubDate>Fri, 09 Feb 2024 15:47:11 +0200</pubDate><guid>https://zylinski.se/posts/gamedev-for-beginners-using-odin-and-raylib-1/</guid><description>Hello and welcome to the first post in this blog series on making games using Odin and Raylib. Throughout this series we will create a small 2D game with simple platforming mechanics. When we are done you&amp;rsquo;ll be able to extend the game, or take the knowledge you&amp;rsquo;ve learnt and make other, more complex games!
This series is aimed at people with little to no programming experience. Being a bit technical and having an interest in games will help.</description></item><item><title>Hot Reload Gameplay Code: What, why, limitations and examples!</title><link>https://zylinski.se/posts/hot-reload-gameplay-code/</link><pubDate>Fri, 15 Sep 2023 15:47:11 +0200</pubDate><guid>https://zylinski.se/posts/hot-reload-gameplay-code/</guid><description>This post is about what hot reload for gameplay code is, why you would use it and what the limitations are. I&amp;rsquo;ll also present an example implementation in Odin Programming Language. The final section is on some caveats, improvements and how to use hot reload in Odin together with Raylib. The front parts are language agnostic while the further down you read the more Odin specific it gets.
The methods I will outline here are for people who are writing their own game &amp;lsquo;from scratch&amp;rsquo;, meaning you don&amp;rsquo;t use any game engine.</description></item></channel></rss>