GithubHelp home page GithubHelp logo

alftron / snake-uno Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 603 KB

Snake game for Arduino Uno using Elegoo 2.8" TFT touchscreen

License: MIT License

C++ 53.07% C 25.15% Processing 21.78%
arduino c-plus-plus

snake-uno's People

Contributors

alftron avatar

Stargazers

 avatar

Watchers

 avatar

snake-uno's Issues

Add snake food

It's no good the snake just slithering around aimlessly! We need to randomly give the snake some food and get a score from it.

Slow snake down

Slow the snake down, possibly with the main loop, millis or cycle counting and leave open the possibility of velocity increasing.

Add function to check if a button or the screen is being held down

I'm not sure there is a way to detect if a button is being held down because getting the pressure gives too many zero values that it will just jump out of a loop the first chance it gets.
What I could do is have a function that is polled that takes a sample size of pressure values, takes the average and if it's greater than a given value then we know the screen is being held, shouldnt be too hard

Limit movement of snake to X amount of pixels

Possibly limit of the movement of snake to X amount of pixels because then it can line up with food making turns a little more user-friendly. The only thing is the game wouldn't look as smooth, so it's a compromise and will probably need to be branched to compare how the two look.

Add user input for movement

Use the four sides of the screen as an input for movement of the snake head. Let's just ignore velocity for now though to make things a little easier. The snake should probably go slower for now though.

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.