Skip to content

habi-a/Snake-SFML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake-SFML

Language (C++) License: GPL v3

This is a very basic classic 2D snake game made with the SFML C++ game library.

Requirements

Must Have (dependencies)

Linux
 sudo apt-get install libsfml-dev
Windows
  • Vist www.sfml-dev.org and download the lastest version of the library.
  • In project settings,
  1. Add the </path/to/sfml/>/include to your c++ include path.
  2. Then add </path/to/sfml/>/lib to the linker extra library path.

MS Build

  • Visual Studio 15 or above
  • VC++ 15 or above

Linux

  • g++ 4.8 or above
  • GNU Make

Building from source

First Method (prefered and used) MS Build

  • Download the source code.

  • Import into Visual Studio

  • Build according to your need (x64 or x86 or whatever)

    Don't forget to link the sfml libraries - graphics, window and system.
    put the following files in linker input:
     sfml-system-d.lib, sfml-window-d.lib, sfml-graphics-d.lib and GameMenu.lib
    
  • Copy the sfml dlls (window, graphics and system) along with the executable

  • Then Run and enjoy

Second Method Makefile

BUILD DON'T WORK, SEE ISSUE#1

  • Download source code
  • cd to directory
 $ cd sfml-snake
  • Run make
 $ make
  • The exectable snake-sfml.out should apear.
  • Run and enjoy

Screenshots

Title State Menu State Settings State Begin Game State Pause State Gameplay Game State Game Over State

About

Snake game in C++ using sfml library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published