Snake game for Linux with a focus on learning C. "Cobra" is a snake game written in C. It features animations, a retro menu, snake enemies, and sound effects, providing an engaging gaming experience.
Jogo da Cobrinha para Linux com propósito de aprendizado em C. "Cobra" é um jogo escrito em C. Ele implementa animações, um menu retrô, cobras inimigas e efeitos sonoros.
- Intro animation (animated ASCII Art)
- Menu (retro)
- Sound effects (bass library)
- A* algorithm ("smart" enemies)
- Obstacles
- Records List
- Config options
- Help menu
git clone https://github.com/lavradodosilicio/cobra.git
cd cobra/lib/
A* Library (https://www.bedroomlan.org/projects/libastar/)
For x86 machines, run the code below
sudo dpkg -i install libastar0_0.9-2_i386.deb
or in case of x64 Machines,
sudo dpkg -i install libastar0_0.9-1_amd64.deb
BASS Library (http://www.un4seen.com/)
Now, install the bass library, i.e.,
sudo cp libbass.so /usr/local/lib (to copy bass library into linux lib)
sudo chmod a+rx /usr/local/lib/libbass.so (to load the lib)
sudo ldconfig (to autoconfig)
Once you have the dependencies (see above), run the following commands in your terminal.
cd ..
make
./cobra
- Arrow keys to control the snake direction of movement or select menu option.
- Space to pause.
- Enter to select option.
- libastar
- bass