Giter Club home page Giter Club logo

c-snake's Introduction

๐Ÿ C_Snake

Default config file

fps:        60 # This is the fps cap".
tickrate:   12 # This is the tick rate of the game, tickrate: 10 means 10 ticks per second.
speed:      1 # The amount of tick it takes to move the snake.
size:       4 # This is the default snake size".
booster:    1 # This is the size gained by the snake when it eats".
arena:      20 # This is the size of the arena (20 = 20x20)".
display:    sfml # This is the type of display of the game (ncurses / sfml)).
does_tp:    1 # If set to 1 the snake is tped to the other side of the map when going through a wall, else (0) it dies.
force_move: 1 # If set to 1 when a movement key is pressed the snake will move next turn.
Note that if a value is incorrect in the config file, it will be set to the default config values.

Build

make

Run

./c_snake
Examples
  • Start the program with the desired config path (default snake.cfg)
./c_snake configPath
  • Start the program with custom values to the tickrate, speed and size, the rest set from the default configPath
./c_snake --tickrate 250 --speed 23 --size 2

Notes

  • To avoid any textures issue please use the same texture size !
  • Config is overwritten by the command arguments.
  • If you're using SFML display and the tickrate changes nothing it's maybe because your fps cap is too low.

Have fun playing my game !

Made with โค๏ธ by RqndomHax

c-snake's People

Contributors

paulcomte 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.