Giter Club home page Giter Club logo

snake's Introduction

snake

A snake game based on SDL2, SDL2_image and SDL2_ttf. A project for practing SDL2 library.

Windows and Linux

In this project, you don't need download or install any other library, all we need are in this project except the "make" and "g++" tools. Whatever you are using linux or windows system, the only thing you need modify is the "Makefile".

Windows

comment "OS=LINUX" and uncomment "OS=WINDOWS"

Linux

comment "OS=WINDOWS" and uncomment "OS=LINUX"

some pictures for running this game

startUI process exit

Dependencies for Running

As saied before , Only "g++" and "make" tools are needed. SDL2, SDL2_Image and SDL2_TTF are included in this repo. So you don't need to download it any more. I think this will make life better for all beginners.

Windows

g++.exe (x86_64-posix-seh-rev2 6.3.0)

mingw32-make.exe (GNU Make 4.1, Built for x86_64-w64-mingw32) download address

Linux

Nothing you need to download and install. make and g++ are provided for almost all linux sytem.

how to start

it's very easy to start this project. As you can see, all files and libs needed in this game are here. All you need to compile this program is to rum 'make' command. This program is tested only in windows.

  1. Clone this repo.
  2. modify "Makefile" according to your system
  3. Compile: make
  4. Run it: main.exe

what is this project's goal?

I write this game for all beginner who want to learn sdl2 library. I think you can make better understand of sdl2 through this project, so enjoy and if you find some mistakes in this project, you are welcome to Pull Request.

snake's People

Contributors

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