Skip to content

skellock/odin-raylib-game

Repository files navigation

Odin + Raylib Example

This isn't a game, it's a sandbox. I'm tire-kicking Odin and Raylib. 🥰

Things To Learn

  • basic odin'ing
  • basic raylib'ing
  • tests in odin
  • structuring a basic game
  • music & sounds
  • pausing a game
  • custom fonts
  • timers
  • cursors
  • tweening
  • memory leak tracking
  • collision detection
  • sprite sheets
  • basic sprite animations
  • save/load game (json is fine)
  • tilemap
  • text input

Screenshots

screenshot of the playground

Running

You should have odin installed.

To run the app, odin run src

If you use mise, you can run mise run r.

Mousities

left click - moves a dot
right click - shuffles (with a cooldown)

Hotkeys

q = quit
p = pause
s = save
l = load
/ = console

Struggles and Questions

  • Debugging - I use print statements, which sucks in a game loop. How do real people do this?
  • Allocation anxiety. Specifically around strings. I kinda don't want to use buffers [256]byte to hold them. 🤷‍♂️
  • Performance anxiety. It goes fast (138-ish FPS) but I don't know how many draw calls or where the hotspots are.
  • Testing ui. How do / Should I test my draw_* procs?
  • Testing with the uses of using to merge in the main package scope.

About

Playing with Odin and Raylib

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages