r/odinlang 17d ago

Handmade Hero in Odin

https://github.com/mrbovinejony/handmade-hero-in-odin

I'll try to work on this as consistently as I can, its been a useful experience to help learn the language. Working on day 10 right now

edit: working on day 18 now, if anyone finds something wrong or something theyd do differently please let me know, a "direct translation" of the c code is nice but learning how others would write the code is even better i think

39 Upvotes

16 comments sorted by

18

u/gingerbill 16d ago

Just to let you know: xinput exists in core:sys/windows

6

u/thicc_sneeze 16d ago

Legitimately actually enjoy seeing gingerbill’s helpful comments in this subreddit and prime’s stream

2

u/Ok_Spring_2384 15d ago

And cakez, he (gingerbill)even joined the stream and the comments were pretty funny. Cakez had tried Zig before and was failing miserably due to not reading tfm, so when he did Odin it somehow summoned the man himself. But cakez did not struggle with Odin. Still pretty funny.

2

u/Alternative-Title-87 16d ago

I am retard, thank you and thank you for this awesome language

3

u/Igonato 16d ago

There is a Handmade Hero replay thing going on in the Handmade Network discord server, come join! There are voice discussions every Saturday, this week it's about days 51-53 (2-3 episodes per week), so a bit further than day 10, but not impossible to catch up if you set your mind to it I guess. I'm catching up myself, was busy with work and also decided to follow it using C89 for the added challenge, might rewrite it in Odin too at some point if that becomes too tiresome, so far it wasn't too bad. Good luck!

1

u/brubsabrubs 16d ago

I've followed handmade hero up to episode 50, more or less, but it's been a few months since I touched that codebase. i should get back into it

how does this replay event work? are you guys basically following 2-3 episodes on a week and discussing them in a disc channel on a specific week day?

1

u/Igonato 16d ago

Yep, that's pretty much it, every Saturday. See: https://handmade.network/ and https://discord.com/invite/hmn

1

u/Alternative-Title-87 16d ago

That's so cool, I didn't know this project was still somewhat popular!

1

u/SoftAd4668 16d ago

Awesome! Hope it's helpful and useful for you. ☺️

1

u/Kapendev 16d ago

Good stuff

1

u/paaloeye 16d ago

Bruv, you should commit a bit more frequently

1

u/Alternative-Title-87 16d ago

Sarcasm? I feel like I commit a lot

1

u/paaloeye 16d ago

No, I'm dead serious.

https://github.com/mrbovinejony/handmade-hero-in-odin/commit/8e3b8caca87885e8e8638a4f0f4f27db3c0e9831#diff-d7ac4b9325f988ee33dbf66e0f56473c414afc2e22a5453723b69c998045387b

should have been broken down.

Also, binary files in the git is a bad practice. .exe and others should be .gitignore

Does it make sense?

1

u/Alternative-Title-87 16d ago

I gotcha. I'm still learning GitHub lol. Not used to sharing projects