- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Learn How to Code a Classic Snake Game (Part 2 of 4)
Hey, this is Greg and welcome back to Part 2 of this 4 part programming learning series in which I show you How to Code a Classic Snake Game from Start to Finish in MIT Scratch. In part 1 of this series, we created our snake head, we set up some game flow variables, and we built out a grid-based movement system and a gameboard which can be dynamically-resized. So, if you want to check that out then I will link it up above and also in the comments down below, but now let's go ahead and continue on to part 2 where we are going to make sure our snake head rotates when it turns, we're going to set up a script for randomly placing food pellets on the screen at set intervals, we are going to tackle the problem of how to we add body segments to our snake and get them to follow our snake as it turns and moves around the board and we'll also get into things like detecting collisions and adding sound fx. Okay, so let's pick up we're we left off after part 1 and jump back into this fun coding project.
Some key moments in this video:
1:10 Getting the snake head to rotate
3:30 Randomly placing food for the snake to eat
4:42 The food placement strategy
6:00 The food placement code
9:20 Turning food placement into a custom block
13:28 Deciding when new food gets placed on screen
16:35 Adding Body Segments
17:34 Tracking Snake Movement with a List
18:11 More Game Organization via Custom Blocks
19:28 Tracking Body Segment Count
21:45 How do we know where to place new body segments?
25:35 Using the Position List + Segment Count to Determine new Segment Placment
37:20 Controlling Body Segement Movement
41:25 Broadcast vs. Broadcast and wait
42:50 Adding Sound FX
46:25 Adding Collisions and Game Over Conditions
56:42 Debugging Body Segment Position Glitch
Want to play a finished version of this game? https://scratch.mit.edu/projects/631302216/
Check out the other part of this Coding a Snake Game Learning Series:
Coding a Snake Game Part 1 -- https://www.youtube.com/watch?v=5ezXsDogFiU
Coding a Snake Game Part 3 -- https://youtu.be/JCVOItQNPr4
Coding a Snake Game Part 4 -- https://youtu.be/bHKqp6hcYuQ
Видео Learn How to Code a Classic Snake Game (Part 2 of 4) канала Learning With Greg
Some key moments in this video:
1:10 Getting the snake head to rotate
3:30 Randomly placing food for the snake to eat
4:42 The food placement strategy
6:00 The food placement code
9:20 Turning food placement into a custom block
13:28 Deciding when new food gets placed on screen
16:35 Adding Body Segments
17:34 Tracking Snake Movement with a List
18:11 More Game Organization via Custom Blocks
19:28 Tracking Body Segment Count
21:45 How do we know where to place new body segments?
25:35 Using the Position List + Segment Count to Determine new Segment Placment
37:20 Controlling Body Segement Movement
41:25 Broadcast vs. Broadcast and wait
42:50 Adding Sound FX
46:25 Adding Collisions and Game Over Conditions
56:42 Debugging Body Segment Position Glitch
Want to play a finished version of this game? https://scratch.mit.edu/projects/631302216/
Check out the other part of this Coding a Snake Game Learning Series:
Coding a Snake Game Part 1 -- https://www.youtube.com/watch?v=5ezXsDogFiU
Coding a Snake Game Part 3 -- https://youtu.be/JCVOItQNPr4
Coding a Snake Game Part 4 -- https://youtu.be/bHKqp6hcYuQ
Видео Learn How to Code a Classic Snake Game (Part 2 of 4) канала Learning With Greg
learn how to code a classic snake game learn how to program the classic snake game in scratch programming a snake game coding a classic snake game coding a snake game in scratch classic snake game tutorial snake game tutorial how to make a classic snake game scratch tutorial beginner programming tutorail learn how to code snake game how to code a snake game scratch tutorial game easy
Комментарии отсутствуют
Информация о видео
20 мая 2022 г. 21:15:01
01:00:04
Другие видео канала




















