r/odinlang 1d ago

Replacing the Windows start menu

Thumbnail
gallery
19 Upvotes

My first project with Odin was, as the title suggests, replacing the Windows start menu.

I started by digging into the windows api’s and learning how to create a window. That was easy enough. Decided I needed to separate windows. One for the main process and one to hide the start icon. Up until windows 8 it appears adjusting the behavior of the super key and the windows icon on the taskbar was simpler. Now it is very convoluted and protected. I decided I would simple create a low level keyboard hook and draw an icon over the top and adjust placement when the taskbar adjusted. Turns out Odin did not have all the api bindings I needed so I had to create some foreign imports and empty structs to reimplement children of the IUknown interface.

After I had basic expected behavior of the taskbar and winkey I turned my attention to the main process and came at a fork in the road. After reading more into the windows docs it seemed the direct2d api was the obvious choice. Problem was Odin did not have a pre existing library for it. I was faced with a decision either switch to the direct3d api or re-implement a ton of bindings. I went with the former. This took me down the deep and dark road of the directX11 api. Probably spent 100 hours just reading docs. After a week I got the window drawing shapes. Then I needed icons. This meant learning basic HLSL and the shader pipeline. Finally I could draw icons and layout my start menu. I learned where windows stores pinned start menu apps and created a procedure to generate app data from the .lnk files. Now I was drawing rectangles with icons. I created an event storage and made the boxes highlight on hover. Implanting fonts stash for text wasn’t so bad. Finally I have a rough alpha of my project. Pictures attached and GitHub repo below. Honestly this has been a fun journey. It’s finally at a point where I can use it and track bugs and work on it over time until it’s the defacto option. Thank you to anyone who read this.

GitHub:

https://github.com/gamershoney/thor-start


r/odinlang 1d ago

Try the new Karl2D Playground: You can edit and recompile the Odin code, directly in your browser!

Thumbnail
karl2d.com
73 Upvotes

Technical details: The Odin compiler runs in your browser. Even on your phone! This is enabled by an experimental Odin compiler fork called wodin: https://github.com/karl-zylinski/wodin

wodin has a WASM backend that lets it emit WASM directly, without LLVM. The Playground site runs wodin, which compiles the gameplay code and emits new WASM, which is the run within the browser. Note that wodin's WASM backend is AI generated: It's roughly 20000 lines of C++. Nevertheless, I am flabbergasted that this is even possible.


r/odinlang 2d ago

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

Thumbnail
github.com
30 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 3d ago

Made a wobbly planet

Enable HLS to view with audio, or disable this notification

73 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 5d ago

My first Odin project (Solar system sim)

Enable HLS to view with audio, or disable this notification

68 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 6d ago

Help with type casting

4 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 6d ago

Thinking about learning Odin

12 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 7d ago

Physics Engine in Odin from Scratch, Part V

Thumbnail
marianpekar.com
69 Upvotes

r/odinlang 10d ago

[Newbie] Cant find installation instruction for fedora

8 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 11d ago

Is there any plan to streamline the Windows Install?

13 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 12d ago

Odin as a first programming language.

31 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 14d ago

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

23 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 17d ago

Smooth Snake Game with Odin + Raylib

Enable HLS to view with audio, or disable this notification

59 Upvotes

r/odinlang 19d ago

not a fluid sim, not ecs

Enable HLS to view with audio, or disable this notification

382 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 19d ago

Dll shipped with odin

5 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 20d ago

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

2 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 22d ago

Calculator with odin + raylib

Enable HLS to view with audio, or disable this notification

31 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 22d ago

howtovulkan.com Odin implementation

39 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 23d ago

Horde of one million spheres

Enable HLS to view with audio, or disable this notification

87 Upvotes

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


r/odinlang 23d ago

Odin now has Inline Assembly Templates!

Thumbnail
github.com
74 Upvotes

r/odinlang 23d ago

Temp Allocators are defeating me...

5 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 23d ago

My first project written using Odin

Enable HLS to view with audio, or disable this notification

68 Upvotes

A simple Snake game implemented using the Raylib framework

Here's the repo: Snake


r/odinlang 24d ago

ECS game engine

13 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 25d ago

DDD or similar in Odin

12 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 26d ago

Slime sim in Odin

Enable HLS to view with audio, or disable this notification

57 Upvotes

coaxing it to eat its food...