jouni-kantola / grid-snake Goto Github PK
View Code? Open in Web Editor NEWSnake game built with CSS Grid ๐
Home Page: https://jouni.kantola.se/by-me/grid-snake/
Snake game built with CSS Grid ๐
Home Page: https://jouni.kantola.se/by-me/grid-snake/
Spacing, rows, animations, etc makes the grid cluttered when playing the game on a device with a small screen (e.g. iPhone SE).
Game has a responsive layout, so should have on-screen controls to enable the game to be played on touch devices (e.g. mobile).
Two hearts cannot be one-way streets (52e0918). It would make it impossible to clear the level. One heart can, as that can be picked up last.
When getting to higher levels, the risk of surrounding hearts with stops increases.
If stops are spawned directly infront of snake, it'd be impossible to avoid them.
This issue has comes in two nuances; start of game (edddeae) and start of new level:
Cannot start the game on the left (even if wrapping) nor right of stop
If would start on left, would directly collide
If would start on right, tail would collide
Cannot spawn stop directly adjacent of snake
If directly in next cell (considering direction), would directly collide
Consider tail length when spawning (should also consider tail's length), to not collide tail with stop
Lines 122 to 132 in edddeae
A bit too hard to get the intended direction control activated. The inputs should be a bit bigger and/or spaced further apart.
Direction should only be updated from horizontal to vertical and vice versa. Currently one can go in opposite direction, which results in immediate tail crash.
Enable running as fullscreen PWA.
When hitting stop, in certain directions snake's eyes pop out of its skull.
Don't use divs for on screen game controls, use proper buttons. Game controls doesn't quite react now and then, either.
Because layout grid rows have fixed height, the configuration area doesn't get collapsed when hiding it.
Instead of a hardcoded list of update timings (42b7590), base speed on level + grid size.
In hip mode, an even more elaborate way would be to include the ratio of open/blocked cells.
Have to score a heart to reset score. Should always reset new game score to 0.
Game crashes when trying to wrap around in bottom left corner.
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.