Getting started with Snake
by winnie
Just started with a random tutorial from “Coding Train” that uses p5.js to recreate SNAKE. Seemed like a good start. The presenter is very ADHD though. Very jumpy which can be super annoying, especially when he does not mention an error in the code until 10 minutes after it was made. Setup the environment and only programmed the movement and boundaries so far.
I got the feeling I understood what the code does logically, also got the feeling I do NOT understand the Syntax. The Syntax seems very slim, but also p5.js seems very powerful. We are already making use of its functions such as the constrain() in order to constrain (duh) the Snake in the canvas.
I will see if I can find out myself how I can change it to Snake 2 boundaries, where the snake is not stopped by walls and instead shows up on the opposite side wall.