r/odinlang • • 16h ago

Windows installer for the Odin Programming Language + MSVC and Windows SDK (by Karl Zylinski)

Thumbnail
github.com
21 Upvotes

r/odinlang • • 23m ago

Where the hell are all the actually useful tutorials?

0 Upvotes

Hello, this is a half rant post and a half question post. I am a bit new to all this "low level programming" stuff. I first tried to learn zig, but it's problem is the same one that this post describes, taken to an extreme. I then tried Go and it was better but it still had the same exact problem, and I found its whole package model to be very annoying, and I wanted to try manual memory management. So I am now trying out odin, but it too falls short in one crucial area that so many others do as well. Eventually I got so fed up with this seemingly easily solvable problem that here I am, making a post just to shit on half of all programming languages in existence, as they all have it.

The problem is a lack of useful tutorials to help people learn.
To demonstrate, let's take me trying to learn zig as an example:

  1. I go on youtube and search up "zig tutorial"
  2. I find Zig Programming Language - Beginner's Guide by Coding with Tom, and click on it as it seems nice.
  3. 0:58 "This tutorial will assume you know the basics of programming." Okay, that's nice. I have already worked with Lua for a long long time and dabbled with Python and JavaScript a little bit.
  4. 6:20 "We will need a main function...the return type will be void...it needs to be marked as public because every zig file will become a struct" See right here is the problem. They assume we already know some concepts and therefore do not explain them. As such, they fail to explain to me (someone who has never used these lower level concepts much) what 'main function,' 'void return type,' 'public,' 'struct,' etc are. You really expect me to know what this stuff means? No this is stupid.
  5. I decide to try and find a better tutorial that actually covers the fundamental concepts and is truly for beginners like me.
  6. I click on and watch the next 6 different tutorials and see they have the same fundamental problem I just described.
  7. I decide to try going to non youtube places to find guides, but alas I was not able to find any suitable ones, only similar variations to what I have seen before.
  8. I decide learning zig is not possible due to lack of good tutorials and find a different language.

I then decide that Go might be a nice language. I hear people talk about it:

  1. I go on youtube and search up "go tutorial"
  2. I find Go (Golang) Tutorial for Beginners playlist with 22 episodes. I figure it must contain a lot of content if it is that long, so I click on the first one.
  3. Guide is quite nice and I watch all of it, although I do wish it did talk about some topics more like arrays and pointers and such. Has less of the issue than the others
  4. Try to make a program to edit images in Go
  5. Cannot figure out how (may be skill issue though)
  6. Eventually decide to move on due to not being able to figure out how to edit non text files + not liking the very forced package system much

I then move on and try out Odin, as apparently its similar to Go:

  1. I go on youtube and search up "odin tutorial"
  2. By now I am not expecting anything super useful other than giving me a small added amount of knowledge
  3. First like 4 guides immediately skip past stuff like "what is main function," "how does import and package work," and say "I assume you know X because you have coded before" Like great thanks, is someone gonna come tell me any of this stuff at some point? Is it supposed to come to me in a dream?
  4. I try to make a small game in Odin to learn but suprisingly, I don't know how this happened, but for some reason I have not yet learned how structs and arrays and manual memory management and code in the root of the file and how functions pass by value always and more things needed to make even a basic platformer. I seriously wonder how this could have happened. It couldn't possibly be because LITERALLY NOT A SINGLE SOUL IN THE ENTIRE PLANET thought about "lets make a tutorial for beginners" and then actually made it for beginners by not assuming any prior knowledge at all.
  5. At this point I am so fed up with my lack of knowledge that I come here to make this very post to shit on these languages and the people that make these tutorials for advertising "simplicity" and "fun to use" and "easy to learn" without having even a SINGLE resource to learn them that is actually helpful for beginners. It seems a bit counter-intuitive and hypocritical.

