/Nibbles

A simple, console-based snake game running with .NET Core on Windows, Linux and macOS.

Primary LanguageC#MIT LicenseMIT

Nibbles

A simple, console-based snake game, implemented in C# and running on .NET 8.0, inspired by QBasic Nibbles from 1990.

Because it is built for .NET, it can run on any platform that .NET supports, e.g. Windows 10 (Anniversary Update or higher), Linux and macOS.

As a console application, it uses Virtual Terminal Sequences that are supported on Linux/macOS terminals, and also on Windows 10 Anniversary Update (Version 1607) or higher, to control colors, cursor movement/visibility and the screen buffer of the console. For example, it switches to an alternate screen buffer, so that when exiting the game, the console can restore its previous content.

Screenshots

Windows 10:

nibbles-windows

Ubuntu (with Desktop Environment):

nibbles-ubuntu

CentOS (without Desktop Environment):

nibbles-centos

macOS (unfortunately, macOS's Terminal.app doesn't draw block characters at full line height, which is why it doesn't look as good as on other OSes):

nibbles-macos

Running

Install the current .NET SDK. Then run:

git clone https://github.com/kpreisser/Nibbles.git
cd Nibbles/Nibbles
dotnet run