GithubHelp home page GithubHelp logo

tensorphobia / snake-game Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 891 KB

Whether you're a Linux user in need of a quick distraction or a coder seeking terminal-based inspiration, the Snake Game for Linux Terminal offers a fun and accessible gaming experience straight from the command line.

License: MIT License

C 96.98% Makefile 3.02%
cprogramming gamedevelopment linuxterminal ncurses-game opensourcegames retrogaming snakegame

snake-game's Introduction

Snakes ๐Ÿ

snakes logo

๐ŸŽฎ How to Play:

Players navigate the snake using arrow keys or specified controls, guiding it to consume food items randomly placed within the game area. As the snake consumes food, it grows longer, making navigation more challenging. The game ends if the snake collides with itself or the boundaries, and players can see their score.

๐Ÿ•น๏ธ Controls:

  • Use the arrow keys to control the snake's movement:

    • Up Arrow: Move the snake upwards.
    • Down Arrow: Move the snake downwards.
    • Left Arrow: Move the snake to the left.
    • Right Arrow: Move the snake to the right.
  • For changes to controls, modify the controls enum inside src/header files/control_module.h.

control customization code

โœจ Features:

  • FPS Cap Customization: Take control of the game's speed by adjusting the frames per second (FPS) cap. Ideal for larger monitors where quicker snake movement enhances gameplay, Simply adjust the source file in src/header files/settings_module.h.

  • Terminal Theme Adjustment: The game adjusts to your terminal theme, ensuring it matches your taste straight on without any additional configurations.

  • Customization via Flags: Customize your gaming experience by passing flags to adjust various settings according to your preferences.

  • Theme Customization: Want to add your own theme? No problem! Simply adjust the source file in src/source files/theme_module.c to append your personalized theme to the game.

snake game auto detect themes snake game auto detect themes snake game auto detect themes

๐Ÿ“ฆ Run/Compile:

To compile and run the Snake Game, you'll need any C compiler with the standard library and ncurses library installed. Follow these steps:

  1. Compile from Source:

    • Ensure you have a C compiler installed on your system.
    • Make sure the ncurses library is also installed. You can typically install it using your package manager.
    • Navigate to the project directory and run make to build the project.
  2. Run the Compiled Binary:

    • After successful compilation, execute the compiled binary by entering:
      ./snake.out
  3. Run the Precompiled Binary:

    • If you prefer not to compile the game yourself, follow these steps:

      a. Navigate to the release folder:

      cd release

      b. Run the precompiled binary:

      ./snake.out

      Remember to grant necessary permissions to the binary if needed:

      chmod +x snake.out

โค๏ธโ€๐Ÿ”ฅ Acknowledgment:

Special thanks to @haydraa for dedicating time and effort to review the code, providing valuable feedback, and contributing to the improvement of the Snake Game.


Made with โค๏ธ in Tunisia ๐Ÿ‡น๐Ÿ‡ณ

snake-game's People

Contributors

tensorphobia avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.