Skip to content
/ cobra Public

Snake game written in C - animations, retro menu, smart snake enemies, sound effects.

License

Notifications You must be signed in to change notification settings

engjango/cobra

Repository files navigation

Cobra

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.

Screenshot main menu

Features

  • Intro animation (animated ASCII Art)
  • Menu (retro)
  • Sound effects (bass library)
  • A* algorithm ("smart" enemies)
  • Obstacles
  • Records List
  • Config options
  • Help menu

Install Dependencies

Linux (Ubuntu)

git clone https://github.com/lavradodosilicio/cobra.git
cd cobra/lib/

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

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)

Compile and Run

Once you have the dependencies (see above), run the following commands in your terminal.

cd ..
make
./cobra

Controls

  • Arrow keys to control the snake direction of movement or select menu option.
  • Space to pause.
  • Enter to select option.

Screenshots

Screenshot intro Screenshot animation Screenshot intro

Dependencies

  • libastar
  • bass

Releases

No releases published

Packages

No packages published