2025-05-14 14:25:39 +02:00
2025-05-09 08:46:25 +02:00
2025-05-14 14:15:45 +02:00
2025-05-14 14:15:45 +02:00
2025-05-14 14:15:45 +02:00
2025-03-26 10:17:43 +01:00
2025-05-14 14:15:45 +02:00
2025-05-14 14:25:39 +02:00
2025-05-14 14:25:39 +02:00
2025-05-14 14:15:45 +02:00
2025-05-14 14:15:45 +02:00

Snake 2025 Game

en fr

This project is a simple grid-based snake game using the MLV graphics library. The grid represents a game board with walls, empty spaces, fruits, and a snake. The program displays the grid in a graphical window and waits for user interaction.

Features

  • Displays a grid with walls, empty spaces, fruits, and a snake.
  • Uses the MLV graphics library for graphical rendering.
  • Ensures that blocks outside the grid are displayed as black.
  • Allows the user to quit the program by pressing the ESC key.

Grid Representation

  • The grid is represented as a 2D array of characters:
    • 'w' for walls.
    • ' ' (space) for empty spaces.
    • 'f' for fruits.
    • 's' for the snake.

Dependencies

  • GCC (GNU Compiler Collection)
  • MLV (Mini Library for Visualization)

Installation

Installing MLV on Ubuntu

  1. Update your package list and install the required packages:
    sudo apt-get update
    sudo apt-get install build-essential gcc make libmlv3-dev
    

Building the Program

  1. Clone the repository or download the source code.
  2. Navigate to the directory containing the Makefile.
  3. Run the following command to build the program:
    make
    

This will compile the source files and create an executable named game in the build directory.

Usage

  1. After building the program, run the executable:

    ./game
    
  2. A window will open displaying the grid. Blocks outside the grid will appear black. Press the ESC key to close the window.

Cleaning Up

To clean up the build files, run:

make clean

This will remove the object files and the executable.

License

This project is licensed under the GPLv3 License. For more details, see GPLv3 License.

Authors

Acknowledgments

  • Adrien Boussicault and Marc Zipstein for the MLV library.
  • ESIEE Paris for the course materials and guidance.
Description
Development project at school with the objective of making a functioning snake game using the MLV graphic lib
Readme 1.3 MiB
First release Latest
2025-06-02 07:14:10 +00:00
Languages
C 97.6%
Makefile 2.4%