Snake tutorial in p5.js #2 | The food object & the tail

Опубликовано: 30 Март 2026
на канале: Colorful Coding
1,000
16

This tutorial is the second of three in a series covering how to code a snake game in the JavaScript library p5.js. In this second tutorial, you will learn how to create the food object and how to make the tail longer.

If you want the source code from these tutorials and animations on Instagram (or just want to support my channel), follow the link below and become a Patreon. You will also get access to daily support, so you can solve your problems in no time.
  / colorfulcoding  

Fiverr:
https://www.fiverr.com/colorfulcoding

If you want more examples of things you can do in p5.js, just head over to Instagram.
  / colorfulcoding  

If you don't know how to get started with p5.js, here's a video covering that:
   • Get started with p5.js in 8 easy steps | t...  

p5.js documentation:
https://p5js.org/reference/

If you have any questions or requests for future projects, feel free to leave a comment below 👇