Code Monkey home page Code Monkey logo

snake-game's Introduction

SFML Game Project

This repository contains a simple game project built using SFML. The project includes various components such as a game manager, snake, textbox, window manager, world manager, and an event manager.

Prerequisites

Before you can build and run this project, you need to have the following software installed on your system:

Installing SFML

You can install SFML on your system using your package manager. Here are some examples:

For Ubuntu/Debian:

sudo apt-get update
sudo apt-get install libsfml-dev

For macOS (using Homebrew):

brew update
brew install sfml

For Windows: Download the appropriate version of SFML from the SFML download page and follow the installation instructions provided there.

Building the Project

To build the project, you can use the provided Makefile. Follow these steps:

  1. Open a terminal and navigate to the project directory.

  2. Run the following command to compile and link the project:

    make

    This will create an executable file named app in the project directory.

Running the Game

After building the project, you can run the game using the following command:

./app

Cleaning Up

To remove the generated object files and the executable, run the following command:

make clean

Project Structure

  • main.cpp: Entry point of the game.
  • Game.cpp / Game.hpp: Game manager implementation.
  • Snake.cpp / Snake.hpp: Snake game logic.
  • Textbox.cpp / Textbox.hpp: Textbox implementation.
  • Window.cpp / Window.hpp: Window manager.
  • World.cpp / World.hpp: World management logic.
  • EventManager.cpp / EventManager.hpp: Event handling.

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

snake-game's People

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.