As you can see, I am a bit upset just in general. I can and have made a 16 bit computer by hand out of logic gates (in a logic simulator, i dont got money for breadboards) but cannot make a simple flappy bird clone because apparently no one knows how to teach people anything. This is bullshit. I'm done. I quit. I'm deleting my flappy bird. Was pretty shitty anyway.

The moral of the story is simple: People who are great at a subject cannot teach it for the life of them, and people bad at a subject are amazing at teaching it. Almost none can do both.

So that brings me onto my final point: can anyone prove me wrong? Does literally anyone know of a tutorial/guide for odin (well maybe others but I preferred odin the most out of these three) that truly does start from the basics without assuming I know X Y or Z ahead of time? (because clearly I don't)

Maybe this is just a skill issue on my part, and I'm just a bit dumb. Maybe I'm not. I don't know. That is why I made this post.

Thanks


r/odinlang • • 8d ago

Isaac inspired rougelike with heavy synergies in early build.

27 Upvotes

Running on an odin and open gl engine.


r/odinlang • • 7d ago

GitHub - Tolasmond/scanned_card_cutter

Thumbnail
github.com
4 Upvotes

Scanned Card Cutter finds the cards on a scan, lets you check and adjust each one with a live preview, and saves every card as a PNG with transparent rounded corners. It can also remove the moiré pattern that printed halftone dots leave on a scan.

It is a small desktop app written in Odin with raylib, and it builds with only what ships with Odin. It runs on Linux, Windows and macOS (untested).


r/odinlang • • 8d ago

Physics Engine in Odin from Scratch, Part VII

Thumbnail
marianpekar.com
73 Upvotes

It took a bit longer than usual. I wanted to have Part VII done by the end of October, but life got in the way :).


r/odinlang • • 8d ago

Const values initialized at runtime?

10 Upvotes

I have been curious about learning Odin lately, and reading through the docs, I cannot find anything about initializing constant variables with runtime values. It seems like :: only works at compile time, and if you assign from a runtime value with :=, the variable is always mutable? Doesn't that slow you down sometimes, not having a way to know that a variable isn't modified without checking through the whole scope? Or have I just not read the docs right?


r/odinlang • • 9d ago

How to get the language server to update the editor suggestions immediately instead of upon save?

7 Upvotes

Hello, I am very new to Odin, and I first wanted to get my editor (vscodium/vs code) to properly warn me about errors, provide suggestions for stuff, tell me what arguments functions take in, etc etc.

I installed the language server from https://github.com/DanielGavin/ols and also the VS Code "Odin Language" extension by DanielGavin. Initially it seemed to work, but it seemed to only update its analysis and suggestions of the code when I saved the file which is extremely annoying.

I did some research (aka asking chatgpt how to do it because usually its way faster than reddit and I wanted to get on with my day dont judge me) and found that I needed to create an ols.json file in my project root and put this in it:

{
    "collections": [
        {
            "name": "core",
            "path": "/path-to-odin-folder/core"
        },
        {
            "name": "vendor",
            "path": "/path-to-odin-folder/vendor"
        }
    ],
    "enable_checker_only_saved": false,
    "enable_checker_on_change": true,
    "checker_on_change_delay": 400
}

And it seems to work! It updates immediately without me needing to save the file.

However, creating this ols.json for every single project I open is pretty annoying, considering that I probably won't have it do anything else besides this one specific thing. I wasn't able to find any answer online on how to get this to work without each project having an individual ols.json file, so I came here to ask how I can do it.

Thanks


r/odinlang • • 12d ago

Progress update

35 Upvotes

A few months ago, I posted this:
not a fluid sim, not ecs : r/odinlang

So, I'm just here for a little progress update.

I've made a lot of improvements to the core engine but the majority of the codebase is now gameplay scripting...

The playtest is open, if you'd like to try it.

https://store.steampowered.com/app/5413470/Primordaeon/


r/odinlang • • 13d ago

Error handling in Odin?

11 Upvotes

Hello guys, what is the best practices to handle error in Odin? Is Go-style is the best way if err != nil but Odin doesn't allow shadowing variable.

