GithubHelp home page GithubHelp logo

sense-hat-snake's Introduction

Raspberry Pi Python sense hat snake

A project to create a Snake game on a Raspberry Pi using a Sense Hat.

Requirements

This package requires the following system packages to be installed:

  • python-pip
  • python-dev

Installation

Begin by installing this packages requirements:

pip install -e .

Finally copy the example configuration file example.config.py, and save it as config.py

cp sensehatsnake/example.config.py sensehatsnake/config.py

Configuration

You can now configure Sense-Hat-Snake in a few simple steps. Open sensehatsnake/config.py and update the options as needed.

  • columns - The number of columns the board has.
  • rows - The number of rows the board has.
  • fps - The games frames per second.
  • countdown - The game countdown in seconds.
  • interval - The game tick interval in milliseconds.
  • score_increment - The number to increment score by in game.
  • level_increment - The score when to increment the level by in game.
  • interval_increment - The number to reduce the game tick interval by in milliseconds.

Usage

It's really as simple as running the main file

sudo python sensehatsnake/main.py

License

Sense-Hat-Snake is open-sourced software licensed under the MIT license

sense-hat-snake's People

Contributors

lade043 avatar bradcornford avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

lade043

sense-hat-snake's Issues

Execution issue "No module name board"

Hi, when excute the code I have next crash:

Traceback (most recent call last):
  File "sensehatsnake/main.py", line 2, in <module>
    from lib.game import Game
  File "/home/pi/src/sensehat-snake/sensehatsnake/lib/game.py", line 2, in <module>
    from board import Board
ImportError: No module named 'board'

Also, I upgraded all python3 packages in my raspbian. Thanks

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.