Cobra is an immersive snake game for Linux, crafted with passion and C programming prowess. Experience a nostalgic journey through retro-style gameplay with innovative features that set it apart from traditional snake games.
- Animated Intro: Stunning ASCII Art animation
- Retro Menu Design: Nostalgic user interface
- Intelligent Enemies: A* algorithm for "smart" snake opponents
- Dynamic Obstacles: Challenging game environment
- Immersive Sound Effects: Bass library audio integration
- Leaderboard/Records System
- Customization Options
- Comprehensive Help Menu
- Linux (tested on Ubuntu) or Windows 10/11 with MSYS2 UCRT64
- Git
- Basic development tools
- GCC Compiler
git clone https://github.com/jancarauma/cobra.git
cd cobraNo manual dependency installation is required. libastar is vendored as
source (lib/libastar_0.9-2.tar.gz) and is built automatically into .deps/
the first time you run make — no root/admin access needed. The BASS runtime
files (lib/libbass.so for Linux, bass.dll/bass.lib for Windows) are
already included in the repository.
make
./cobraIf you ever want to force a full rebuild of the vendored dependencies, run
make distclean first.
- ⬆️⬇️⬅️➡️: Navigate snake or menu
- Space: Pause game
- Enter: Select menu option
The Windows port was tested with Windows 10/11 and MSYS2. Open the UCRT64 terminal and install the compiler and build tools:
pacman -S --needed mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-makeFrom the project directory, run:
mingw32-make.exe OS=Windows_NT
./cobra.exeKeep bass.dll beside cobra.exe when running the game. The Windows port uses
the native console input API for keys, configures the console as UTF-8, and uses
the Windows timing API; no POSIX terminal library is required.
cd cobra
make
./cobraOn Windows, use the MSYS2 UCRT64 terminal and run mingw32-make.exe OS=Windows_NT.
- libastar (Version 0.9)
- bass (Latest version)
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow existing code style
- Write clear, commented code
- Include tests for new features
- Update documentation
Found a bug? Please open an issue with:
- Detailed description
- Steps to reproduce
- Your environment details
Give a ⭐ if you enjoyed the game!
MIT License
- Project Link: https://github.com/jancarauma/cobra
- Creator: @engjango (Jango)
- A* Library by Alexios.
- BASS Library by UN4SEE.