note: Sorry my for my poor English and thank you.


r/odinlang • • 13d ago

Decoding REXPaint Files in Odin

Thumbnail
tylerelton.com
4 Upvotes

r/odinlang • • 14d ago

Anyone else highly disappointed when they learned that Odin is 64 bit only and won't compile for 32 bit microprocessors?

0 Upvotes

r/odinlang • • 18d ago

I wrote a RESP in-memory store in Odin

11 Upvotes

Eski is a single-node in-memory store with an Odin engine that speaks RESP, so Redis clients connect unchanged: the full single-node command surface including streams, geo, ACLs, persistence and Lua scripting with Functions, minus replication, Sentinel and Cluster. Apache-2.0, one static binary.

https://github.com/vighnesh-bheed/eski


r/odinlang • • 17d ago

Been building a hobby 3D game engine with odin, sdl3, box3d, using Claude ai. Engine and scripting using odin language. Very early stages .

0 Upvotes

r/odinlang • • 20d ago

New Karl2D release: beta-2026-11

Thumbnail
github.com
34 Upvotes

Highlights: Mipmap support and texture wrapping settings. Tested with Odin dev-2026-11

Karl2D is a library for creating 2D video games. It has few dependencies (tries to stay in Odin land) and emscripten-free web build support.


r/odinlang • • 23d ago

A few months of progress on my voxel game engine made with odin

46 Upvotes

r/odinlang • • 23d ago

Hacking odin's compiler to "fix" the doc sub command

24 Upvotes

After using Odin for some time, I discovered the odin doc command, that turns any odin file or package into a documentation view. This is a very useful tool during development for me, and i am pretty sure this was inspired by Golang's go doc, which is also a great tool. But, in my humble opinion, Odin's tool was lacking a few things.

First off, the output formatting. I simply do not like how it looks, it's very difficult for me to read because there is too much indentation and info.

For example, if you run odin doc core:strings, you get this:

