Skip to content
/ cnake Public

Simple snake clone for terminals without the use of any 3rd party libraries

License

Notifications You must be signed in to change notification settings

veloek/cnake

Repository files navigation

CNAKE

A snake clone for terminals written from scratch without any libraries

run on repl.it

Implementing snake in the terminal would probably be much easier with something like ncurses, but I wanted to see how far I'd get by only using ansi escape codes.

Tested on GNU/Linux, macOS and WSL and it works surprisingly well.

$ make && ./cnake

To build a debug version that logs to debug.out, run make DEBUG=1.

Use h, j, k and l to move around, just like in Vim. Arrow keys are also supported, if you prefer that.

Screenshot

Roadmap

  • Draw game on fullscreen surface
  • Handle user input to control snake
  • Game loop that moves snake and redraws
  • Collision detection
  • Statusbar with score and other useful stuff
  • Fancy mode with unicode characters

See issues for more details.

About

Simple snake clone for terminals without the use of any 3rd party libraries

Resources

License

Stars

Watchers

Forks

Packages

No packages published