r/odinlang 5h ago

My first (completed) Odin project - Trackor the issue tracker

Thumbnail
github.com
Upvotes

Hey all i've been developing my own DAP using Miniaudio and Raylib to learn memory management and to have a really cool tool to listen to my Flac files... i've learned an incredible amount through that project but I found my self using TODO.md in the project instead of just having a simple CLI friendly issue trackor. I know the idea isn't new but i did think for a simple 1-2 day project (ultimately it was closer to 4 days cause i'm a newbie) now i have my own issue tracker for myself.

leaving it here for any potential feedback or if anyone wants a tool like this!


r/odinlang 1d ago

Made a wobbly planet

Upvotes

Learned a lot of rotation math and had a lot of fun and headaches

Made using odin and raylib no AI has been used

The source code is available here for anyone interested

https://codeberg.org/pwnM/planet


r/odinlang 2d ago

My first Odin project (Solar system sim)

Upvotes

This was a learning project to try to learn Odin, OpenGL and Physics/Math it evolved to be more of the latter :)

I felt like i struggled a bit a how to structure things in Odin.

I'm happy for any feedback or pointers regarding the Odin parts or anything else.

https://github.com/lounge/sol_sim


r/odinlang 3d ago

Help with type casting

Upvotes

[SOLVED] use microarch flag

I've noticed issues when using runtime/modified values inside a struct when using raylib.

I was trying to draw a rounded rectangle that follows the mouse pointer while highlighting the cell position in a grid.

``` package test import ray "vendor:raylib"

main :: proc() { ray.SetTargetFPS(20) ray.InitWindow(200, 200, "Test") defer ray.CloseWindow() for !ray.WindowShouldClose() { ray.BeginDrawing() defer ray.EndDrawing() ray.ClearBackground(ray.BLACK) ms := ray.GetMousePosition() mx := f32(i32(ms.x)/50) * 50 my := f32(i32(ms.y)/50) * 50 rec := ray.Rectangle{mx, my, 50, 50} ray.DrawRectangleRounded(rec, 0.3, 10, ray.YELLOW) } } ```

Can someone tell me why this code fails and whether this is a known issue or do I need to use a specific technique to make it work?

P.S.: I'm fairly new to odin and should probably look into more resources, but I haven't found a working example for this problem yet.

Post P.S.: The above code broke after the May 2026 release of odin. No idea why as of yet.


r/odinlang 4d ago

Thinking about learning Odin

Upvotes

So what are the reasons/main selling points and philosophies behind Odin and do you think they are implemented well? Because saying something is a design philosophy is easy, actually implementing it, so someone who writes code feels it is the harder part.
I like languages which have something special about them, or a nice eco system, for example the ownership model of rust, the pointer arithmetic in C, C# for web apps and the perfect integration of efcore to load data dynamically without thinking much about it and Python for the fact that basically everything exists there. Odin has first class support for a lot of graphics apis, so developing code which runs well on GPUs should work really great with it? What are your experiences?
My dream project would be to make an AI/ML library, which runs calculations on the gpu and works on most machines (I thought about using wgpu if possible)


r/odinlang 5d ago

Physics Engine in Odin from Scratch, Part V

Thumbnail
marianpekar.com
Upvotes

r/odinlang 8d ago

[Newbie] Cant find installation instruction for fedora

Upvotes

I want to install odin on my fedora 44. But on this https://odin-lang.org/docs/install/ I coudnt find any clear linux or ubuntu commands to download and install fedora.

Apologies if this has been answered before, but im only here because i want to rely on official sources


r/odinlang 8d ago

Is there any plan to streamline the Windows Install?

Upvotes
  • Download a .exe file
  • Open the file and install it
  • Check Add to Path
  • Only Download/Install the things you actually need to run Odin. Not multiple GBs of unnecessary stuff, especially for developers that don't code in C++.

I know it's not part of the plan for the 2027 Jan release, but maybe later in the next year?


