Ratsnake: Snake in ratatui

I’ve just released v0.1.0 of ratsnake, an implementation of Snake made with Ratatui.

Features:

  • You can configure wraparound, adding random obstacles, number of fruits, and level size
  • Tracks high score for each option configuration

I wasn’t able to make a GIF (largely because I couldn’t get agg to render the character used for the snake body), but I do have an asciicast:

asciicast

Neat. The demo is pretty. I wonder if you considered using the half block characters to render the arena / snake with?

If you mean the obstacle symbol, I’d prefer for adjacent obstacles to “join up,” which means using a full block (or a shaded version, but I think the full block looks better). If you mean the border, I just prefer the look of thin lines for that.

All of the half-block characters I can find at the moment are pressed against a side (e.g., ▌occupies the left side of the glyph area), but I’d prefer something centered in the middle (and using the same glyph for the snake as for the obstacles seems suboptimal). What block character(s) did you have in mind for the snake?