title
Unity Game Dev Full Tutorial - 3D Snake Game

description
Learn to create a 3D snake game with Unity in this complete tutorial for beginners. Assets for Tutorial: https://github.com/AwesomeTuts/3d-snake-tutorial/blob/master/3D%20Snake%20Assets.zip Tutorial covers: 1. Importing Assets And Preparing Our Gameplay Scene 2. Moving The Snake 3. Controlling The Snakes Movement 4. Detecting Collision And Adding Collectable Items 5. Wrapping Up Our Game Tutorial created by Awesome Tuts. Check out Awesome Tuts Youtube channel: https://www.youtube.com/channel/UC5c-DuzPdH9iaWYdI0v0uzw On the Awesome Tuts website, you can learn to create a game in 40 minutes: https://www.awesometuts.com/from-scratch-to-game-ws -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://medium.freecodecamp.org

detail
{'title': 'Unity Game Dev Full Tutorial - 3D Snake Game', 'heatmap': [], 'summary': 'This tutorial covers unity game development for a 3d snake game, including importing assets, setting up lighting, creating game objects, developing game mechanics, implementing player input, movement logic, collision detection, and ui creation, with a focus on specific settings and scripts for optimal gameplay.', 'chapters': [{'end': 285.332, 'segs': [{'end': 84.652, 'src': 'embed', 'start': 51.151, 'weight': 0, 'content': [{'end': 55.394, 'text': 'So drag and drop them right here inside of the project tab.', 'start': 51.151, 'duration': 4.243}, {'end': 66.5, 'text': 'And of course, we will need to wait for Unity to take mercy upon us and import all of these assets.', 'start': 55.594, 'duration': 10.906}, {'end': 71.023, 'text': 'So let us wait one moment more.', 'start': 66.98, 'duration': 4.043}, {'end': 73.364, 'text': 'And finally, they are here.', 'start': 71.163, 'duration': 2.201}, {'end': 79.088, 'text': "So in this video, I'm going to set up our main or gameplay scene.", 'start': 74.025, 'duration': 5.063}, {'end': 82.751, 'text': "And we're going to do that by going inside of the prefabs folder.", 'start': 79.689, 'duration': 3.062}, {'end': 84.652, 'text': 'And here we have our level.', 'start': 82.871, 'duration': 1.781}], 'summary': 'In the video, the speaker sets up the main gameplay scene in unity by importing assets and accessing the level prefab.', 'duration': 33.501, 'max_score': 51.151, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc51151.jpg'}, {'end': 183.109, 'src': 'embed', 'start': 156.227, 'weight': 4, 'content': [{'end': 161.369, 'text': 'This means if we take this directional light and if I even change it a little bit.', 'start': 156.227, 'duration': 5.142}, {'end': 166.813, 'text': 'so if I change the rotation from 50 to 71, It will rebake lightning.', 'start': 161.369, 'duration': 5.444}, {'end': 170.436, 'text': 'it will try to simulate lightning and that takes time.', 'start': 166.813, 'duration': 3.623}, {'end': 175.021, 'text': "That's the reason why I have turned this off.", 'start': 170.456, 'duration': 4.565}, {'end': 183.109, 'text': 'It will try to rebuild the lightning settings, which will take a lot, a lot of time for us.', 'start': 175.161, 'duration': 7.948}], 'summary': 'Changing directional light rotation from 50 to 71 triggers lightning rebake, consuming significant time.', 'duration': 26.882, 'max_score': 156.227, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc156227.jpg'}, {'end': 263.399, 'src': 'embed', 'start': 235.381, 'weight': 2, 'content': [{'end': 237.543, 'text': 'For our directional light two.', 'start': 235.381, 'duration': 2.162}, {'end': 249.611, 'text': "so this one right here I'm going to set the Y rotation at 43, And do we want to set here 0.3 for the intensity or something like this?", 'start': 237.543, 'duration': 12.068}, {'end': 252.733, 'text': 'Because now we are casting shadows here on the side.', 'start': 250.211, 'duration': 2.522}, {'end': 255.394, 'text': 'And of course this all depends on the intensity.', 'start': 252.793, 'duration': 2.601}, {'end': 256.695, 'text': 'It depends on the lightning.', 'start': 255.434, 'duration': 1.261}, {'end': 260.036, 'text': 'I can also pump up the intensity which will be something like this.', 'start': 256.935, 'duration': 3.101}, {'end': 263.399, 'text': 'Which is something you use to kill vampires in your game.', 'start': 260.137, 'duration': 3.262}], 'summary': 'Adjusting directional light y rotation to 43 for casting shadows, intensity set at 0.3 to control lighting and shadows.', 'duration': 28.018, 'max_score': 235.381, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc235381.jpg'}], 'start': 0.563, 'title': 'Importing assets and lighting setup in unity', 'summary': 'Covers importing assets into a 3d project in unity and setting up the main gameplay scene, as well as setting up directional lights, adjusting rotations and intensities, and caution against lengthy light rebaking due to time consumption and computer strain.', 'chapters': [{'end': 156.127, 'start': 0.563, 'title': 'Importing assets and setting up gameplay scene', 'summary': 'Discusses the process of importing assets into a 3d project in unity, including the steps to import various asset types and set up the main gameplay scene.', 'duration': 155.564, 'highlights': ['Importing assets for a new 3D project in Unity The speaker guides through the process of importing assets for a new 3D project in Unity, including the steps to select the project type, name the project, save it, and import the assets.', 'Steps to import various asset types The transcript provides a detailed walkthrough of importing different asset types such as fonts, materials, models, prefabs, sounds, and textures into the Unity project.', 'Setting up the main gameplay scene The chapter explains the process of setting up the main gameplay scene by dragging and dropping the assets into the project tab and then arranging the level prefab within the hierarchy panel.', 'Adjusting lighting settings for the scene The speaker demonstrates how to adjust the lighting settings by accessing the lightning tab, unchecking the auto generate option, and explaining the purpose of this action in Unity.']}, {'end': 285.332, 'start': 156.227, 'title': 'Lighting setup in unity', 'summary': 'Covers the process of setting up directional lights in unity, including adjusting rotations and intensities, with a caution against lengthy light rebaking due to time consumption and computer strain.', 'duration': 129.105, 'highlights': ['The rebaking of lightning settings can be time-consuming and resource-intensive, leading to computer strain and longer wait times.', 'Setting the rotation of directional light and adjusting its intensity can significantly impact the visual quality of the scene.', 'Exploring different intensities and shadow effects of directional lights can be crucial in determining the visual atmosphere of the game environment.']}], 'duration': 284.769, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc563.jpg', 'highlights': ['Steps to import various asset types The transcript provides a detailed walkthrough of importing different asset types such as fonts, materials, models, prefabs, sounds, and textures into the Unity project.', 'Setting up the main gameplay scene The chapter explains the process of setting up the main gameplay scene by dragging and dropping the assets into the project tab and then arranging the level prefab within the hierarchy panel.', 'Setting the rotation of directional light and adjusting its intensity can significantly impact the visual quality of the scene.', 'Exploring different intensities and shadow effects of directional lights can be crucial in determining the visual atmosphere of the game environment.', 'The rebaking of lightning settings can be time-consuming and resource-intensive, leading to computer strain and longer wait times.']}, {'end': 902.799, 'segs': [{'end': 338.164, 'src': 'embed', 'start': 285.832, 'weight': 0, 'content': [{'end': 288.474, 'text': "But here I've just used this directional light.", 'start': 285.832, 'duration': 2.642}, {'end': 291.576, 'text': 'I can actually remove this one so we can leave it at one.', 'start': 288.514, 'duration': 3.062}, {'end': 297.499, 'text': 'You can play with intensity if you want to, but I will leave it at one and the rotation is perfect.', 'start': 292.276, 'duration': 5.223}, {'end': 301.26, 'text': 'I have turned off the duplicate, by the way, and it looks nice.', 'start': 297.579, 'duration': 3.681}, {'end': 302.481, 'text': 'It looks pretty nice.', 'start': 301.681, 'duration': 0.8}, {'end': 305.022, 'text': 'If I go in the game, this is how it looks like.', 'start': 302.501, 'duration': 2.521}, {'end': 309.244, 'text': 'And by the way, for the main camera, Here it is.', 'start': 305.503, 'duration': 3.741}, {'end': 311.926, 'text': 'The Z axis is going to be zero.', 'start': 309.865, 'duration': 2.061}, {'end': 316.489, 'text': 'The Y axis is going to be one, something like this.', 'start': 312.447, 'duration': 4.042}, {'end': 320.472, 'text': 'And also the far for clipping planes.', 'start': 316.829, 'duration': 3.643}, {'end': 322.653, 'text': "I'm going to set it at 10, something like this.", 'start': 320.572, 'duration': 2.081}, {'end': 330.558, 'text': 'This, what I did for the clipping planes, it will simply, if I pump it up, pay attention to these parts right here.', 'start': 323.314, 'duration': 7.244}, {'end': 333.84, 'text': 'Let me just demonstrate which parts do I mean.', 'start': 331.059, 'duration': 2.781}, {'end': 338.164, 'text': 'Come on, highlight tool, where it is? Here it is.', 'start': 334.941, 'duration': 3.223}], 'summary': 'Adjust directional light and main camera settings for better visuals and performance.', 'duration': 52.332, 'max_score': 285.832, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc285832.jpg'}, {'end': 809.409, 'src': 'embed', 'start': 776.588, 'weight': 3, 'content': [{'end': 777.529, 'text': 'We have the level.', 'start': 776.588, 'duration': 0.941}, {'end': 781.412, 'text': "I'm gonna drag and drop the snake in the snake prefab folder.", 'start': 777.669, 'duration': 3.743}, {'end': 785.234, 'text': 'So for the snake we have an empty parent top game object.', 'start': 781.452, 'duration': 3.782}, {'end': 786.896, 'text': 'We also have the head.', 'start': 785.595, 'duration': 1.301}, {'end': 788.917, 'text': 'Which is this one right here.', 'start': 787.536, 'duration': 1.381}, {'end': 790.758, 'text': 'Or this one right here.', 'start': 789.478, 'duration': 1.28}, {'end': 793.981, 'text': 'The top one or the largest part of the snake.', 'start': 790.799, 'duration': 3.182}, {'end': 794.842, 'text': 'We have the node.', 'start': 794.021, 'duration': 0.821}, {'end': 796.363, 'text': 'This one I just named node.', 'start': 794.862, 'duration': 1.501}, {'end': 799.045, 'text': "Because it's the second body part of the snake.", 'start': 796.423, 'duration': 2.622}, {'end': 800.205, 'text': 'And we have the tail.', 'start': 799.325, 'duration': 0.88}, {'end': 801.506, 'text': 'So every next..', 'start': 800.606, 'duration': 0.9}, {'end': 809.409, 'text': 'game object that we add, because you know, when we eat our fruit, the game object or the snake will grow larger.', 'start': 802.407, 'duration': 7.002}], 'summary': 'Tutorial on creating snake game objects for growth.', 'duration': 32.821, 'max_score': 776.588, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc776588.jpg'}], 'start': 285.832, 'title': 'Adjusting light and creating game object', 'summary': 'Covers adjusting directional light intensity, rotation, camera settings, and creating a snake game object with positioning, scaling, colliders, and the need for proper naming and settings to avoid self-collision, emphasizing setting the far clipping plane at 10 for optimal visibility.', 'chapters': [{'end': 362.962, 'start': 285.832, 'title': 'Adjusting directional light and camera settings', 'summary': 'Demonstrates adjusting the directional light intensity, rotation, and the main camera settings including z and y axes and far clipping planes to improve the visual appearance and field of view in the game, with emphasis on setting the far clipping plane at 10 for optimal visibility.', 'duration': 77.13, 'highlights': ['The far clipping plane for the main camera should be set at 10 for optimal visibility and the Y axis should be set at one for an improved visual appearance.', 'Adjusting the directional light intensity and rotation can enhance the overall visual appearance in the game.', 'Turning off duplicate elements and utilizing a directional light with an intensity set at one can significantly improve the visual aesthetics in the game.']}, {'end': 902.799, 'start': 363.042, 'title': 'Creating snake game object', 'summary': 'Describes the process of creating a snake game object, including positioning, scaling, adding colliders, rigid bodies, and triggers, in preparation for the game, with emphasis on the need for proper naming and settings to avoid self-collision. it also mentions the addition of direction lights.', 'duration': 539.757, 'highlights': ['The process of creating a snake game object involves positioning, scaling, and naming different parts such as head, node, and tail, with specific dimensions and placement to form the snake. The chapter emphasizes the need for proper naming and settings to avoid self-collision, mentioning the addition of colliders, rigid bodies, and triggers for each part.', 'The addition of direction lights is briefly mentioned as part of the game preparation process.']}], 'duration': 616.967, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc285832.jpg', 'highlights': ['The far clipping plane for the main camera should be set at 10 for optimal visibility and the Y axis should be set at one for an improved visual appearance.', 'Adjusting the directional light intensity and rotation can enhance the overall visual appearance in the game.', 'Turning off duplicate elements and utilizing a directional light with an intensity set at one can significantly improve the visual aesthetics in the game.', 'The process of creating a snake game object involves positioning, scaling, and naming different parts such as head, node, and tail, with specific dimensions and placement to form the snake. The chapter emphasizes the need for proper naming and settings to avoid self-collision, mentioning the addition of colliders, rigid bodies, and triggers for each part.']}, {'end': 1907.883, 'segs': [{'end': 935.515, 'src': 'embed', 'start': 902.839, 'weight': 0, 'content': [{'end': 907.981, 'text': 'This is our snake in the middle of our screen and we need to start moving the snake.', 'start': 902.839, 'duration': 5.142}, {'end': 916.045, 'text': 'In order to do that, we need to go in our project tab and right click and create a new folder,', 'start': 909.002, 'duration': 7.043}, {'end': 927.508, 'text': "and this one is going to be our scripts folder and inside of this one, right click, and I'm going to create here folder for helper scripts.", 'start': 916.045, 'duration': 11.463}, {'end': 935.515, 'text': "Now for our helper scripts, the first script that we need to create is our script that's going to hold our tags.", 'start': 928.429, 'duration': 7.086}], 'summary': 'Creating a scripts folder with helper scripts for a snake game.', 'duration': 32.676, 'max_score': 902.839, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc902839.jpg'}, {'end': 1027.305, 'src': 'embed', 'start': 972.383, 'weight': 1, 'content': [{'end': 975.665, 'text': 'Anyways, The tags here will represent the tags.', 'start': 972.383, 'duration': 3.282}, {'end': 976.706, 'text': 'So we have the walls.', 'start': 975.685, 'duration': 1.021}, {'end': 982.629, 'text': 'So when we collide with them, we will check if the collision happened with a game object that has a tag wall.', 'start': 977.166, 'duration': 5.463}, {'end': 986.211, 'text': 'When we pick up a fruit, we will check that with the tag as well.', 'start': 983.109, 'duration': 3.102}, {'end': 989.233, 'text': 'So these are the tags for our game object.', 'start': 986.251, 'duration': 2.982}, {'end': 994.076, 'text': 'And here we can say tail with small T or AIL.', 'start': 989.513, 'duration': 4.563}, {'end': 995.656, 'text': 'I wrote it all caps.', 'start': 994.376, 'duration': 1.28}, {'end': 997.798, 'text': 'And for our metrics.', 'start': 996.337, 'duration': 1.461}, {'end': 1005.561, 'text': 'so these are the metrics that we are going to use to position and move our nodes inside of our game or to move the snake.', 'start': 997.798, 'duration': 7.763}, {'end': 1006.582, 'text': 'we will see that.', 'start': 1005.561, 'duration': 1.021}, {'end': 1008.383, 'text': 'do not worry about that.', 'start': 1006.582, 'duration': 1.801}, {'end': 1015.786, 'text': 'And this is a public enumeration to determine if we are moving left, up, right down.', 'start': 1009.623, 'duration': 6.163}, {'end': 1022.599, 'text': 'And this is the count eg or it will show us how many movements do we have.', 'start': 1016.106, 'duration': 6.493}, {'end': 1025.041, 'text': 'So one, two, three, and four.', 'start': 1022.7, 'duration': 2.341}, {'end': 1027.305, 'text': 'So we have four movements.', 'start': 1025.363, 'duration': 1.942}], 'summary': 'Game involves collision detection with walls and fruit, using tags and metrics for movement and position. it has four movement options.', 'duration': 54.922, 'max_score': 972.383, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc972383.jpg'}, {'end': 1108.733, 'src': 'embed', 'start': 1081.013, 'weight': 3, 'content': [{'end': 1084.756, 'text': "And inside of this folder, I'm going to right click and create a C sharp script.", 'start': 1081.013, 'duration': 3.743}, {'end': 1088.468, 'text': 'Now this one is going to be our player controller.', 'start': 1085.785, 'duration': 2.683}, {'end': 1093.393, 'text': 'This is the dude who needs to be attached on our snake.', 'start': 1088.828, 'duration': 4.565}, {'end': 1098.339, 'text': 'So select the snake, drag and drop our player controller just like this.', 'start': 1093.594, 'duration': 4.745}, {'end': 1101.643, 'text': "I'm going to double click it and open it here in Visual Studio.", 'start': 1098.419, 'duration': 3.224}, {'end': 1102.323, 'text': 'Let me just..', 'start': 1101.723, 'duration': 0.6}, {'end': 1104.867, 'text': 'do my thing as always.', 'start': 1103.124, 'duration': 1.743}, {'end': 1108.733, 'text': "And this is going to be the script that's going to move the player.", 'start': 1105.528, 'duration': 3.205}], 'summary': 'Creating a c# script for player controller to move the snake.', 'duration': 27.72, 'max_score': 1081.013, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1081013.jpg'}, {'end': 1185.095, 'src': 'embed', 'start': 1155.713, 'weight': 4, 'content': [{'end': 1158.076, 'text': 'Now this is the movement interval.', 'start': 1155.713, 'duration': 2.363}, {'end': 1167.344, 'text': 'So we are going to move our game objects or the snake by this movement interval so 0.2.', 'start': 1158.516, 'duration': 8.828}, {'end': 1172.887, 'text': "Now we don't want to move our snakes every frame that is 60 frames in a second.", 'start': 1167.344, 'duration': 5.543}, {'end': 1174.488, 'text': "So we don't want to move it every frame.", 'start': 1172.928, 'duration': 1.56}, {'end': 1176.65, 'text': 'So we need a movement frequency.', 'start': 1174.569, 'duration': 2.081}, {'end': 1185.095, 'text': "So here I'm going to say public float movement frequency like this, which is going to be equal to 0.1.", 'start': 1176.69, 'duration': 8.405}], 'summary': 'Setting movement interval for game objects to 0.2 and movement frequency to 0.1', 'duration': 29.382, 'max_score': 1155.713, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1155713.jpg'}, {'end': 1427.83, 'src': 'embed', 'start': 1398.149, 'weight': 5, 'content': [{'end': 1400.75, 'text': 'So the top parent, which is the empty game object.', 'start': 1398.149, 'duration': 2.601}, {'end': 1406.554, 'text': 'So this one right here that we currently have selected in the hierarchy, we have that one selected.', 'start': 1400.77, 'duration': 5.784}, {'end': 1411.557, 'text': 'That is the, or the one that we are getting its rigid body by using get component.', 'start': 1406.634, 'duration': 4.923}, {'end': 1417.88, 'text': 'The next thing that we need to do is we need to call here initSnakeNodes.', 'start': 1413.055, 'duration': 4.825}, {'end': 1420.262, 'text': 'Now, this is a function that we still did not create.', 'start': 1417.92, 'duration': 2.342}, {'end': 1424.146, 'text': 'And right below that function, we are also going to call initPlayer.', 'start': 1420.402, 'duration': 3.744}, {'end': 1427.83, 'text': 'And this is also a function that we still did not create.', 'start': 1425.007, 'duration': 2.823}], 'summary': 'Initializing functions for game components.', 'duration': 29.681, 'max_score': 1398.149, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1398149.jpg'}, {'end': 1760.058, 'src': 'embed', 'start': 1735.897, 'weight': 6, 'content': [{'end': 1742.385, 'text': 'we need to shift the position of this node over here and this node over here,', 'start': 1735.897, 'duration': 6.488}, {'end': 1746.728, 'text': 'because then we are going to move to the right or actually to the left side.', 'start': 1742.385, 'duration': 4.343}, {'end': 1750.03, 'text': "excuse me, I'm moving to the left, but assume that I said left.", 'start': 1746.728, 'duration': 3.302}, {'end': 1759.017, 'text': 'So if we are moving to the left side, we shift their positions to the right side by using plus.', 'start': 1750.451, 'duration': 8.566}, {'end': 1760.058, 'text': 'Now let me demonstrate that.', 'start': 1759.097, 'duration': 0.961}], 'summary': 'Shifting nodes to the right for leftward movement.', 'duration': 24.161, 'max_score': 1735.897, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1735897.jpg'}, {'end': 1816.657, 'src': 'embed', 'start': 1782.457, 'weight': 7, 'content': [{'end': 1787.56, 'text': 'If we need to start moving to the left position with our snake, that means we are going to this side.', 'start': 1782.457, 'duration': 5.103}, {'end': 1793.204, 'text': 'And we know that the head, so this bad boy over here, he needs to be at the top.', 'start': 1787.92, 'duration': 5.284}, {'end': 1797.427, 'text': 'So he needs to be the leading node in our snake.', 'start': 1793.304, 'duration': 4.123}, {'end': 1804.33, 'text': 'In order to do that, we need to shift this node over here and we need to shift this node over here.', 'start': 1797.947, 'duration': 6.383}, {'end': 1807.112, 'text': 'And this is exactly what we are doing right here.', 'start': 1804.831, 'duration': 2.281}, {'end': 1816.657, 'text': "So if we need to move to the left side, use the node that's at element one and use the element zero node, which is the head.", 'start': 1807.492, 'duration': 9.165}], 'summary': 'Shifting nodes to move snake left. utilize elements 0 and 1.', 'duration': 34.2, 'max_score': 1782.457, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1782457.jpg'}, {'end': 1885.227, 'src': 'embed', 'start': 1859.513, 'weight': 8, 'content': [{'end': 1864.534, 'text': 'Now we are going to do, or everything that we explained here, for the left side applies to the right side,', 'start': 1859.513, 'duration': 5.021}, {'end': 1866.995, 'text': 'except while the right side is opposite to the left.', 'start': 1864.534, 'duration': 2.461}, {'end': 1872.498, 'text': 'For our up side, we are going to do the same thing except for the Y axis.', 'start': 1867.535, 'duration': 4.963}, {'end': 1878.683, 'text': 'So for the Y side, we are going to say minus, but our metrics node is going to be on the Y.', 'start': 1872.899, 'duration': 5.784}, {'end': 1884.286, 'text': 'So zero for the zero F for X, and we are going to move that one on the Y.', 'start': 1878.683, 'duration': 5.603}, {'end': 1885.227, 'text': 'And same thing here.', 'start': 1884.286, 'duration': 0.941}], 'summary': 'Instructions for mirroring actions on left and right sides, and on y axis.', 'duration': 25.714, 'max_score': 1859.513, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1859513.jpg'}], 'start': 902.839, 'title': 'Snake game development', 'summary': 'Covers creating helper scripts for the snake game, including new folder creation, script development, and tag explanation. it also details the process of creating a player controller script in unity, covering variables such as movement interval and frequency, as well as initializing player movement in different directions.', 'chapters': [{'end': 1053.758, 'start': 902.839, 'title': 'Creating helper scripts for snake game', 'summary': 'Entails creating a new folder for helper scripts, creating a script to hold tags and default variables for the game, and explaining the purpose of the tags and metrics used in the script.', 'duration': 150.919, 'highlights': ['Creating a new folder for helper scripts The chapter starts by creating a new folder for helper scripts in the project tab, which is an essential step for organizing the scripts for the snake game.', "Explanation of tags and metrics for the game The script 'tags' is created to hold tags and default variables for the game, including the representation of walls, fruits, tail, and metrics for positioning and moving nodes in the game.", "Definition of public enumeration for movements The public enumeration is defined to determine movements (left, up, right, down) and the count (four movements), providing a clear structure for the game's movement mechanics."]}, {'end': 1578.901, 'start': 1053.918, 'title': 'Creating player controller script in unity', 'summary': 'Covers the process of creating a player controller script in unity for moving the snake, including the creation of variables such as movement interval, movement frequency, and the initialization of snake nodes and player components.', 'duration': 524.983, 'highlights': ['The chapter covers the process of creating a player controller script in Unity for moving the snake The transcript discusses the creation of a player controller script in Unity for moving the snake, which forms the core focus of the tutorial.', 'Creation of variables such as movement interval and movement frequency The tutorial explains the creation of variables including movement interval and movement frequency, set at 0.2f and 0.1 respectively, to control the movement of the snake.', 'Initialization of snake nodes and player components The transcript details the initialization of snake nodes and player components, such as the head body and main body, which are essential in the functioning of the player controller script.']}, {'end': 1907.883, 'start': 1578.901, 'title': 'Initializing player movement', 'summary': "Focuses on initializing the player's movement in a game, detailing the shifting of positions for different directions (left, right, up, and down) based on the game's starting position, and the displacement of nodes relative to the head for each direction.", 'duration': 328.982, 'highlights': ['Explaining the shifting of positions for different directions based on the starting position of the game, demonstrating the code for shifting positions to the left and right sides. Code examples for shifting positions to the left and right sides.', 'Describing the specific shifting of the head and tail nodes for the left direction, emphasizing the displacement of nodes relative to the head for positioning. Detailing the code for shifting the head and tail nodes for the left direction.', 'Illustrating the application of the same principles for the right side, with the opposite effect to the left side, and explaining the adjustments for the Y axis in the up direction. Explanation of the application of principles for the right side and adjustments for the Y axis in the up direction.']}], 'duration': 1005.044, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc902839.jpg', 'highlights': ['The chapter starts by creating a new folder for helper scripts in the project tab, which is an essential step for organizing the scripts for the snake game.', "The script 'tags' is created to hold tags and default variables for the game, including the representation of walls, fruits, tail, and metrics for positioning and moving nodes in the game.", "The public enumeration is defined to determine movements (left, up, right, down) and the count (four movements), providing a clear structure for the game's movement mechanics.", 'The chapter covers the process of creating a player controller script in Unity for moving the snake, which forms the core focus of the tutorial.', 'The tutorial explains the creation of variables including movement interval and movement frequency, set at 0.2f and 0.1 respectively, to control the movement of the snake.', 'The transcript details the initialization of snake nodes and player components, such as the head body and main body, which are essential in the functioning of the player controller script.', 'Explaining the shifting of positions for different directions based on the starting position of the game, demonstrating the code for shifting positions to the left and right sides.', 'Detailing the code for shifting the head and tail nodes for the left direction.', 'Explanation of the application of principles for the right side and adjustments for the Y axis in the up direction.']}, {'end': 2465.82, 'segs': [{'end': 1959.931, 'src': 'embed', 'start': 1907.883, 'weight': 0, 'content': [{'end': 1915.908, 'text': 'So 1, head is 1, node is 2 and multiply that by 2 moving that right over here.', 'start': 1907.883, 'duration': 8.025}, {'end': 1919.775, 'text': 'This is why we are multiplying with 2.', 'start': 1915.988, 'duration': 3.787}, {'end': 1926.097, 'text': 'For our down position, simply copy this code from the up position, paste it here.', 'start': 1919.775, 'duration': 6.322}, {'end': 1928.857, 'text': 'And for the down, we are going to say plus like this.', 'start': 1926.277, 'duration': 2.58}, {'end': 1932.338, 'text': 'And voila, we are good to go.', 'start': 1929.298, 'duration': 3.04}, {'end': 1935.839, 'text': 'Now, of course, we need to create one more function.', 'start': 1932.698, 'duration': 3.141}, {'end': 1941.521, 'text': "So right here above our init player, we're going to create void set direction random.", 'start': 1935.879, 'duration': 5.642}, {'end': 1953.727, 'text': 'And here we are going to say int, direction random or die dir random is going to be equal to random, dot, range from zero up to,', 'start': 1942.781, 'duration': 10.946}, {'end': 1959.931, 'text': "and we need to say here int and we're going to say player direction, dot, count to convert.", 'start': 1953.727, 'duration': 6.204}], 'summary': 'Code includes multiplication by 2, copying from up position, and creating random direction function.', 'duration': 52.048, 'max_score': 1907.883, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1907883.jpg'}, {'end': 2030.504, 'src': 'embed', 'start': 2001.123, 'weight': 3, 'content': [{'end': 2004.225, 'text': 'And notice here we are casting this value to an integer.', 'start': 2001.123, 'duration': 3.102}, {'end': 2009.709, 'text': "And simply here we're going to say direction is going to be equal to dir random.", 'start': 2004.385, 'duration': 5.324}, {'end': 2017.974, 'text': 'Now same way as we can cast these enums to an integer, we can use enumerations to cast integers to enums.', 'start': 2009.749, 'duration': 8.225}, {'end': 2020.516, 'text': 'So we can say here player direction random.', 'start': 2018.014, 'duration': 2.502}, {'end': 2024.679, 'text': "Now, based here on the random value, let's say random value is equal to one.", 'start': 2020.916, 'duration': 3.763}, {'end': 2030.504, 'text': 'So this dir int or dir random value will have a value of one.', 'start': 2025, 'duration': 5.504}], 'summary': 'Casting values to integers and using enumerations to cast integers to enums, with a random value of one.', 'duration': 29.381, 'max_score': 2001.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2001123.jpg'}, {'end': 2295.365, 'src': 'embed', 'start': 2267.948, 'weight': 4, 'content': [{'end': 2276.955, 'text': 'But before that, we also need to create a function here, we need to create a function that is void, check movement frequency.', 'start': 2267.948, 'duration': 9.007}, {'end': 2286.262, 'text': 'And for this function, we are going to say here our counter, so counter plus equals time.deltaTime.', 'start': 2277.916, 'duration': 8.346}, {'end': 2290.463, 'text': 'We know that time.deltaTime is the difference between every frame.', 'start': 2286.302, 'duration': 4.161}, {'end': 2295.365, 'text': "So it's the time it takes from one frame to go to another frame.", 'start': 2290.863, 'duration': 4.502}], 'summary': 'Creating a void function to check movement frequency using time.deltatime.', 'duration': 27.417, 'max_score': 2267.948, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2267948.jpg'}, {'end': 2366.547, 'src': 'embed', 'start': 2320.976, 'weight': 2, 'content': [{'end': 2328.598, 'text': 'We are going to say here void move, or create a function that is going to allow us to move and not on animator move.', 'start': 2320.976, 'duration': 7.622}, {'end': 2331.459, 'text': 'no, simply void move.', 'start': 2328.598, 'duration': 2.861}, {'end': 2337.281, 'text': 'And inside of this function, we are going to create here a vector three deposition.', 'start': 2332.079, 'duration': 5.202}, {'end': 2341.282, 'text': 'This is the delta position we are going to use here, delta position.', 'start': 2337.761, 'duration': 3.521}, {'end': 2344.063, 'text': "So it's actually delta position.", 'start': 2341.562, 'duration': 2.501}, {'end': 2350.364, 'text': 'And we are going to use that by using here an int and we are going to pass here the direction.', 'start': 2344.783, 'duration': 5.581}, {'end': 2354.125, 'text': 'So the delta position or D position is our delta position.', 'start': 2350.764, 'duration': 3.361}, {'end': 2359.266, 'text': 'We are casting the integer or direction to an integer to get it as an index.', 'start': 2354.185, 'duration': 5.081}, {'end': 2366.547, 'text': "So, depending on the index, if we are going to the left side, for example, if we're going to the left side, index will be zero,", 'start': 2359.326, 'duration': 7.221}], 'summary': 'Creating a function to allow movement with delta position and direction indexing.', 'duration': 45.571, 'max_score': 2320.976, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2320976.jpg'}], 'start': 1907.883, 'title': 'Snake game mechanics', 'summary': 'Covers positioning nodes and creating movement functions in the snake game. it details the use of multiplication, randomization, enumerations, casting, delta positions, and movement frequency, with a time interval of 0.2 units.', 'chapters': [{'end': 2129.238, 'start': 1907.883, 'title': 'Snake game: positioning nodes', 'summary': 'Explains the process of positioning nodes in the snake game, including the use of multiplication and randomization to determine the direction of movement, and highlights the use of enumerations and casting in the code.', 'duration': 221.355, 'highlights': ["The process of positioning nodes in the snake game involves using multiplication, where the head is multiplied by 2 to determine the node's position, as explained by the code.", "Randomization is employed to determine the direction of movement, with the code using the 'random.range' function to generate a random direction based on the 'player direction' enumeration, which has a value of four.", "The use of enumerations and casting in the code is highlighted, showcasing how the 'player direction' enumeration is cast to an integer and how integers are cast back to the 'player direction' enumeration to determine the snake's direction."]}, {'end': 2465.82, 'start': 2129.279, 'title': 'Snake movement function', 'summary': 'Discusses the creation of a function to move a game object in a specific direction using delta positions and movement frequency, with a time interval of 0.2 units, and the trigger conditions for enabling movement.', 'duration': 336.541, 'highlights': ['The function void move is created to enable the game object to move using the delta position and updating the positions of the main body, head body, and snake nodes.', 'The function void checkMovementFrequency is defined to track the time interval for movement, with the condition counter >= movement frequency triggering the movement of the game object.', 'Delta positions are established for left, up, right, and down directions with corresponding step lengths, facilitating the movement of the game object in the specified directions.']}], 'duration': 557.937, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc1907883.jpg', 'highlights': ["Randomization is employed to determine the direction of movement using 'random.range' function.", "The process of positioning nodes in the snake game involves using multiplication, where the head is multiplied by 2 to determine the node's position.", 'The function void move is created to enable the game object to move using the delta position and updating the positions of the main body, head body, and snake nodes.', "The use of enumerations and casting in the code is highlighted, showcasing how the 'player direction' enumeration is cast to an integer and how integers are cast back to the 'player direction' enumeration to determine the snake's direction.", 'The function void checkMovementFrequency is defined to track the time interval for movement, with the condition counter >= movement frequency triggering the movement of the game object.', 'Delta positions are established for left, up, right, and down directions with corresponding step lengths, facilitating the movement of the game object in the specified directions.']}, {'end': 3219.244, 'segs': [{'end': 2535.947, 'src': 'embed', 'start': 2499.058, 'weight': 0, 'content': [{'end': 2500.858, 'text': 'This is check movement frequency.', 'start': 2499.058, 'duration': 1.8}, {'end': 2506.841, 'text': "In the update, we're going to calculate our counter by adding to it delta time.", 'start': 2501.259, 'duration': 5.582}, {'end': 2511.942, 'text': 'And if the counter is greater or equal to movement frequency, then we will allow the movement.', 'start': 2507.021, 'duration': 4.921}, {'end': 2521.246, 'text': 'And in the fixed update right below here, so void fixed update, and let me just remove this private because I like it to be void simply.', 'start': 2512.283, 'duration': 8.963}, {'end': 2526.379, 'text': "and in our fixed update we're going to check if move.", 'start': 2522.356, 'duration': 4.023}, {'end': 2535.947, 'text': "so if we can move, then move is equal to false and we're going to call the function move, not fog mode.", 'start': 2526.379, 'duration': 9.568}], 'summary': 'Update counter using delta time to check movement frequency.', 'duration': 36.889, 'max_score': 2499.058, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2499058.jpg'}, {'end': 2598.569, 'src': 'embed', 'start': 2570.563, 'weight': 2, 'content': [{'end': 2572.863, 'text': 'Now, in order to test that and see it in action,', 'start': 2570.563, 'duration': 2.3}, {'end': 2580.505, 'text': "I am going to go back here in Unity and run the game and we're going to see the movement of the snake and then we will go and break it down line by line.", 'start': 2572.863, 'duration': 7.642}, {'end': 2584.866, 'text': 'So when I hit the play button, pay attention to the snake, you see snake is moving by one increment.', 'start': 2580.525, 'duration': 4.341}, {'end': 2586.826, 'text': 'It is gone, we cannot control the snake.', 'start': 2584.986, 'duration': 1.84}, {'end': 2590.747, 'text': 'Notice now if I hit the play button, now snake is going downwards.', 'start': 2587.446, 'duration': 3.301}, {'end': 2595.008, 'text': 'Just a moment ago, first time when we tested out, snake was moving upwards.', 'start': 2590.887, 'duration': 4.121}, {'end': 2597.069, 'text': "I'm going to hit the play button again.", 'start': 2595.588, 'duration': 1.481}, {'end': 2598.569, 'text': 'Hopefully it will move left or right.', 'start': 2597.129, 'duration': 1.44}], 'summary': 'Testing snake movement in unity game, 1 increment, different directions observed.', 'duration': 28.006, 'max_score': 2570.563, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2570563.jpg'}, {'end': 2656.266, 'src': 'embed', 'start': 2628.381, 'weight': 3, 'content': [{'end': 2631.984, 'text': 'Direction is going to determine in which direction our snake is going to go.', 'start': 2628.381, 'duration': 3.603}, {'end': 2639.952, 'text': 'Step length is the frequency or the units, measurement unit by how much units we are going to move every node.', 'start': 2632.345, 'duration': 7.607}, {'end': 2641.074, 'text': 'That is 0.2 units.', 'start': 2640.333, 'duration': 0.741}, {'end': 2646.638, 'text': 'Movement frequency is the how many times we can move in a second.', 'start': 2642.515, 'duration': 4.123}, {'end': 2649.36, 'text': 'So every 0.1 of a second we can move.', 'start': 2646.858, 'duration': 2.502}, {'end': 2652.323, 'text': 'Counter is used to test that out.', 'start': 2649.861, 'duration': 2.462}, {'end': 2656.266, 'text': 'So we are adding to our counter the delta time.', 'start': 2652.563, 'duration': 3.703}], 'summary': 'Snake direction, step length, and movement frequency are being defined for a game, with a step length of 0.2 units and a movement frequency of 0.1 seconds.', 'duration': 27.885, 'max_score': 2628.381, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2628381.jpg'}, {'end': 3090.18, 'src': 'embed', 'start': 3066.947, 'weight': 1, 'content': [{'end': 3075.252, 'text': 'So if I hit the play button again, you will see that the snake will move in the increment or using incremented values.', 'start': 3066.947, 'duration': 8.305}, {'end': 3081.335, 'text': 'Or if we go here, the step length, that is, this is how many units it will use to move.', 'start': 3075.772, 'duration': 5.563}, {'end': 3087.599, 'text': 'So moving forward with our game, we have the snake moving and it is moving in a certain direction.', 'start': 3081.355, 'duration': 6.244}, {'end': 3090.18, 'text': 'The problem is that we cannot control that.', 'start': 3088.039, 'duration': 2.141}], 'summary': 'Snake moves using incremented values, but direction control is lacking.', 'duration': 23.233, 'max_score': 3066.947, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3066947.jpg'}, {'end': 3167.41, 'src': 'embed', 'start': 3140.381, 'weight': 4, 'content': [{'end': 3146.685, 'text': 'So we need a private player controller that we are going to call player controller, of course.', 'start': 3140.381, 'duration': 6.304}, {'end': 3155.604, 'text': 'This is because we need to inform the player controller that we changed the direction where the snake needs to move now.', 'start': 3148.041, 'duration': 7.563}, {'end': 3167.41, 'text': 'We are also going to create a private int horizontal, which by default is equal to zero, and vertical, which by default is equal to zero as well.', 'start': 3156.065, 'duration': 11.345}], 'summary': 'Creating a private player controller to manage snake movement with default horizontal and vertical values as zero.', 'duration': 27.029, 'max_score': 3140.381, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3140381.jpg'}], 'start': 2466.761, 'title': 'Snake movement logic', 'summary': "Explains the logic for controlling the movement of a snake in a game, including checking movement frequency and implementing directional movement based on user input, demonstrated through testing in unity. it also covers the determination of movement direction, step length, movement frequency, and node initialization in a 3d game, along with the initialization of player direction and the need for player input to control the snake's movement.", 'chapters': [{'end': 2628.32, 'start': 2466.761, 'title': 'Snake movement logic', 'summary': 'Explains the logic for controlling the movement of a snake in a game, including checking movement frequency and implementing directional movement based on user input, demonstrated through testing in unity.', 'duration': 161.559, 'highlights': ['The chapter demonstrates the implementation of movement frequency logic in the update function, where the counter is incremented by delta time and movement is allowed when the counter reaches the specified frequency.', "The explanation includes the implementation of directional movement in the fixed update, where the snake's movement is determined based on user input and the function to move the snake is called accordingly.", 'The testing of the snake movement in Unity is described, showcasing the directional movement of the snake based on the implemented logic, with the demonstration of the snake moving upwards, downwards, leftwards, and rightwards.']}, {'end': 3219.244, 'start': 2628.381, 'title': 'Snake movement logic', 'summary': "Explains the logic behind snake movement in a 3d game, including the determination of movement direction, step length, movement frequency, and node initialization. it also covers the initialization of player direction and the need for player input to control the snake's movement.", 'duration': 590.863, 'highlights': ["The chapter explains the logic behind snake movement in a 3D game, including the determination of movement direction, step length, movement frequency, and node initialization. The explanation covers the factors that determine the snake's movement, such as the direction, step length, movement frequency, and node initialization.", "It also covers the initialization of player direction and the need for player input to control the snake's movement. The chapter details the process of initializing player direction and emphasizes the necessity of player input to control the snake's movement."]}], 'duration': 752.483, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc2466761.jpg', 'highlights': ['The chapter demonstrates the implementation of movement frequency logic in the update function, where the counter is incremented by delta time and movement is allowed when the counter reaches the specified frequency.', "The explanation includes the implementation of directional movement in the fixed update, where the snake's movement is determined based on user input and the function to move the snake is called accordingly.", 'The testing of the snake movement in Unity is described, showcasing the directional movement of the snake based on the implemented logic, with the demonstration of the snake moving upwards, downwards, leftwards, and rightwards.', 'The chapter explains the logic behind snake movement in a 3D game, including the determination of movement direction, step length, movement frequency, and node initialization.', "It also covers the initialization of player direction and the need for player input to control the snake's movement. The chapter details the process of initializing player direction and emphasizes the necessity of player input to control the snake's movement."]}, {'end': 4278.427, 'segs': [{'end': 3247.138, 'src': 'embed', 'start': 3220.004, 'weight': 4, 'content': [{'end': 3227.888, 'text': 'Now, inside of the update, the first thing that we need to do is that we need to get our player input.', 'start': 3220.004, 'duration': 7.884}, {'end': 3236.572, 'text': 'But before that, we need to say horizontal is equal to zero and vertical is equal to zero to reset their values.', 'start': 3228.228, 'duration': 8.344}, {'end': 3247.138, 'text': "And now in order to get that input, we need to call a function that we did not create that I'm going to call it get keyboard input like this.", 'start': 3237.153, 'duration': 9.985}], 'summary': 'Updating process requires resetting player input values and calling a function for keyboard input.', 'duration': 27.134, 'max_score': 3220.004, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3220004.jpg'}, {'end': 3355.39, 'src': 'embed', 'start': 3329.112, 'weight': 2, 'content': [{'end': 3340.78, 'text': 'And why did we type this here? Well, if we move horizontal, we need to set vertical at zero and this is to prevent double movement.', 'start': 3329.112, 'duration': 11.668}, {'end': 3345.163, 'text': 'So just to prevent double movement, this is why we are doing it like this.', 'start': 3340.96, 'duration': 4.203}, {'end': 3350.947, 'text': 'Now, in order to test this out, we need to create a function that we will still did not create.', 'start': 3345.763, 'duration': 5.184}, {'end': 3355.39, 'text': 'And this function, let me just type this out here, I remove this curly bracket.', 'start': 3351.247, 'duration': 4.143}], 'summary': 'To prevent double movement, set vertical at zero when moving horizontally. function creation pending.', 'duration': 26.278, 'max_score': 3329.112, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3329112.jpg'}, {'end': 3437.873, 'src': 'embed', 'start': 3406.297, 'weight': 0, 'content': [{'end': 3412.338, 'text': 'Now, first of all, in this function, we need to prevent movement in the opposite direction.', 'start': 3406.297, 'duration': 6.041}, {'end': 3417.799, 'text': 'What does that mean? It means that if we are moving up, we cannot start moving down.', 'start': 3412.398, 'duration': 5.401}, {'end': 3419.06, 'text': 'We cannot start moving down.', 'start': 3418.039, 'duration': 1.021}, {'end': 3424.961, 'text': 'Or if we are moving left, we cannot start to move to the right side and vice versa.', 'start': 3419.2, 'duration': 5.761}, {'end': 3437.873, 'text': 'So we need to say here if our DIR is equal to player direction up and our direction is equal to player direction down,', 'start': 3425.341, 'duration': 12.532}], 'summary': 'Prevent movement in opposite direction to avoid conflicts.', 'duration': 31.576, 'max_score': 3406.297, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3406297.jpg'}, {'end': 3475.523, 'src': 'embed', 'start': 3453.566, 'weight': 3, 'content': [{'end': 3464.718, 'text': "because if the let me quickly go here in Unity and if I take my snake in the scene, let's assume snake is moving in the right side like this,", 'start': 3453.566, 'duration': 11.152}, {'end': 3467.839, 'text': 'we cannot press left and it will start moving left.', 'start': 3464.718, 'duration': 3.121}, {'end': 3468.94, 'text': 'no, we cannot do that.', 'start': 3467.839, 'duration': 1.101}, {'end': 3474.042, 'text': 'we need to start moving up and then move left or down and then move left.', 'start': 3468.94, 'duration': 5.102}, {'end': 3475.523, 'text': 'this is my point.', 'start': 3474.042, 'duration': 1.481}], 'summary': 'Snake in unity cannot move left directly, must move up or down first.', 'duration': 21.957, 'max_score': 3453.566, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3453566.jpg'}, {'end': 3946.7, 'src': 'embed', 'start': 3920.22, 'weight': 1, 'content': [{'end': 3927.404, 'text': 'Now you can do the same thing with W key, A, S, D, and to move that snake with those keys.', 'start': 3920.22, 'duration': 7.184}, {'end': 3935.37, 'text': "So here I'm going to say if left, meaning if we pressed the left arrow key, then here we are going to say return.", 'start': 3927.765, 'duration': 7.605}, {'end': 3940.935, 'text': 'return negative one because we are moving to the left side.', 'start': 3936.511, 'duration': 4.424}, {'end': 3943.557, 'text': 'if right, then we press the right arrow key.', 'start': 3940.935, 'duration': 2.622}, {'end': 3946.7, 'text': "we're going to say return one like this.", 'start': 3943.557, 'duration': 3.143}], 'summary': 'The snake game uses w, a, s, d keys for movement, returning -1 for left and 1 for right.', 'duration': 26.48, 'max_score': 3920.22, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3920220.jpg'}], 'start': 3220.004, 'title': 'Unity game development: player input and movement', 'summary': 'Covers setting up player input, handling input errors, preventing double movement, and setting movement direction constraints, with a focus on converting float to integer and immediate snake movement upon button press. it also explains the logic behind setting player direction based on vertical and horizontal input, using conditional statements, and handling keyboard input for a snake game to ensure smooth and controlled movement.', 'chapters': [{'end': 3613.894, 'start': 3220.004, 'title': 'Unity game development: player input and movement', 'summary': 'Covers setting up player input for a game in unity, including resetting input values, handling input errors, preventing double movement, and setting up movement direction constraints, with a focus on converting float to integer and immediate snake movement upon button press.', 'duration': 393.89, 'highlights': ['The chapter covers setting up player input for a game in Unity, including resetting input values, handling input errors, preventing double movement, and setting up movement direction constraints, with a focus on converting float to integer and immediate snake movement upon button press.', "The 'get keyboard input' function is created to obtain player input, with horizontal and vertical values being reset to zero before input is retrieved.", "To handle input errors where a float is returned instead of an integer, the 'input.getaccessraw' function's return value is cast to an integer by using 'int' in parentheses.", 'A check is implemented to prevent double movement, ensuring that if horizontal movement occurs, vertical movement is set to zero to prevent unintended double movement.', "The 'set movement' function is established to control the game object's movement, with a focus on immediate snake movement upon button press to bypass the movement frequency threshold.", "The 'set input direction' function is created to set movement direction constraints, preventing the snake from moving in the opposite direction, and initiating immediate snake movement upon button press."]}, {'end': 3858.379, 'start': 3614.574, 'title': 'Player movement logic', 'summary': 'Explains the logic behind setting player direction based on vertical and horizontal input, using conditional statements and mentions the need to create a new function to handle movement input.', 'duration': 243.805, 'highlights': ['The chapter explains the logic behind setting player direction based on vertical and horizontal input using conditional statements. The chapter delves into the process of setting the player direction based on the vertical and horizontal input, utilizing conditional statements to determine the direction.', 'The need to create another function to handle movement input is highlighted. The need to create a new function to handle the movement input of the snake is emphasized, to replace the existing input method.', "The undesirable movement behavior of the snake due to the usage of input getAxisRaw is described. The undesired erratic movement of the snake due to the use of input getAxisRaw is depicted, illustrating the need for an alternative method to control the snake's movement."]}, {'end': 4278.427, 'start': 3858.379, 'title': 'Snake game keyboard input', 'summary': 'Explains how to handle keyboard input for a snake game, checking for arrow key presses and preventing the snake from moving in the opposite direction to avoid self-collision, ensuring smooth and controlled movement.', 'duration': 420.048, 'highlights': ['Handling keyboard input for arrow keys and WASD to move the snake, utilizing booleans to check for key presses and returning the corresponding direction values. The chapter discusses handling keyboard input for arrow keys and WASD to move the snake, utilizing booleans to check for key presses and returning the corresponding direction values such as -1 for left, 1 for right, 1 for up, and -1 for down.', 'Preventing the snake from moving in the opposite direction to avoid self-collision by returning null if the opposite direction key is pressed, ensuring the smooth movement of the snake in the game. The explanation emphasizes preventing the snake from moving in the opposite direction to avoid self-collision by returning null if the opposite direction key is pressed, ensuring the smooth movement of the snake in the game.', 'Utilizing getAxisRaw function to handle keyboard input and store the values for horizontal and vertical movement, ensuring controlled and responsive gameplay. The chapter explains the utilization of the getAxisRaw function to handle keyboard input and store the values for horizontal and vertical movement, ensuring controlled and responsive gameplay.']}], 'duration': 1058.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc3220004.jpg', 'highlights': ["The 'set input direction' function is created to set movement direction constraints, preventing the snake from moving in the opposite direction, and initiating immediate snake movement upon button press.", 'The chapter discusses handling keyboard input for arrow keys and WASD to move the snake, utilizing booleans to check for key presses and returning the corresponding direction values such as -1 for left, 1 for right, 1 for up, and -1 for down.', 'A check is implemented to prevent double movement, ensuring that if horizontal movement occurs, vertical movement is set to zero to prevent unintended double movement.', 'The chapter covers setting up player input for a game in Unity, including resetting input values, handling input errors, preventing double movement, and setting up movement direction constraints, with a focus on converting float to integer and immediate snake movement upon button press.', "The 'get keyboard input' function is created to obtain player input, with horizontal and vertical values being reset to zero before input is retrieved."]}, {'end': 5289.408, 'segs': [{'end': 4488.42, 'src': 'embed', 'start': 4462.436, 'weight': 0, 'content': [{'end': 4467.52, 'text': 'Now, of course, we collided with the top walls, but we are not colliding with the obstacle walls.', 'start': 4462.436, 'duration': 5.084}, {'end': 4473.466, 'text': 'That is because we need to select them as well and attach a mesh collider on them.', 'start': 4467.58, 'duration': 5.886}, {'end': 4474.487, 'text': 'We forgot to do that.', 'start': 4473.526, 'duration': 0.961}, {'end': 4484.376, 'text': 'so if i hit the play button again and if i go through these walls that are obstacle walls, bam you see, touch the wall, touched wall,', 'start': 4474.947, 'duration': 9.429}, {'end': 4487.299, 'text': 'touched wall when we go through all of these.', 'start': 4484.376, 'duration': 2.923}, {'end': 4488.42, 'text': 'so this is working.', 'start': 4487.299, 'duration': 1.121}], 'summary': 'Collision issue resolved, all obstacle walls now properly detected and interacted with.', 'duration': 25.984, 'max_score': 4462.436, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc4462436.jpg'}, {'end': 4565.617, 'src': 'embed', 'start': 4536.353, 'weight': 1, 'content': [{'end': 4541.98, 'text': 'I am also going to remove the animation from the bomb and for the fruit, remove the animation as well.', 'start': 4536.353, 'duration': 5.627}, {'end': 4545.584, 'text': 'I am going to change the scale of the fruit to 0.1, 0.1, 0.1.', 'start': 4543.141, 'duration': 2.443}, {'end': 4553.633, 'text': 'The Z axis is going to be 5.8.', 'start': 4545.584, 'duration': 8.049}, {'end': 4557.554, 'text': 'And we are going to attach a sphere collider on it.', 'start': 4553.633, 'duration': 3.921}, {'end': 4559.435, 'text': 'And actually, let me just take this fruit.', 'start': 4557.634, 'duration': 1.801}, {'end': 4561.355, 'text': 'So eyeball this fruit right here.', 'start': 4559.495, 'duration': 1.86}, {'end': 4565.617, 'text': "And I'm going to name this game object here as fruit.", 'start': 4561.956, 'duration': 3.661}], 'summary': 'Adjustments made to bomb and fruit: animation removed, fruit scaled to 0.1, z-axis set at 5.8, sphere collider attached, game object named as fruit.', 'duration': 29.264, 'max_score': 4536.353, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc4536353.jpg'}, {'end': 4900.613, 'src': 'embed', 'start': 4876.012, 'weight': 2, 'content': [{'end': 4883.94, 'text': 'Now we can see this, the best way to see this is if I copy and paste a little bit or multiple of these fruits.', 'start': 4876.012, 'duration': 7.928}, {'end': 4892.388, 'text': "So we can have one fruit here, I'm going to duplicate one fruit here, one fruit here, for example, one fruit here and one fruit here.", 'start': 4883.98, 'duration': 8.408}, {'end': 4896.75, 'text': 'just so that we can see that our snake is growing larger.', 'start': 4892.788, 'duration': 3.962}, {'end': 4900.613, 'text': 'So now we have three of our snakes, so three parts of our snakes.', 'start': 4896.81, 'duration': 3.803}], 'summary': 'Demonstrating snake growth by duplicating fruits, now has three snake parts', 'duration': 24.601, 'max_score': 4876.012, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc4876012.jpg'}, {'end': 5152.711, 'src': 'embed', 'start': 5122.722, 'weight': 3, 'content': [{'end': 5130.726, 'text': "this is going to be our icon, so snake icon and I'm going to set the Anchor at the top middle.", 'start': 5122.722, 'duration': 8.004}, {'end': 5137.268, 'text': 'I am going to set here for the source image this snake portrait or however we are going to call it.', 'start': 5131.386, 'duration': 5.882}, {'end': 5141.149, 'text': 'The width and height is 8080 for this snake.', 'start': 5137.908, 'duration': 3.241}, {'end': 5147.611, 'text': 'The position X is negative 99 and the position Y is negative 58 like this.', 'start': 5141.369, 'duration': 6.242}, {'end': 5152.711, 'text': 'And the next thing, we are going to add our separator.', 'start': 5149.85, 'duration': 2.861}], 'summary': 'Creating a snake icon with 8080 dimensions, positioned at -99, -58.', 'duration': 29.989, 'max_score': 5122.722, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5122722.jpg'}], 'start': 4278.527, 'title': 'Unity game development', 'summary': 'Covers implementing collision detection for walls in a snake game, importing and configuring game objects, snake game development, and creating ui for the game.', 'chapters': [{'end': 4487.299, 'start': 4278.527, 'title': 'Snake game collision detection', 'summary': 'Discusses implementing collision detection for walls in a snake game, including adding mesh colliders and tags to the walls and testing collision detection in the game, resulting in successful detection of wall collisions and the need to apply mesh colliders to obstacle walls as well.', 'duration': 208.772, 'highlights': ['Implementing mesh colliders and tags for walls and obstacle walls in the game to enable collision detection. Mesh colliders and tags added to walls and obstacle walls.', 'Testing collision detection in the game and successfully detecting collisions with walls during gameplay. Successful detection of wall collisions during gameplay.', 'Identifying the need to apply mesh colliders to obstacle walls for proper collision detection. Recognition of the requirement to add mesh colliders to obstacle walls for accurate collision detection.']}, {'end': 4875.972, 'start': 4487.299, 'title': 'Unity game development: importing and configuring game objects', 'summary': 'Covers importing and configuring game objects in unity, including importing and tagging the bomb and fruit, configuring their properties, and checking for collisions with the player to trigger specific actions. it also covers creating a tail for the snake game when picking up the fruit, with detailed steps for instantiation and positioning of the tail nodes.', 'duration': 388.673, 'highlights': ['Configuring properties of game objects The speaker details the process of importing and configuring the properties of game objects in Unity, including changing the scale, attaching colliders, and removing animations for both the bomb and fruit.', "Checking for collisions and triggering actions The chapter explains the process of checking for collisions with the player and triggering specific actions based on the collision, such as printing a message when the bomb is touched and deactivating the fruit game object when it's picked up.", 'Creating a tail for the snake game The speaker provides a step-by-step guide for creating a tail for the snake game when picking up the fruit, involving setting the createNodeAtTail variable, instantiating a new tail node, and adding it to an array.']}, {'end': 5098.728, 'start': 4876.012, 'title': 'Snake game development', 'summary': 'Discusses the process of growing the snake by appending fruits, utilizing nodes and array elements, as well as detecting self-collision and setting tail tags in the snake game development.', 'duration': 222.716, 'highlights': ['The process of growing the snake by appending fruits and the utilization of nodes and array elements. The snake grows larger by appending fruits and utilizing nodes and array elements.', 'Explanation of setting tail tags to detect self-collision in the snake game. Setting tail tags to detect self-collision in the snake game.', "Discussion on the gameplay controller's role in spawning fruits and creating audio effects. The role of the gameplay controller in spawning fruits and creating audio effects."]}, {'end': 5289.408, 'start': 5098.788, 'title': 'Creating ui for game', 'summary': 'Covers the process of setting up the game ui, including creating an icon, separator, and score display with specific dimensions and positions.', 'duration': 190.62, 'highlights': ['The UI canvas is set to screen space overlay with a scale of 180 by 720, and the image for the snake icon is positioned at -99 (X) and -58 (Y) with a size of 80x80.', "A separator text with the font 'ariel' is added with a width of 29, height of 135, positioned at -32 (X) and -49 (Y), and a font size of 103, and color set to white.", "A score display is created with a width of 303, height of 83, positioned at 151 (X) and -60 (Y), displaying the word 'score' with a font size of 50 and the font 'Open Sans Regular'."]}], 'duration': 1010.881, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc4278527.jpg', 'highlights': ['Implementing mesh colliders and tags for walls and obstacle walls in the game to enable collision detection. Mesh colliders and tags added to walls and obstacle walls.', 'Configuring properties of game objects The speaker details the process of importing and configuring the properties of game objects in Unity, including changing the scale, attaching colliders, and removing animations for both the bomb and fruit.', 'The process of growing the snake by appending fruits and the utilization of nodes and array elements. The snake grows larger by appending fruits and utilizing nodes and array elements.', 'The UI canvas is set to screen space overlay with a scale of 180 by 720, and the image for the snake icon is positioned at -99 (X) and -58 (Y) with a size of 80x80.']}, {'end': 6546.869, 'segs': [{'end': 5319.812, 'src': 'embed', 'start': 5289.468, 'weight': 0, 'content': [{'end': 5290.469, 'text': 'So this is our UI.', 'start': 5289.468, 'duration': 1.001}, {'end': 5292.871, 'text': 'Here is where we are going to keep track of the score.', 'start': 5290.569, 'duration': 2.302}, {'end': 5294.572, 'text': 'This is our snake image.', 'start': 5293.291, 'duration': 1.281}, {'end': 5297.534, 'text': 'This is the separator between the snake image and the score.', 'start': 5294.592, 'duration': 2.942}, {'end': 5302.058, 'text': 'Not that fancy because the point is not to create fancy UI.', 'start': 5298.035, 'duration': 4.023}, {'end': 5304.04, 'text': 'The point is to create our snake game.', 'start': 5302.098, 'duration': 1.942}, {'end': 5310.645, 'text': 'Also make sure that you attach or drag and drop the bomb inside of our pickup.', 'start': 5304.14, 'duration': 6.505}, {'end': 5315.249, 'text': 'So drag and drop the bomb and the fruit to make them prefabs.', 'start': 5310.745, 'duration': 4.504}, {'end': 5319.812, 'text': 'let us wrap things up, starting with our gameplay controller.', 'start': 5315.789, 'duration': 4.023}], 'summary': 'Creating a simple ui for the snake game, emphasizing gameplay over fancy design.', 'duration': 30.344, 'max_score': 5289.468, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5289468.jpg'}, {'end': 5371.775, 'src': 'embed', 'start': 5340.127, 'weight': 1, 'content': [{'end': 5340.988, 'text': 'So GameplayController.', 'start': 5340.127, 'duration': 0.861}, {'end': 5344.613, 'text': "And I'm going to attach the script on the GameplayController.", 'start': 5341.489, 'duration': 3.124}, {'end': 5349.639, 'text': 'What do we need? Well, as always, we need a couple of variables to start with.', 'start': 5345.134, 'duration': 4.505}, {'end': 5352.002, 'text': 'And let me do my thing.', 'start': 5350.38, 'duration': 1.622}, {'end': 5355.826, 'text': 'So let me tag the class give a little bit of space.', 'start': 5352.282, 'duration': 3.544}, {'end': 5360.348, 'text': 'The first thing we are going to make our gameplay controller an instance.', 'start': 5356.486, 'duration': 3.862}, {'end': 5364.651, 'text': 'So public static, gameplay controller instance like this.', 'start': 5360.509, 'duration': 4.142}, {'end': 5371.775, 'text': "And for our instance, right here, instead of our update, I'm going to create, make instance.", 'start': 5366.132, 'duration': 5.643}], 'summary': 'Creating a gameplay controller with a public static instance and make instance function.', 'duration': 31.648, 'max_score': 5340.127, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5340127.jpg'}, {'end': 5422.746, 'src': 'embed', 'start': 5394.047, 'weight': 5, 'content': [{'end': 5397.669, 'text': 'We did this probably thousands of times so far.', 'start': 5394.047, 'duration': 3.622}, {'end': 5404.328, 'text': 'Before moving forward, I am also going to type here using unityengine.ui,', 'start': 5398.803, 'duration': 5.525}, {'end': 5411.795, 'text': 'because we need to get our salsa reference to that text displaying the score to our user,', 'start': 5404.328, 'duration': 7.467}, {'end': 5415.559, 'text': 'and we are going to display the score every time our snake eats a fruit.', 'start': 5411.795, 'duration': 3.764}, {'end': 5422.746, 'text': 'So here we also need a public game object for our fruit pick up.', 'start': 5416.5, 'duration': 6.246}], 'summary': 'Using unityengine.ui, display score every time snake eats a fruit.', 'duration': 28.699, 'max_score': 5394.047, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5394047.jpg'}, {'end': 5648.955, 'src': 'embed', 'start': 5624.083, 'weight': 3, 'content': [{'end': 5633.985, 'text': 'So first of all, we are going to create an IEnumerator, a coroutine, as you might assumed, and we are going to call it spawn pickups like this.', 'start': 5624.083, 'duration': 9.902}, {'end': 5635.826, 'text': 'So start spawning pickups.', 'start': 5634.406, 'duration': 1.42}, {'end': 5648.955, 'text': "And here we're going to say yield return new, wait for seconds and we are going to wait from random.range between 1f and 1.5f.", 'start': 5635.886, 'duration': 13.069}], 'summary': 'Creating a coroutine to spawn pickups at random intervals.', 'duration': 24.872, 'max_score': 5624.083, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5624083.jpg'}, {'end': 5952.276, 'src': 'embed', 'start': 5923.157, 'weight': 4, 'content': [{'end': 5926.739, 'text': 'So now, after 0.5 of a second, you see, here we have a bomb.', 'start': 5923.157, 'duration': 3.582}, {'end': 5927.68, 'text': 'we have a fruit.', 'start': 5926.739, 'duration': 0.941}, {'end': 5931.963, 'text': "so here I'm going to pick up a fruit, another bomb fruit right here.", 'start': 5927.68, 'duration': 4.283}, {'end': 5933.364, 'text': 'let me try to pick it up.', 'start': 5931.963, 'duration': 1.401}, {'end': 5934.205, 'text': 'so fruit here.', 'start': 5933.364, 'duration': 0.841}, {'end': 5941.329, 'text': 'Now, one thing that you are probably noticing is that these game objects are staying in the scene.', 'start': 5934.525, 'duration': 6.804}, {'end': 5945.272, 'text': 'they are not being deactivated until we pick them up or until we touch the bomb,', 'start': 5941.329, 'duration': 3.943}, {'end': 5952.276, 'text': 'and eventually we will run out of places where we can walk or move because of the bomb.', 'start': 5945.272, 'duration': 7.004}], 'summary': 'Gaming scene with objects staying until picked up or touched, leading to limited movement.', 'duration': 29.119, 'max_score': 5923.157, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5923157.jpg'}, {'end': 6177.611, 'src': 'embed', 'start': 6146.25, 'weight': 6, 'content': [{'end': 6155.755, 'text': 'So.. you have all of the resources you need to create your own mechanism for restarting the game, so on and so forth.', 'start': 6146.25, 'duration': 9.505}, {'end': 6166.483, 'text': "Because what I'm going to do now is go in Unity, And I'm going to hit here or double click and create an audio manager script.", 'start': 6155.815, 'duration': 10.668}, {'end': 6177.611, 'text': "And going back in our scripts folder and helper scripts, right click, I am going to create a C sharp script, which I'm going to call audio manager.", 'start': 6167.223, 'duration': 10.388}], 'summary': 'Resources available to create game restart mechanism in unity.', 'duration': 31.361, 'max_score': 6146.25, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc6146250.jpg'}, {'end': 6505.138, 'src': 'embed', 'start': 6470.907, 'weight': 7, 'content': [{'end': 6474.249, 'text': 'So the radius is set at 0.11.', 'start': 6470.907, 'duration': 3.342}, {'end': 6475.25, 'text': 'You can resize it.', 'start': 6474.249, 'duration': 1.001}, {'end': 6478.233, 'text': 'Let me just go in the scene and search for the snake.', 'start': 6475.27, 'duration': 2.963}, {'end': 6485.879, 'text': 'You can resize it to something like 0.09, which is smaller.', 'start': 6478.573, 'duration': 7.306}, {'end': 6490.683, 'text': 'So if I hit the play button, so now our collider is smaller.', 'start': 6485.959, 'duration': 4.724}, {'end': 6492.124, 'text': 'We can still pick things up.', 'start': 6490.723, 'duration': 1.401}, {'end': 6494.406, 'text': 'So we can eat here the fruit as you just saw.', 'start': 6492.145, 'duration': 2.261}, {'end': 6495.627, 'text': 'So we can eat the fruit.', 'start': 6494.466, 'duration': 1.161}, {'end': 6505.138, 'text': 'But when we try to pass our own tail, then it will work because let me just try to make the snake a little bit bigger to demonstrate that.', 'start': 6496.656, 'duration': 8.482}], 'summary': "The snake's collider radius is resized from 0.11 to 0.09, allowing it to pick up fruit but not pass its own tail.", 'duration': 34.231, 'max_score': 6470.907, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc6470907.jpg'}], 'start': 5289.468, 'title': 'Snake game development', 'summary': 'Covers creating ui, setting up gameplay controller, spawning and deactivating game pickups, keeping track of score, and creating an audio manager script in unity, using specific position values and random time intervals.', 'chapters': [{'end': 5393.907, 'start': 5289.468, 'title': 'Creating snake game ui and gameplay controller', 'summary': 'Covers creating the ui for the snake game and setting up the gameplay controller, including creating an instance for the gameplay controller and attaching the script to an empty game object.', 'duration': 104.439, 'highlights': ['Creating the UI for the snake game and setting up the gameplay controller The chapter covers creating the UI for the snake game and setting up the gameplay controller, including creating an instance for the gameplay controller and attaching the script to an empty game object.', "Setting up the gameplay controller by creating an instance for it The script folder and helper scripts are used to create the gameplay controller as an instance, ensuring it's static and attached to an empty game object named 'GameplayController.'", "Defining variables and making the gameplay controller an instance The process involves defining variables to start with and making the gameplay controller an instance by creating it as public static, ensuring it's pointing to the correct instance."]}, {'end': 6122.01, 'start': 5394.047, 'title': 'Game pickup and score controller', 'summary': 'Explains the process of spawning and deactivating game pickups, including fruits and bombs, while keeping track of the score in a game controlled by unityengine.ui, using specific position values and random time intervals.', 'duration': 727.963, 'highlights': ['The chapter explains the process of spawning and deactivating game pickups, including fruits and bombs. The transcript details the implementation of spawning fruits and bombs in a game using Unityengine.UI and setting up scripts to deactivate the pickups after a certain time.', 'Keeping track of the score in a game controlled by Unityengine.UI. The transcript demonstrates the implementation of tracking and displaying the score in a game controlled by Unityengine.UI.', 'Using specific position values and random time intervals for spawning pickups. The speaker explains the use of specific X, Y, and Z position values, as well as random time intervals, for spawning game pickups such as fruits and bombs.']}, {'end': 6546.869, 'start': 6122.01, 'title': 'Creating an audio manager script', 'summary': 'Discusses creating an audio manager script in unity, including the instance creation, playing pickup and dead sounds, and adjusting colliders to affect gameplay.', 'duration': 424.859, 'highlights': ['The chapter explains the process of creating an audio manager script in Unity, including the instance creation and playing pickup and dead sounds via public void functions.', "It details adjusting colliders to affect gameplay, demonstrating how resizing the collider influences the ability to eat fruit and avoid collision with the snake's own tail.", 'The transcript also mentions creating menus and the Ultimate Game Development Academy, but these are not directly relevant to the main topic of creating an audio manager script.']}], 'duration': 1257.401, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/8ztq9fQT6Kc/pics/8ztq9fQT6Kc5289468.jpg', 'highlights': ['Creating the UI for the snake game and setting up the gameplay controller', 'Setting up the gameplay controller by creating an instance for it', 'Defining variables and making the gameplay controller an instance', 'Using specific position values and random time intervals for spawning pickups', 'The chapter explains the process of spawning and deactivating game pickups, including fruits and bombs', 'Keeping track of the score in a game controlled by Unityengine.UI', 'The chapter explains the process of creating an audio manager script in Unity', 'It details adjusting colliders to affect gameplay']}], 'highlights': ['The rebaking of lightning settings can be time-consuming and resource-intensive, leading to computer strain and longer wait times.', 'Exploring different intensities and shadow effects of directional lights can be crucial in determining the visual atmosphere of the game environment.', 'Setting the rotation of directional light and adjusting its intensity can significantly impact the visual quality of the scene.', 'The far clipping plane for the main camera should be set at 10 for optimal visibility and the Y axis should be set at one for an improved visual appearance.', 'The process of creating a snake game object involves positioning, scaling, and naming different parts such as head, node, and tail, with specific dimensions and placement to form the snake.', "The script 'tags' is created to hold tags and default variables for the game, including the representation of walls, fruits, tail, and metrics for positioning and moving nodes in the game.", "The public enumeration is defined to determine movements (left, up, right, down) and the count (four movements), providing a clear structure for the game's movement mechanics.", 'The chapter covers the process of creating a player controller script in Unity for moving the snake, which forms the core focus of the tutorial.', 'The tutorial explains the creation of variables including movement interval and movement frequency, set at 0.2f and 0.1 respectively, to control the movement of the snake.', "Randomization is employed to determine the direction of movement using 'random.range' function.", 'The function void move is created to enable the game object to move using the delta position and updating the positions of the main body, head body, and snake nodes.', "The use of enumerations and casting in the code is highlighted, showcasing how the 'player direction' enumeration is cast to an integer and how integers are cast back to the 'player direction' enumeration to determine the snake's direction.", "The explanation includes the implementation of directional movement in the fixed update, where the snake's movement is determined based on user input and the function to move the snake is called accordingly.", 'The chapter demonstrates the implementation of movement frequency logic in the update function, where the counter is incremented by delta time and movement is allowed when the counter reaches the specified frequency.', "The 'set input direction' function is created to set movement direction constraints, preventing the snake from moving in the opposite direction, and initiating immediate snake movement upon button press.", 'Implementing mesh colliders and tags for walls and obstacle walls in the game to enable collision detection. Mesh colliders and tags added to walls and obstacle walls.', 'Configuring properties of game objects The speaker details the process of importing and configuring the properties of game objects in Unity, including changing the scale, attaching colliders, and removing animations for both the bomb and fruit.', 'The process of growing the snake by appending fruits and the utilization of nodes and array elements. The snake grows larger by appending fruits and utilizing nodes and array elements.', 'The UI canvas is set to screen space overlay with a scale of 180 by 720, and the image for the snake icon is positioned at -99 (X) and -58 (Y) with a size of 80x80.', 'Creating the UI for the snake game and setting up the gameplay controller', 'Setting up the gameplay controller by creating an instance for it', 'Defining variables and making the gameplay controller an instance', 'Using specific position values and random time intervals for spawning pickups', 'The chapter explains the process of spawning and deactivating game pickups, including fruits and bombs', 'Keeping track of the score in a game controlled by Unityengine.UI', 'The chapter explains the process of creating an audio manager script in Unity', 'It details adjusting colliders to affect gameplay']}