Karl Zylinski

Karl Zylinski

@zylinski.se

Wrote the eBook "Understanding the Odin Programming Language". Made the game "CAT & ONION". Check out what I'm up to these days: https://zylinski.se

1.2K followers195 following408 posts

Karl2D beta 4 is here: github.com/karl-zylinsk... This is the first release in 178 days, which is why it is so massive. Highlights: - Audio thread - Better audio API - New dynamic font system - Hardware cursors - Touch (on web) - Text input (get typed runes) - And much more!

github.comRelease Beta 4 · karl-zylinski/karl2d178 days, almost half a year, has passed since the previous release of Karl2D! The previous release was done just before the Karl2D Gamejam. A HUGE thanks to everyone who participated in the jam! T...

One of the last few things before Karl2D Beta 4 is to take a last look at the general audio API design. The new design still makes it easy to play "fire and forget" sounds. But the Audio Stream API is nicer and has no "Sound" object for playing streams github.com/karl-zylinsk...

github.comAudio API redesign, again by karl-zylinski · Pull Request #309 · karl-zylinski/karl2dFixes #304 and fixes #261 What changed? play_audio_clip is now only fire-and-forget. It does not return any Sound Audio Streams keep their own playback state. They have no connection to any Sound....

One of the last things before Karl2D hits beta 4 is Monitor Queries: Being able to check the size etc of monitors. This was trickier than I thought because it must work before any window is open. I had to restructure some platform code in a previous PR. github.com/karl-zylinsk...

github.comMonitor Queries by karl-zylinski · Pull Request #305 · karl-zylinski/karl2dFixes #6 and #187 Because I recently made it so that the state struct is explicitly passed to the platform API, we can now have get_monitors that does not depend on k2.init having been run.

My friend @kflo.bsky.social made the music and sound for Silver Pines!!

Remedy Entertainment@remedygames.com

Go back to where it all began and shine a light on the mysteries of Bright Falls in Alan Wake. Uncover the horrors of Silver Pines, a town somewhere on the edge of a nightmare and the waking world. Get the Silver Pines + Alan Wake Steam Bundle now: https://ow.ly/yR3z50ZVL20 #AlanWake #SilverPines

Karl Zylinski reposted

Been awhile. Creating has been hard lately. Currently experimenting with combining pen and paper with digital painting. Also, perhaps im just stubborn, but I actually erase backgrounds manually. Magic background deletion always cuts things weirdly to me. There's prolly a better way to do this 😅

Render backends now take an explicit state pointer: github.com/karl-zylinsk... Next up: Platform interfaces. At that point I will also add monitor queries. The monitor queries will not need any state pointer, so they can be used before window creation.

