alftron / snake-uno Goto Github PK
View Code? Open in Web Editor NEWSnake game for Arduino Uno using Elegoo 2.8" TFT touchscreen
License: MIT License
Snake game for Arduino Uno using Elegoo 2.8" TFT touchscreen
License: MIT License
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 the snake down, possibly with the main loop, millis or cycle counting and leave open the possibility of velocity increasing.
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
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.