Uploaded August 2025 | Updated September 2026, 2 weeks ago
In this video, I'll walk you through the process of coding the rotating snakes optical illusion, a captivating visual trick that seems to make static images spin. We'll use JavaScript and HTML Canvas to bring this illusion to life, diving into the details of how to create the rotating effect that plays with your mind. By the end of this tutorial, you’ll have a visually stunning project to share and a solid understanding of how to implement complex patterns with JavaScript. Let’s get started and make those snakes spin... without even writing a single line of animation code!
In this video, I'll walk you through the process of coding the rotating snakes optical illusion, a captivating visual trick that seems to make static images spin. We'll use JavaScript and HTML Canvas to bring this illusion to life, diving into the details of how to create the rotating effect that plays with your mind. By the end of this tutorial, you’ll have a visually stunning project to share and a solid understanding of how to implement complex patterns with JavaScript. Let’s get started and make those snakes spin... without even writing a single line of animation code!








![Procedural Sounds for Games with JavaScript and WebAudioAPI [Understanding AI - Lesson 9 / 15]
PLAYLIST: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81
Welcome to Lesson 9 of the Understanding AI course, where Ill guide you through the exciting process of creating procedurally generated racing game sounds using JavaScript and the WebAudioAPI. In this video, Ill teach you how to generate sound from scratch, starting with a simple beeping noise that we can play at different frequencies. Well then dive into the intricacies of creating dynamic engine noises for our racing game.
These procedurally generated sounds arent limited to our project alone – you can use them in any of your creative endeavors. However, Ill demonstrate how to seamlessly integrate these sounds into our racing game with self-driving cars. Imagine the beeps enhancing your countdown timer and the engine noise dynamically changing based on the cars actions in the game.
So, get ready for some sound advice! Well explore the world of sound generation in JavaScript, adding an auditory dimension to our gaming experience. Join me in this immersive lesson, and lets make our racing game truly come to life with unique, procedurally generated sounds. Dont forget to like, share, and subscribe for more lessons on AI, game development, and creative sound design!
💻CODE FOR THE RACING GAME PART💻
https://github.com/gniziemazity/understanding_ai
Follow Along: 4. Racing Game
Code After This Lesson: 5. Procedural Sound
💬DISCORD💬
discord.gg/gJFcF5XVn9
⭐LINKS⭐
Self-driving Car Course: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYoJE7ZwsBQoDIG4YN9ptyY
#RacingGame #RacingGameJavaScript #GameSound #RacingGameSounds #RacingSoundsJavaScript #LearnJavaScript
⭐TIMESTAMPS⭐
00:00 Introduction
01:12 Basic Project Setup
01:57 Using the WebAudioAPI
04:38 Visualizing Sounds
08:40 Debugging
11:30 Envelopes
16:56 Engine Noise
22:41 Finalizing the Sound functions
23:44 Adding the Sound to the Racing Game Procedural Sounds for Games with JavaScript and WebAudioAPI [Understanding AI - Lesson 9 / 15]](https://i.ytimg.com/vi/yfscQFZcGIc/mqdefault.jpg)

