Build a Snake Game in JavaScript using Functional Programming concepts. No libraries are used in this JavaScript tutorial.
💻 Source code: https://github.com/chrokh/snake
Created by Christopher Okhravi.
🔗Check out his YouTube channel: https://www.youtube.com/channel/UCbF-4yQQAWw-UnuCd2Azfzg
—
Learn to code for free and get a developer job: https://www.freecodecamp.com
Read hundreds of articles on programming: https://medium.freecodecamp.com
And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp
Original source
29 responses to “JavaScript Snake Game Tutorial Using Functional Programming”
Want to learn to code snake in Python? https://youtu.be/CD4qAhfFuLo
This guy run a great YouTube channel. He is able to elucidate difficult stuff.
You are a great speaker 👍
this looks awesome and all but in parts you speak entirely too fast and it becomes jumbled
sadly i don't see your folder set up ..
just how you have it presented in node terminal and already-written code
would help tremendously to do this project from the beginning T_T not when its finished
Gotta love this channel 😍
It's not a game but I implemented a simple application using FP concepts with JavaScript. It's a pomodoro timer
PomoLambda: https://github.com/leandrotk/pomo-lambda
https://github.com/KarthikNedunchezhiyan/MultiLevel-Snake-Game share your suggestions, i have made snake game using js
I'm interested in learning more about functional programming.
Are there any performance implications of using functional programming for games?
Any reason for not using webpack? That will handle your import export and then use Babel to compile your code for cross browser support
Could someone please explain me line 'const step = t1 => t2 => {…'
are t1 and t2 both arguments of step fucntion and if they were, why wasnt it written line 'const step = (t1, t2) => {…'
Thanks.
I think I know javascript, sorry, my bad 🙂
"The interwebs."
He said "The Interwebs."
9/10 video, needs more snakes
thanks for this video? could you please tell me how to show grid lines in snake's background, so to predict in which row it is.
in short, To show rows and columns cells/squares.
This exercise was amazing, i learned functional programming basics while watching!
You could do a deep equality check of two objects using the JSON.stringify function in your example. JSON.stringify(obj1) === JSON.stringify(obj2).
Thanks I made this http://www.sketchalgorithms.com/games/snake-game
awesome! watched several snake video on youtube, they all pretty shitty in comparison to this one. good job.
I'm a little confused. JS does have currying, and partial application.
Hi there 🙂 good video explaining everything 🙂 Just wondering maybe any food respawn update ? 🙂 now food sometimes respaws on the snake body, tryed to accomplish it but sadly could not …
I really liked this, useful to see the functional programming concepts integrated with 2 different UIs.
I would love to see him again do an application with backend persistence.
boss level lecture
better than my versity teacher
Mr Bean knowns javascript
super explanation of basic snake game
Amazing video for someone who is new to game logic. Thank you, Chris!
this guy was amazing, more!
haha…go for game engine like ue4,godot,unity still coding
Just curious as to what level of knowledge i would need in javascript to be able to do something like this on my own. Like beginner/ intermediate/advanced
You are a really great speaker! Have you spoken at any conferences?
great tutorial. thanks for the upload.