github.comRender backend explicit state passing (#300) · karl-zylinski/karl2d@6941bd1Just like the audio backends, the render backends now take explicit state parameters. There was some things that had to be changed to make this look OK. For example, the ch proc in d3d11 backend wa...

When you buy the HTML version, you get the whole book as a single HTML file. All fonts, images etc are embedded in it. It's self-contained like a PDF, but reads nicer on a computer.

I'm thinking of doing videos on how to do technical writing. If there is any topic or question anyone wonders about, then do let me know! It can be about anything related to writing technical books or technical blog posts.

More Karl2D audio backend interface tweaking... I learned that `using` works even when implicitly casting proc parameter types. This simplified creating interfaces that take a "self" parameter. Handy in my case, because I switch impl on failure: github.com/karl-zylinsk...

github.comPass state explicitly to audio backends by karl-zylinski · Pull Request #296 · karl-zylinski/karl2dPass state explicitly to audio backends instead of using global. The usage of globals for state inside the audio backends leads to more trouble that in helps. I have to use #+private file etc to no...

WIP: making the Karl2D audio backends take explicit state pointers instead of using globals: github.com/karl-zylinsk... The usage of a globals is OK in the main Karl2D public API, but it spread to the backends. I'll change all audio, rendering and platform code to work like this.

github.comPass state explicitly to audio backends by karl-zylinski · Pull Request #296 · karl-zylinski/karl2dPass state explicitly to audio backends instead of using global. The usage of globals for state inside the audio backends leads to more trouble that in helps. I have to use #+private file etc to no...

Karl Zylinski reposted

Too fun to just press Randomize in our new customization system in PIT OF GOBLIN! :D Most of the time you get pretty cool goblins too! #gamedev #gameart

Karl Zylinski reposted

I haven't written much #odin code yet but I have been devouring @zylinski.se book and find much I like. Whatever my next project that isn't a good fit for the BEAM is, I think I will be using Odin. I was hoping to get into the Jai beta but Odin+Raylib(+Clay I hope) feels like a powerful combination.

wodin has a WASM backend that lets it emit WASM directly, without LLVM. The Playground runs wodin, which compiles the game and emits new WASM, which is then executed. Note that wodin's WASM backend is AI generated. Nevertheless, I am flabbergasted that this is even possible.

Karl Zylinski reposted

Blog cover art time is always fun time. Especially when it's Karl's blogposts.

Merged a redesign of the Audio API in Karl2D: github.com/karl-zylinsk... This removes a layer of abstraction within the audio system. Playing audio clips or audio streams now directly hands you the handle of the Sound playing in the mixer. This is a breaking change.

github.comAudio API redesign by karl-zylinski · Pull Request #228 · karl-zylinski/karl2dCloses #226. Audio_Clip are fully loaded sounds, like a wav. Audio_Stream is audio streaming from disk, such as music or ambience. Both play_audio_clip and play_audio_stream return a Sound. A Sound...

New Karl2D feature: Configurable Y up / Y down coordinate system! Use `-define:KARL2D_Y_UP=true` to turn it on. `examples/box2d` (in video) now uses this coordinate system, making that code a lot nicer, since Box2D is Y up. Code here: github.com/karl-zylinsk...

Working on a big update for my Odin book. Just finished a first draft of a chapter on multi-threading. It covers thread basics, mutexes, semaphores, atomics and how to implement a lock-free queue.

Karl Zylinski reposted

AI CEO in 2019: Our model is too dangerous to release! (releases anyways) AI CEO in 2022: Our model is too dangerous to release! (releases anyways) AI CEO in 2026: Our model is too dangerous to release! (releases anyways) US govt: IT'S TOO DANGEROUS TO RELEASE, SHUT IT DOWN! AI CEO:

A big divider when writing technical books is how much "opinions" the author should put into it. Some readers want straight information (reference book). Some want as much opinions as possible, so it becomes a work of "the author's best programming ideas". There's probably a balance.

Feel like you must learn AI coding without wanting to? My 2 cents: - The hard part is reviewing the code the AI outputs - You'll continue honing that skill by not using AI - Learning to use AI takes just a few days So: Ignore AI until you actually need it, you'll be better off

Working on adding "bitmap fonts" to Karl2D: github.com/karl-zylinsk... Previously I've only supported fontstash. But perhaps fontstash isn't a good for shipping games. Generating atlases of unknown sizes feels flaky. My plan is instead bitmap + slug (two separate modes).

github.comBitmap font by karl-zylinski · Pull Request #172 · karl-zylinski/karl2dAdd support for pre-baked bitmap fonts. I don't think fontstash is very useful for actually shipping games since it generates an unknown amount of texture data. My idea is to instead support bi...

Merged bitmap fonts into Karl2D, or "static fonts" as I call it: github.com/karl-zylinsk... I now refer to the fontstash fonts as "dynamic fonts". I'll probably reimplement the fontstash path and static path into a single path that just differs in configuration (bake once, or on-demand).

github.comStaticAdd support for pre-baked bitmap fonts. These are referred to as "static" fonts. I've renamed the fontstash fonts to "dynamic" fonts. I may replace fontstash in a future PR ...

A MAZE Berlin was great. It's an art house video game festival. It's more design and art heavy than programming. But they managed to squeeze in my Odin workshop despite that! Thanks :) Personally I like the art focus, as I find game design harder than programming. Got lots of inspiration!

Karl Zylinski reposted