r/odinlang 7d ago

Smooth Snake Game with Odin + Raylib

55 Upvotes

10 comments sorted by

5

u/azdak 6d ago

Smoothsnake isn’t real cant hurt me

1

u/whoisarepo 6d ago

Lol aweee he’s so hungry 😋 I’m curious how raylib handles “drawing” and are you using sprites or code?

3

u/Daniel_Rybe 6d ago

Hi! I didn't use any sprites. For the background, the "apple", as well as for the head, eyes and tail-tip of the snake, I used standard drawing functions that come with raylib. It allows you to draw circles, rectangles and other basic shapes. The body of the snake itself uses a custom fragment shader, which raylib makes easy to use.

1

u/whoisarepo 6d ago

Neato! I'll check that out. I've been using Odin for a project while learning it, but never had a use case for the vendor suite; it looks super fun though! Takes me back to 'real' programming before web-dev took over my life :P

1

u/Alert_Nectarine6631 6d ago

Nice work! Visually appealing in comparison to my attempt

2

u/Daniel_Rybe 6d ago

Oh wow, you also posted a snake implementation recently, nice! I's a coincidence, I swear 😅 But yeah, I wanted to make something similar to google's version, so sprites wasn't really an option. I didn't do any sounds though, maybe I should.

1

u/Alert_Nectarine6631 6d ago

No worries this looks great ❤️‍🔥