r/odinlang 10d ago

Odin as a first programming language.

Upvotes

Hello guys, I'm kinda new to programming and I know a little bit about C like pointers, functions, control flows, structs, how and what strings are, and other core basic programming in C. What I don't like in C are build system and macros, like it doesn't fit for me.

So my questions is that ok if I learn Odin without C background? My goals for learning programming are to make game engine and system programming. I like how things work behind the screen.

P.S: Sorry if my English is not that good.


r/odinlang 11d ago

I'm working on a 2D factory building game inspired by games like Satisfactory and Dyson Sphere Program, Made using odin + raylib

Upvotes

Here's a screenshot

You can also unlock more land by selecting the chunks as a goal by pressing G

I'm also thinking of using ECS in the future to make it more optimized

Do you guys like the simplistic visual style i have?


r/odinlang 15d ago

Smooth Snake Game with Odin + Raylib

Upvotes

r/odinlang 16d ago

not a fluid sim, not ecs

Upvotes

Hello all,

Just posting a little progress update on my auto-battler/tower defense/idle incremental/online dueling deckbuilder in progress.

pure odin.

This is a stress test, 2 armies of 1 million soldiers clashing with wisps casting a few hacky spells.

The tech feels pretty good. I need to tighten up some of the sim values but I split the struct into 3 parts, hot, warm, and cold which has really reduced the GPU memory bandwidth. We were in budget but now we're roughly using half of what we were using.

Does anyone know how to turn this into a game? I didn't have much of a plan beyond tech demo.

There's a good chance I can make an online duel work.. I always thought a round-less Legion TD 2 would be cool...with battles scaled to the millions?


r/odinlang 16d ago

Dll shipped with odin

Upvotes

Ive noticed certain packages (ex: sdl3) have dll files with it, theres also a llvm dll in the root of the project. Is this used by default? Can i opt out and compile myself?


r/odinlang 17d ago

Box2d doesn't compile on linux even after running the build_box2d.sh successfully

Upvotes

Here is the error message:

/usr/bin/ld.bfd: ///home/user/deps_libs_sdks/Odin/vendor/box2d/lib/box2d_other_amd64_sse2.a(types.c.o): relocation R_X86_64_32S against `.data' can not be used when making a PIE object; recompile with -fPIE

/usr/bin/ld.bfd: failed to set dynamic section sizes: bad value

clang: error: linker command failed with exit code 1 (use -v to see invocation)

System Info:

Os: fedora

Arch: x86-64


r/odinlang 19d ago

Calculator with odin + raylib

Upvotes

Heard somewhere that calculators are a nice way to learn new languages, and because I never made any full-fledged one, I decided to try it. Currently it supports correct order of operations, functions, brackets, consts, custom functions and consts from config file, and what I call "iterators", so its possible to write <a, b> * c and it will result in <a\*c, b\*c>. For now it lacks in proper documentation or unit tests. There is also a bit of customization with .ini file

repo link: https://github.com/Bejmach/calc


r/odinlang 19d ago

howtovulkan.com Odin implementation

Upvotes

I started learning Vulkan and decided to go with Odin as my programming language for this project (thanks randy and ThePrimeagen)

I spent the past last days making howtovulkan.com tutorial work using Odin.

I had some trouble on Linux with some packages as they did not provide built libraries, but that was easy to fix.

If anyone is interested in the code here is it: https://github.com/Aykelith/odin-howtovulkan

Feedback welcome


r/odinlang 20d ago

Horde of one million spheres

Upvotes

Forgive the poor recording. It looks and feels super smooth native.


r/odinlang 20d ago

Odin now has Inline Assembly Templates!

Thumbnail
github.com
Upvotes

r/odinlang 20d ago

Temp Allocators are defeating me...

Upvotes

Hey all,

