Hello folks! Welcome to this tutorial on developing the classic Snake game using ReactJS.
I've been working with technology for over six years now...
For further actions, you may consider blocking this person and/or reporting abuse
If you try to reverse the direction, the snake bugs the hell out of itself and the game's over 😅
Yeah, that was intentional. What I can do is - skip the opposite direction action.
Snake is a game in which the snake moves continuously so two direction changes are possible at a time;
As an example, if the snake is moving right you cannot go right nor left (so the current axis of movement is disabled).
Also, based on my past experience creating a snake game, you'll probably need a key buffer because if you hit two directions too fast (reads: faster than a step in the game) you'll have the same result as now reversing the direction.
What's simple gets more complicated when you think of the details of it in seek of perfection 😂
I agree. There is no limit for improvement or edge case handling. For now, I am happy with this 😁
Use Canvas for best animation
There are a few minor errors, but that's not a big deal. Thank you for sharing.
Keep up the good work.
Thank you
Love it!
I'm glad.
ficou muito legal, parabens!!!
obrigado!
Nice game 😍
Thanks
Amazing work ma man!
Thanks man.
wtf why React? It's a vanilla JS application.
Just for fun :)