package strings
        A `string` builder, as well as procedures to manipulate `UTF-8` encoded strings.

        procedures
                _intern_get_entry :: proc(m: ^Intern, text: string, loc := #caller_location) -> (new_entry: ^Intern_Entry, err: runtime.Allocator_Error) {...} /* 33!3390 */
                        Internal function to lookup whether the text string exists in the map, returns the entry
                        Sets and allocates the entry if it wasn't set yet

                        *Allocate using the Intern's Allocator  (First time string is seen only)*

                        Inputs:
                        - m: A pointer to the Intern struct
                        - text: The string to be looked up or interned
                        - loc: The caller location for debugging purposes (default: `#caller_location`)

                        Returns:
                        - new_entry: The interned cstring
                        - err: An allocator error if one occured, `nil` otherwise

                ascii_set_contains :: proc(as: Ascii_Set, c: byte) -> (res: bool) {...} /* 34!1122 */
                        Determines if a given char is contained within an Ascii_Set.

                        Inputs:
                        - as: The Ascii_Set to search.
                        - c: The char to check for in the Ascii_Set.

                        Returns:
                        - res: A boolean indicating if the byte is contained in the Ascii_Set (true) or not (false).
...

Of course, you can run odin doc -short core:strings, which outputs this:

package strings
        A `string` builder, as well as procedures to manipulate `UTF-8` encoded strings.

        procedures
                _intern_get_entry :: proc(m: ^Intern, text: string, loc := #caller_location) -> (new_entry: ^Intern_Entry, err: runtime.Allocator_Error) {...} /* 33!3390 */
                ascii_set_contains :: proc(as: Ascii_Set, c: byte) -> (res: bool) {...} /* 34!1122 */
                ascii_set_make :: proc(chars: string) -> (as: Ascii_Set, ok: bool) {...} /* 34!639 */
                builder_cap :: proc(b: Builder) -> (res: int) {...} /* 36!9132 */
                builder_destroy :: proc(b: ^Builder) {...} /* 36!5973 */
                builder_from_bytes :: proc(backing: []byte) -> (res: Builder) {...} /* 36!7088 */
                builder_from_bytes :: proc(backing: []byte) -> (res: Builder) {...} /* 36!7088 */
                builder_grow :: proc(b: ^Builder, cap: int) {...} /* 36!6223 */
                builder_init_len :: proc(b: ^Builder, len: int, allocator := context.allocator, loc := #caller_location) -> (res: ^Builder, err: runtime.Allocator_Error) {...} /* 36!3838 */
                builder_init_len_cap :: proc(b: ^Builder, len, cap: int, allocator := context.allocator, loc := #caller_location) -> (res: ^Builder, 

This looks better, but i still don't like it.

So, i decided to change a few things in the compiler and now, if i run odin doc core:strings, it outputs like this:

package strings

A `string` builder, as well as procedures to manipulate `UTF-8` encoded strings.

[procedures]
_intern_get_entry               :: proc(m: ^Intern, text: string, loc := #caller_location) -> (new_entry: ^Intern_Entry, err: runtime.Allocator_Error)
ascii_set_contains              :: proc(as: Ascii_Set, c: byte) -> (res: bool)
ascii_set_make                  :: proc(chars: string) -> (as: Ascii_Set, ok: bool)
builder_cap                     :: proc(b: Builder) -> (res: int)
builder_destroy                 :: proc(b: ^Builder)
builder_from_bytes              :: proc(backing: []byte) -> (res: Builder)
builder_from_bytes              :: proc(backing: []byte) -> (res: Builder)
builder_grow                    :: proc(b: ^Builder, cap: int)
builder_init_len                :: proc(b: ^Builder, len: int, allocator := context.allocator, loc := #caller_location) -> (res: ^Builder, err: runtime.Allocator_Error)
builder_init_len_cap            :: proc(b: ^Builder, len, cap: int, allocator := context.allocator, loc := #caller_location) -> (res: ^Builder, err: runtime.Allocator_Error)
builder_init_none               :: proc(b: ^Builder, allocator := context.allocator, loc := #caller_location) -> (res: ^Builder, err: runtime.Allocator_Error)
builder_len                     :: proc(b: Builder) -> (res: int)
builder_make_len                :: proc(len: int, allocator := context.allocator, loc := #caller_location) -> (res: Builder, err: runtime.Allocator_Error)
builder_make_len_cap            :: proc(len, cap: int, allocator := context.allocator, loc := #caller_location) -> (res: Builder, err: runtime.Allocator_Error)
builder_make_none               :: proc(allocator := context.allocator, loc := #caller_location) -> (res: Builder, err: runtime.Allocator_Error)
builder_replace                 :: proc(b: ^Builder, old, new: string, n: int, loc := #caller_location) -> (replaced: int, err: runtime.Allocator_Error)

I decided to indent the symbols (procedure names) according to largest symbol on the AST list and removed the tabs that cause that indentation. I also removed the function location info at the end. Now i actually find the results satisfactory.

It doesn't stop there, on the Golang side, you can search for specific symbols in the package and see an isolated documentation view for it by typing go doc os.Stat for example. So i decided to implement the same thing in Odin

Now, when i run something like odin doc core:strings.clone, it shows this:

package strings

clone :: proc(s: string, allocator := context.allocator, loc := #caller_location) -> (res: string, err: runtime.Allocator_Error)

        Clones a string

        *Allocates Using Provided Allocator*

        Inputs:
        - s: The string to be cloned
        - allocator: (default: context.allocator)
        - loc: The caller location for debugging purposes (default: #caller_location)

        Returns:
        - res: The cloned string
        - err: An optional allocator error if one occured, `nil` otherwise

This works for any kind of symbols including types, constants, variables, proc groups...

I was actually pretty proud about this, although, the code is still rough and need some organization

But i was curious about the people from this sub. Is this actually useful for you? Do you think this improves your Odin experience?


r/odinlang • • 24d ago

I made a TUI library in pure Odin

198 Upvotes

Been working on hnoss for a while: an immediate-mode TUI library, no C, no ncurses, just Odin. Would love your feedback!

repo: https://github.com/Huseynteymurzade28/hnoss


r/odinlang • • 25d ago

Are you using Tauri?

14 Upvotes

Anyone doing odin with tauri? Any native odin equivalent? (just jealous of tauri)
Please share your experience if you are using Skald too.
(I wasn't talking about embedding chromium with some custom solution)


r/odinlang • • 26d ago

State of tuples?

16 Upvotes

I love odin and would like to continue with it as my language of choice. I managed to implement in one afternoon what took me a week in C++ (mostly fighting RAII magic).

One thing I miss are variadic parameter packs and tuples. Tuples exist as function return types and structs can be unpacked, but they cannot be used otherwise to be passed as generics - I do not understand why and can only find very old reddit posts on this topic.

I managed to hack tuples together by using codegen and structs like Tuple_0, Tuple_1, etc that have generic fields + a monster proc for compile-time indexing, but it gets tedious to work with.

Does anyone know any replacements / implementations of a heterogeneous collection of data types for odin I can take a look at?


r/odinlang • • 26d ago

[2025 Day 8 (Parts 1 and 2)] [Odin] Naive solution while learning a new language

Thumbnail reddit.com
3 Upvotes

Cross-posting this here. I'm learning the language through puzzles. Mods, feel free to delete if this kind of thing isn't useful for the sub.

Odin has been fun to learn so far. Way, way outside my comfort zone - but having a blast just the same.


r/odinlang • • 28d ago

Karl2D beta 4 is here! 178 days since previous release, so this is a big one.

Thumbnail
github.com
44 Upvotes

The previous release happened just before the Karl2D jam. That was almost half a year ago! That jam gave me sooo much good feedback. In this release you can see a lot of that work. Thank you everyone for trying my library, for the feedback and for the pull requests! Highlights:

  • Audio mixer thread
  • Better audio API
  • vsync control and FPS limiter
  • Depth buffer control
  • New dynamic font rendering system
  • Monitor size queries etc
  • Custom hardware cursors
  • Touch support (for web)
  • Text input (get_typed_runes)
  • Client-side decorations for GNOME

r/odinlang • • 29d ago

Binary File Reader

8 Upvotes

zelbyn is a data-driven binary file reader written in Odin. It decodes a file with a Kaitai Struct .ksy schema and writes the decoded tree to stdout, as a text dump or as JSON. Also supports Odin code generation.

https://github.com/Tolasmond/zelbyn


r/odinlang • • Oct 24 '26

I released my game with custom engine made in odin

48 Upvotes

I just released my game made with my custom engine made with odin, and I really want feedback to fix and improve my game dev skills, I know the game design is simple and nothing new, but still its a good test. any feedback or bug reports is really appreciated. thanks

https://tinypixeldev.itch.io/yet-another-hord-game


r/odinlang • • Oct 23 '26

Karl2D Audio API, hopefully the final design!

Thumbnail
github.com
36 Upvotes

I think this is my final re-design of the Karl2D Audio API. This design is optimized for the most common case. It's easy to play one-off sound effects using `play_audio_stream`. You can play the same clip many times simultaneously.

Audio streams (music) now have their own API that is easier to use.

There is also a `Sound` API. You make a `Sound` using `create_sound` which you feed an `Audio_Clip`. Sounds are essentially audio clips that remember their settings between playbacks, and you can change the settings while the sound is playing. Many people don't need that because `play_audio_clip` can be fed settings to use for the duration of the playback. Only if you need to modify the settings while playback is happening do you need the `Sound` API.

`Sound`s, `Audio_Clip`s and `Audio_Stream`s all live as `Audio_Voice`s in the mixer. This is why one clip can be played many times simultaneously: It's several audio voices that all look at the same clip.