o
odinpkg.dev
packages / library / odin-snake

odin-snake

f40b623library

Learning project for Odin + RayLib

No license · updated 1 month ago

Snake - Odin + Raylib

based on Karl Zylinski's tutorial: https://youtu.be/lfiQNCNUifI?si=dDxsMc03g7uhWICc

TODO

  • open window
  • draw snake head on grid
  • zoom w/ camera
  • make head move
  • input
  • multiple body parts
  • game over - hit wall
  • grow - hit food
  • game over - hit self
  • snake and food graphics
  • score counter
  • sound
  • bug: already fixed 180 turns, but also need to add a catch for "backing" into body segment when it's to the side intead of directly behind. basically, you shouldn't be able to turn so sharp you break your neck. you should never be able to crash into snake[1], or even snake[2].
 0 1
 3 2

STRETCH GOALS

  • highscore counter
  • smooth move
  • contoller support (rl.IsGamepadButtonPressed)
  • music (rl.PlayMusicStream)
  • screen shake (rl.Camer2D, use target element and timer)