Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:06,656 --> 00:00:12,800
Now here is a video that you might not get in a lot of oil
2
00:00:13,056 --> 00:00:15,872
Find tutorials about game development were going to talk about
3
00:00:16,128 --> 00:00:17,920
Cleaning up your project
4
00:00:18,176 --> 00:00:22,272
Now we got a pretty nice and base a foundation for a game
5
00:00:22,528 --> 00:00:24,320
I must basically a 2D game kit
6
00:00:24,832 --> 00:00:29,952
That's the clean up ok there's a couple things you can do to clean up your game
7
00:00:30,464 --> 00:00:36,608
Going to do is put things into folders especially the Script where you make sure photos are nice and clean ok
8
00:00:36,864 --> 00:00:38,912
So we're going to create a folder called
9
00:00:39,424 --> 00:00:40,192
About
10
00:00:40,704 --> 00:00:41,472
Start up
11
00:00:41,984 --> 00:00:44,544
Hambledon Court
12
00:00:44,800 --> 00:00:48,384
It's better to the core
13
00:00:49,408 --> 00:00:51,712
Let's move the new player script to the core
14
00:00:52,224 --> 00:00:54,272
And the physics object
15
00:00:56,320 --> 00:00:57,088
Ok
16
00:00:58,112 --> 00:00:59,648
And let's see here
17
00:01:00,123 --> 00:01:02,619
Subtitled by
-♪ online-courses.club ♪-
We compress knowledge for you!
https://t.me/joinchat/ailxpXoW3JVjYzQ1
18
00:01:02,620 --> 00:01:05,792
So far there's not a timer for that we need to create so when I can worry about any more folders
19
00:01:06,048 --> 00:01:08,096
Navigate to do is actually just go in
20
00:01:08,608 --> 00:01:09,888
Each script
21
00:01:10,400 --> 00:01:14,496
How to make sure all the variables are organised in a bit clean away
22
00:01:15,008 --> 00:01:16,800
Supplier for example
23
00:01:17,056 --> 00:01:21,664
United States things that really in categories that is unlisted randomly
24
00:01:22,176 --> 00:01:24,480
And I'm definitely not in alphabetical order
25
00:01:24,736 --> 00:01:30,880
So what are we doing here when I actually making it easier for the player by actually making it easier for ourselves right
26
00:01:31,136 --> 00:01:34,976
I'm going to be making a game for 6-months to 12-months and 24 months
27
00:01:35,232 --> 00:01:37,024
We want to make sure we don't go crazy right
28
00:01:37,280 --> 00:01:39,584
So let's make sure that everything's nice and clean
29
00:01:40,352 --> 00:01:43,168
Start with the new player because honestly this is the biggest crip
30
00:01:43,680 --> 00:01:49,824
What we're going to do is for going to categorise things using headers ok so how we create a header
31
00:01:50,080 --> 00:01:50,848
Just Google it
32
00:01:51,360 --> 00:01:53,920
Alright so let's do better
33
00:01:54,176 --> 00:01:55,712
Unity C Sharp
34
00:01:56,480 --> 00:01:59,296
I've seen here we go here at review
35
00:02:00,832 --> 00:02:02,368
Ok so it's copy this
36
00:02:02,880 --> 00:02:05,184
Let's start credit categories
37
00:02:05,696 --> 00:02:10,304
So we can rename this header to attributes I think that's a good word
38
00:02:10,816 --> 00:02:16,960
For this category here so powers and attributes so we're going to move that
39
00:02:17,216 --> 00:02:17,728
Here
40
00:02:18,240 --> 00:02:20,032
And that's actually nazo
41
00:02:21,824 --> 00:02:22,592
Alphabetically
42
00:02:23,104 --> 00:02:24,384
The very beginning here
43
00:02:25,152 --> 00:02:27,968
And see here what else can we do
44
00:02:29,760 --> 00:02:31,552
We can create another header
45
00:02:31,808 --> 00:02:33,856
Called inventory
46
00:02:34,368 --> 00:02:36,416
This would be inventory
47
00:02:36,672 --> 00:02:41,536
Obviously guys you can store variables and references for your inventory
48
00:02:41,792 --> 00:02:47,936
Inside of a game manager bye I'm going to actually keep it stored in the new player cos I like to be able to see all my image
49
00:02:48,192 --> 00:02:49,216
When I click on the player
50
00:02:49,472 --> 00:02:50,240
In play mode
51
00:02:51,008 --> 00:02:51,776
Ok
52
00:02:52,032 --> 00:02:58,176
So we have all this stuff here see here we create a new category and maybe references
53
00:02:58,432 --> 00:03:01,504
And all this is just references to various key Manchester
54
00:03:02,272 --> 00:03:04,832
Shall we have a reference to our attack box
55
00:03:05,600 --> 00:03:06,624
Expectoration
56
00:03:08,160 --> 00:03:10,720
Would actually be an attribute as well
57
00:03:12,000 --> 00:03:15,328
Let's see here these are all references
58
00:03:16,352 --> 00:03:22,496
This is kind of a reference the health bar original size so I'm thank you
59
00:03:22,752 --> 00:03:23,264
Here
60
00:03:23,776 --> 00:03:26,592
Doesn't really need to be serialised so I can remove that
61
00:03:26,848 --> 00:03:32,224
Something else going to be doing when cleaning up a variables just if you don't need something serialised anymore
62
00:03:32,480 --> 00:03:38,624
Is the only.one serialised the health bar original size the only reason it was serialised it so I can see it in place
63
00:03:38,880 --> 00:03:40,928
But I don't need to see it anymore cos I know it works
64
00:03:41,696 --> 00:03:47,072
Preferences inventory and attributes ok with that looks like now
65
00:03:48,096 --> 00:03:49,888
Oh there we go this is perfect
66
00:03:50,400 --> 00:03:52,448
With attributes for attack power
67
00:03:52,960 --> 00:03:55,520
Max speed jump hour expectoration
68
00:03:55,776 --> 00:03:57,312
We have an inventory section now
69
00:03:57,824 --> 00:03:59,104
We have references as well
70
00:03:59,872 --> 00:04:01,920
Beautiful really clean
71
00:04:02,176 --> 00:04:03,456
Next ingredient
72
00:04:03,712 --> 00:04:09,856
Make it either alphabetical or if you want to keep things in categories that certainly find can do that as well
73
00:04:10,112 --> 00:04:14,208
Like I think I like doing things alphabetically so we can do
74
00:04:14,976 --> 00:04:16,768
Attack power in attack duration
75
00:04:17,280 --> 00:04:23,423
Alright I know what you're thinking Thomas that's not alphabetical there we go find whatever
76
00:04:23,679 --> 00:04:25,727
Protect our matc
77
00:04:25,983 --> 00:04:32,127
I'm so bad at life that I can't even do the alphabet so what comes first a b c d e f g h
78
00:04:32,383 --> 00:04:38,015
Jklm
79
00:04:38,271 --> 00:04:40,575
Emma comes before c
80
00:04:41,343 --> 00:04:44,159
A comes before c
81
00:04:44,415 --> 00:04:47,231
And just go ahead and alphabetize everything
82
00:04:56,447 --> 00:05:02,591
Ok so everything's alphabetize now nice and clean and you notice there's no header up here why is that what are these two variables
83
00:05:03,103 --> 00:05:06,687
These two variables are showing up because they are from the physics
84
00:05:06,943 --> 00:05:07,967
Object
85
00:05:08,223 --> 00:05:09,503
Which were expecting to
86
00:05:10,015 --> 00:05:11,551
How do we get a header for that
87
00:05:12,063 --> 00:05:13,855
Well let's go back in the universe
88
00:05:14,367 --> 00:05:16,415
Physics object here
89
00:05:18,463 --> 00:05:19,487
And
90
00:05:20,511 --> 00:05:21,791
Why are the variables showing up
91
00:05:22,559 --> 00:05:23,583
Because the public
92
00:05:23,839 --> 00:05:26,911
A new player is extending to this physics object
93
00:05:27,679 --> 00:05:29,471
To do this and Heather here
94
00:05:32,031 --> 00:05:34,591
Tabby this header here and just pasty here
95
00:05:35,103 --> 00:05:37,663
I'm going to call this physics
96
00:05:37,919 --> 00:05:38,687
Object
97
00:05:39,199 --> 00:05:40,735
Attributes
98
00:05:41,247 --> 00:05:42,015
Ok
99
00:05:42,271 --> 00:05:44,319
What's that loads up but can play here
100
00:05:44,575 --> 00:05:49,439
Now we have a physics magic attributes are regular attributes or inventory in a references
101
00:05:50,207 --> 00:05:52,767
So here we are going to do it we're going to go through every single script
102
00:05:53,023 --> 00:05:54,047
Create headers
103
00:05:54,303 --> 00:05:55,583
For the various categories
104
00:05:55,839 --> 00:06:01,983
Can I recommended that you create categories very similar to this an attribute category A reference
105
00:06:02,239 --> 00:06:03,007
What is category
106
00:06:03,263 --> 00:06:07,103
Maybe for something really specific you can create another category as well
107
00:06:07,359 --> 00:06:09,407
Ahead and do that for all of your scripts
108
00:06:10,175 --> 00:06:14,015
Remove any weird debug.log
109
00:06:14,271 --> 00:06:18,623
To the console that we don't really need anymore sometimes I forget to remove those
110
00:06:18,879 --> 00:06:20,927
What we're going to do is press ctrl f
111
00:06:21,695 --> 00:06:22,463
I'm going to choose
112
00:06:22,719 --> 00:06:25,791
To search in the entire solution of a project
113
00:06:26,303 --> 00:06:27,839
Every single thing
114
00:06:28,095 --> 00:06:31,423
That we can find that has a debug log
115
00:06:32,447 --> 00:06:33,727
We're going to see if we can remove
116
00:06:33,983 --> 00:06:36,799
It looks like we don't really need this
117
00:06:37,823 --> 00:06:39,103
So I can remove that
118
00:06:39,615 --> 00:06:42,431
And these were just used for
119
00:06:42,687 --> 00:06:45,503
Actually creating scripts but now the window they work
120
00:06:46,271 --> 00:06:47,551
Will I need any more
121
00:06:48,063 --> 00:06:48,831
Again
122
00:06:49,343 --> 00:06:53,183
That's fine that sometimes you might get weird cryptic when am I looking at
123
00:06:53,439 --> 00:06:58,303
These are actually things that are included in packages that were installed without a full Project
124
00:06:58,559 --> 00:07:00,351
Change those
125
00:07:02,143 --> 00:07:04,703
Ok looks like we're getting rid of all the diamond at Largs
126
00:07:05,727 --> 00:07:07,519
Make sure you save everything out
127
00:07:08,031 --> 00:07:14,175
Next thing I want to do is just look for any weird comments so let's start at the very beginning here at our game
128
00:07:15,711 --> 00:07:16,991
Looks fine
129
00:07:17,759 --> 00:07:18,527
Right here
130
00:07:19,551 --> 00:07:22,879
I'm just looking for things that start with the two forward slashes
131
00:07:23,391 --> 00:07:27,487
Just figuring out if there's any here that we don't need comments are great
132
00:07:28,255 --> 00:07:30,047
B sometimes
133
00:07:30,303 --> 00:07:32,863
You can have some unnecessary once in your script
134
00:07:33,119 --> 00:07:35,167
Alright we can remove this one here will need it
135
00:07:36,703 --> 00:07:38,239
I need this one either
136
00:07:39,775 --> 00:07:43,871
When is really up to you guys over doing is making a lot easier for you
137
00:07:44,127 --> 00:07:44,895
In the future
138
00:07:45,151 --> 00:07:47,199
Canelo vs weekend
139
00:07:47,711 --> 00:07:50,783
Only need this comment here this kind of self evident
140
00:07:52,319 --> 00:07:53,599
And the last one here
141
00:07:54,879 --> 00:07:55,903
What's pretty good
142
00:07:57,183 --> 00:08:02,047
The next thing we want to do geysers go to every script and just make sure that everything is
143
00:08:02,303 --> 00:08:03,839
Formatted correctly
144
00:08:04,351 --> 00:08:06,399
Using c-sharp standards
145
00:08:06,655 --> 00:08:12,799
So some of you might have been confused when creating tabs with your script some things might have
146
00:08:13,055 --> 00:08:13,567
Incorrect
147
00:08:14,079 --> 00:08:15,615
Tabs solo
148
00:08:15,871 --> 00:08:19,711
Might look like maybe like this right
149
00:08:19,967 --> 00:08:20,991
That will be bad
150
00:08:21,247 --> 00:08:22,527
So it looks like that
151
00:08:23,551 --> 00:08:26,879
Visual Studio can actually auto format for you
152
00:08:27,391 --> 00:08:29,439
So just select all by pressing ctrl a
153
00:08:30,207 --> 00:08:31,487
And then control k
154
00:08:31,743 --> 00:08:37,887
And control now for their about that are for my everything
155
00:08:38,143 --> 00:08:38,655
Crealy
156
00:08:38,911 --> 00:08:43,519
That fixed all the cabin so she's go through all other scripts and do it again
157
00:08:43,775 --> 00:08:45,311
Again it's control
158
00:08:45,567 --> 00:08:47,359
Control and I control f
159
00:08:47,615 --> 00:08:50,431
CCJ even for me and I've been doing this for 10 years
160
00:08:50,687 --> 00:08:52,735
Turn on my timing is incorrect
161
00:08:52,991 --> 00:08:56,575
Make sure you save each script as you do it control control
162
00:08:57,855 --> 00:09:03,999
Next thing I want to do is just clean up any weird line breaks you really don't want to have just random line
163
00:09:04,255 --> 00:09:06,815
Makes so here's a random one that I don't really need
164
00:09:07,071 --> 00:09:09,375
I'll say that this one is fine
165
00:09:09,631 --> 00:09:12,191
I'll see you in again this is just for your sanity
166
00:09:12,703 --> 00:09:15,775
So looks good I like all the line breaks here
167
00:09:19,103 --> 00:09:20,895
See hear anything weird here
168
00:09:23,711 --> 00:09:26,015
Say anything too bad he's a little bit weird
169
00:09:26,271 --> 00:09:29,087
Assist remove Oliver save that out
170
00:09:29,599 --> 00:09:30,623
That looks good
171
00:09:31,391 --> 00:09:34,207
Anything we are here that's what kind of weird
172
00:09:34,463 --> 00:09:37,279
No I don't mind if this is weird right here that's weird
173
00:09:37,535 --> 00:09:43,679
Oh my goodness this is a little weird but you know what this is the physics fabric scraps I'm going to keep it the way it isn't going to mess with it too much
174
00:09:43,935 --> 00:09:45,215
Remember that's the one we got
175
00:09:45,471 --> 00:09:48,543
Communities tutorials on on the One metal that too much
176
00:09:49,567 --> 00:09:52,895
You look good here nothing is really confusing
177
00:09:53,407 --> 00:09:55,199
That's a little weird artist
178
00:09:55,967 --> 00:09:57,247
Save that
179
00:09:59,295 --> 00:10:00,063
Good
180
00:10:00,345 --> 00:10:04,434
Subtitled by
-♪ online-courses.club ♪-
We compress knowledge for you!
https://t.me/joinchat/ailxpXoW3JVjYzQ1
181
00:10:04,927 --> 00:10:05,951
Scared
182
00:10:06,719 --> 00:10:09,023
And by the way guys are keeping these in here
183
00:10:09,535 --> 00:10:11,583
Does a probably need them in the future
184
00:10:13,887 --> 00:10:14,911
Scared
185
00:10:16,703 --> 00:10:18,239
It's fine
186
00:10:19,007 --> 00:10:20,031
Alex fine
187
00:10:20,799 --> 00:10:21,311
Ok
188
00:10:22,079 --> 00:10:28,223
Clean that describes the last thing we're going to do is just add comments to things that
189
00:10:28,479 --> 00:10:30,015
Please and clarification ok
190
00:10:30,527 --> 00:10:32,831
It's really important to add comments
191
00:10:33,343 --> 00:10:36,415
Two things that you might forget in the future
192
00:10:37,183 --> 00:10:41,023
So for example right now if we look at the gate script that we created
193
00:10:42,047 --> 00:10:46,143
We might want to comment above this and say what actually happening
194
00:10:46,399 --> 00:10:52,543
So they are future self isn't confused when we forget or if we start working with a team they know what this
195
00:10:52,799 --> 00:10:54,079
What is actually doing ok
196
00:10:54,591 --> 00:10:56,127
So check
197
00:10:56,383 --> 00:10:57,663
To see if he
198
00:10:58,431 --> 00:10:59,199
Players
199
00:11:00,223 --> 00:11:01,247
Inventory
200
00:11:01,759 --> 00:11:05,343
Contains the required inventory item
201
00:11:05,599 --> 00:11:06,111
Ok
202
00:11:06,367 --> 00:11:07,391
The thing
203
00:11:07,647 --> 00:11:13,023
Personally I don't really think I need this comment here out I'll keep it there just in case but
204
00:11:13,279 --> 00:11:16,863
Is kind of obvious when you see this condition here
205
00:11:17,119 --> 00:11:19,167
That's what this actually is
206
00:11:19,679 --> 00:11:24,543
So sometimes comments are really necessary in fact a good coder
207
00:11:24,799 --> 00:11:26,591
Will be so good at writing code
208
00:11:27,103 --> 00:11:28,895
And naming variables
209
00:11:30,687 --> 00:11:34,015
They don't really need to write a tonne of comments for the scripts because
210
00:11:34,271 --> 00:11:39,647
They're so good at writing variables that it self-evident to their team and to their future selves
211
00:11:39,903 --> 00:11:40,415
Ok
212
00:11:41,695 --> 00:11:45,279
Enemy script is there anything that we need to clarify here
213
00:11:45,535 --> 00:11:49,119
What sometimes you need to clarify what a variable actually does
214
00:11:49,375 --> 00:11:55,519
So confused by my raycast layer mask so that's just type which layer
215
00:11:56,031 --> 00:11:57,311
Do we want
216
00:11:57,823 --> 00:11:59,359
The rake cast
217
00:12:00,639 --> 00:12:01,919
To interact with
218
00:12:03,199 --> 00:12:06,271
So that clarifies with the raycast layer mask is
219
00:12:06,527 --> 00:12:07,551
What are the offset
220
00:12:08,319 --> 00:12:09,599
Offset
221
00:12:09,855 --> 00:12:11,135
From the centre
222
00:12:11,391 --> 00:12:13,183
Other raycast origin
223
00:12:15,999 --> 00:12:20,095
Everything else seems good here I can't think of anything else that we might need
224
00:12:21,375 --> 00:12:22,655
To clarify
225
00:12:23,167 --> 00:12:25,215
Is clarified pretty good
226
00:12:27,519 --> 00:12:29,055
Clarify here
227
00:12:29,311 --> 00:12:30,847
Two player
228
00:12:31,871 --> 00:12:33,407
Then update
229
00:12:33,663 --> 00:12:34,431
TUI
230
00:12:36,479 --> 00:12:40,831
Ellis Jean to the new player here and see if there's any clarification that needs to be done here
231
00:12:41,087 --> 00:12:43,391
Look for any variables here that might
232
00:12:43,647 --> 00:12:45,439
Potentially confuse you
233
00:12:45,951 --> 00:12:47,743
Or your team members in the future
234
00:12:48,511 --> 00:12:49,535
Let's see here
235
00:12:51,839 --> 00:12:53,887
Attributes attack duration
236
00:12:55,423 --> 00:12:57,215
Maybe we can clarify what that is
237
00:12:57,471 --> 00:13:00,287
How long is the attackbox
238
00:13:01,055 --> 00:13:01,823
Active
239
00:13:03,103 --> 00:13:04,127
When attacking
240
00:13:05,151 --> 00:13:06,687
That's perfect
241
00:13:07,455 --> 00:13:09,503
These are seem self-evident
242
00:13:11,295 --> 00:13:17,439
This we can clarify dictionary storing all inventory Ireland strings
243
00:13:17,695 --> 00:13:18,719
N values
244
00:13:21,535 --> 00:13:24,351
Is definitely probably need some clarification
245
00:13:25,631 --> 00:13:26,655
The default
246
00:13:26,911 --> 00:13:27,935
Inventory
247
00:13:29,983 --> 00:13:31,007
Item slot
248
00:13:31,775 --> 00:13:33,055
Sprite
249
00:13:36,127 --> 00:13:37,407
The key
250
00:13:37,919 --> 00:13:38,943
Inventory
251
00:13:39,455 --> 00:13:40,479
Adam
252
00:13:42,271 --> 00:13:43,551
And then this one is the
253
00:13:44,575 --> 00:13:46,623
Genki inventory
254
00:13:47,135 --> 00:13:48,159
Adam
255
00:13:48,671 --> 00:13:53,535
To see how a Clarifying things that might be a little bit confusing in the future
256
00:13:54,303 --> 00:13:56,607
This is great for you and it's also great for your team
257
00:13:57,631 --> 00:14:03,263
Anything else here that needs clarification remind me to clarify what this condition is
258
00:14:04,543 --> 00:14:09,919
If the health bar Ridge size has not been set yet
259
00:14:11,199 --> 00:14:13,247
Match it to the
260
00:14:13,503 --> 00:14:15,039
Health bar
261
00:14:15,295 --> 00:14:16,063
Wrecked
262
00:14:16,575 --> 00:14:18,879
Transform size
263
00:14:20,159 --> 00:14:21,183
It seems good
264
00:14:21,439 --> 00:14:25,023
That's about all the commons I think I need for the new player
265
00:14:25,279 --> 00:14:31,423
Does Olly Murs skip still in add comments to things that might confuse you in the future or confused varies team members
266
00:14:31,679 --> 00:14:32,191
Once you're done
267
00:14:32,703 --> 00:14:34,751
Comments to clean your scripts
268
00:14:35,007 --> 00:14:36,031
What does compile
269
00:14:36,287 --> 00:14:38,591
Anime sure everything is saved
270
00:14:38,847 --> 00:14:39,871
In your project
271
00:14:40,383 --> 00:14:41,407
Save Your Scene
272
00:14:42,431 --> 00:14:43,455
And guys
273
00:14:43,967 --> 00:14:44,735
We have
274
00:14:44,991 --> 00:14:47,295
You're very first 2D game kit
275
00:14:47,551 --> 00:14:51,135
What score is we can use this to create a prototype
276
00:14:51,647 --> 00:14:53,439
Even better we can't use this
277
00:14:53,951 --> 00:15:00,095
When trading multiple games this is a great foundation for pretty much any 2D platformer game you want
278
00:15:00,351 --> 00:15:06,495
Create
20787
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.