I posted a while ago about my http project (which i've completed at a library level) and decided to go back to a different project (a custom flac player for me to use).

i'm struggling with allocations and defers.... for instance strings are always allocated but i'm struggling to figure out how to deallocate without NEEDING function specific arenas, something aboiut it doesn't feel correct but i'm definitely not experienced enough to understand if what i'm doing is 1) correct and 2) idiomatic....

in my main function that will init the raylib window and run the main initialization functions like initializing the miniaudio engine and initializing my music directories paths into memory, etc. essnetially the "bring it all together" feels like it's going to get messy using temp allocators and context allocators... (maybe this is why allocators exist and i'm learning why it was a pain for a long time). for example in my main i'm creating a dynamic main_alloc to use with all of the top level functions instead of using temp allocators or manually freeing becuase to my understanding freeing temp allocators in child functions clears every temp allocation program wide... htrough research i do see this TEMP_ALLOCATOR_GUARD thingy mentioned but going through the files it looks like a private type and not really usable in my project I'd like to have functions clear there memory on scope end and only leave the global allocation for freeing in main.

am I crazy for thinking about this like this. if this is confusing please let me know and i'll gladly show snippets.

TLDR i'm just not sure how to use allocators in a way where there is a ton of boilerplate or complexity to free non-essential memory on scope end of children functions to main, are creating allocators per function the play or is there a way to guard temp allocators per function so the only clear the function's allocations and leave the upper level allocations.

thanks sorry for wall just not really sure where to learn about this type of scenario as most docs and tutorials are quite basic.


r/odinlang 21d ago

My first project written using Odin

Upvotes

A simple Snake game implemented using the Raylib framework

Here's the repo: Snake


r/odinlang 21d ago

ECS game engine

Upvotes

been messing around with Odin lately and honestly it feels like it was kinda made for ECS-style stuff. no hidden allocations, easy to reason about memory layout, no OOP nonsense getting in the way. but I don't have much real experience writing engines so idk if I'm just pattern matching because the language "feels" data-oriented.

anyone actually built something like this in Odin? curious how it goes in practice, especially around
- component storage / query stuff without generics being a pain

- whether manual memory management actually becomes annoying at scale or if it's fine

- how it stacks up against Rust+Bevy speed/ergonomics wise once things get complex

thinking of not reinventing the wheel and instead basically porting bevy's ideas over (archetypes, scheduler etc) instead of designing my own ECS from scratch. is that a dumb idea? rust and odin are pretty different (ownership vs manual mem, traits vs whatever odin has) so maybe a direct port just doesn't translate well and I'd be fighting the language the whole time.

if anyone's tried this or has war stories/gotchas before I waste a month on it, let me know


r/odinlang 23d ago

DDD or similar in Odin

Upvotes

Learning Odin coming from Go with profession experience writing in TCL, Python, JS/TS and some C# and loving it. Think Odin is quickly becoming my favourite language to work with.

But I have a question about anyone is doing Domain Driven Development successfully in Odin in large codebases? Is large system adoption not at the level around Odin yet for anyone to try it or care?

Edit: the part I’m interested in with Odin is code isolation so that a core logic (the domain) can be run without any real external dependencies (databases, external rest APIs, the file system etc) at scale. My current main work codebase is around 35,000-40,000 lines of Go (I think the domain code is under 10,000 lines). Lots of the coding issues my team hits look to be easier to solve in Odin. As a PoC I would like to write part of the domain logic in Odin and fake the external dependencies providing proof that Odin could be a valid language option within the business and our team. Needs to follow basic DDD as we often have changing external systems we depend on and we aim to implement them without changing domain code where we can.


r/odinlang 23d ago

Slime sim in Odin

Upvotes

coaxing it to eat its food...


r/odinlang 24d ago

My game engine, cookie engine made in odin, using lua as a scripting language

Thumbnail
github.com
Upvotes

r/odinlang 24d ago

SVC16 - A virtual computer that now runs live in the browser (WASM)

Thumbnail
Upvotes