Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Now here is a video that you might not get in a lot of oil
Find tutorials about game development were going to talk about
Cleaning up your project
Now we got a pretty nice and base a foundation for a game
I must basically a 2D game kit
That's the clean up ok there's a couple things you can do to clean up your game
Going to do is put things into folders especially the Script where you make sure photos are nice and clean ok
So we're going to create a folder called
About
Start up
Hambledon Court
It's better to the core
Let's move the new player script to the core
And the physics object
Ok
And let's see here
Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1
So far there's not a timer for that we need to create so when I can worry about any more folders
Navigate to do is actually just go in
Each script
How to make sure all the variables are organised in a bit clean away
Supplier for example
United States things that really in categories that is unlisted randomly
And I'm definitely not in alphabetical order
So what are we doing here when I actually making it easier for the player by actually making it easier for ourselves right
I'm going to be making a game for 6-months to 12-months and 24 months
We want to make sure we don't go crazy right
So let's make sure that everything's nice and clean
Start with the new player because honestly this is the biggest crip
What we're going to do is for going to categorise things using headers ok so how we create a header
Just Google it
Alright so let's do better
Unity C Sharp
I've seen here we go here at review
Ok so it's copy this
Let's start credit categories
So we can rename this header to attributes I think that's a good word
For this category here so powers and attributes so we're going to move that
Here
And that's actually nazo
Alphabetically
The very beginning here
And see here what else can we do
We can create another header
Called inventory
This would be inventory
Obviously guys you can store variables and references for your inventory
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
When I click on the player
In play mode
Ok
So we have all this stuff here see here we create a new category and maybe references
And all this is just references to various key Manchester
Shall we have a reference to our attack box
Expectoration
Would actually be an attribute as well
Let's see here these are all references
This is kind of a reference the health bar original size so I'm thank you
Here
Doesn't really need to be serialised so I can remove that
Something else going to be doing when cleaning up a variables just if you don't need something serialised anymore
Is the only.one serialised the health bar original size the only reason it was serialised it so I can see it in place
But I don't need to see it anymore cos I know it works
Preferences inventory and attributes ok with that looks like now
Oh there we go this is perfect
With attributes for attack power
Max speed jump hour expectoration
We have an inventory section now
We have references as well
Beautiful really clean
Next ingredient
Make it either alphabetical or if you want to keep things in categories that certainly find can do that as well
Like I think I like doing things alphabetically so we can do
Attack power in attack duration
Alright I know what you're thinking Thomas that's not alphabetical there we go find whatever
Protect our matc
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
Jklm
Emma comes before c
A comes before c
And just go ahead and alphabetize everything
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
These two variables are showing up because they are from the physics
Object
Which were expecting to
How do we get a header for that
Well let's go back in the universe
Physics object here
And
Why are the variables showing up
Because the public
A new player is extending to this physics object
To do this and Heather here
Tabby this header here and just pasty here
I'm going to call this physics
Object
Attributes
Ok
What's that loads up but can play here
Now we have a physics magic attributes are regular attributes or inventory in a references
So here we are going to do it we're going to go through every single script
Create headers
For the various categories
Can I recommended that you create categories very similar to this an attribute category A reference
What is category
Maybe for something really specific you can create another category as well
Ahead and do that for all of your scripts
Remove any weird debug.log
To the console that we don't really need anymore sometimes I forget to remove those
What we're going to do is press ctrl f
I'm going to choose
To search in the entire solution of a project
Every single thing
That we can find that has a debug log
We're going to see if we can remove
It looks like we don't really need this
So I can remove that
And these were just used for
Actually creating scripts but now the window they work
Will I need any more
Again
That's fine that sometimes you might get weird cryptic when am I looking at
These are actually things that are included in packages that were installed without a full Project
Change those
Ok looks like we're getting rid of all the diamond at Largs
Make sure you save everything out
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
Looks fine
Right here
I'm just looking for things that start with the two forward slashes
Just figuring out if there's any here that we don't need comments are great
B sometimes
You can have some unnecessary once in your script
Alright we can remove this one here will need it
I need this one either
When is really up to you guys over doing is making a lot easier for you
In the future
Canelo vs weekend
Only need this comment here this kind of self evident
And the last one here
What's pretty good
The next thing we want to do geysers go to every script and just make sure that everything is
Formatted correctly
Using c-sharp standards
So some of you might have been confused when creating tabs with your script some things might have
Incorrect
Tabs solo
Might look like maybe like this right
That will be bad
So it looks like that
Visual Studio can actually auto format for you
So just select all by pressing ctrl a
And then control k
And control now for their about that are for my everything
Crealy
That fixed all the cabin so she's go through all other scripts and do it again
Again it's control
Control and I control f
CCJ even for me and I've been doing this for 10 years
Turn on my timing is incorrect
Make sure you save each script as you do it control control
Next thing I want to do is just clean up any weird line breaks you really don't want to have just random line
Makes so here's a random one that I don't really need
I'll say that this one is fine
I'll see you in again this is just for your sanity
So looks good I like all the line breaks here
See hear anything weird here
Say anything too bad he's a little bit weird
Assist remove Oliver save that out
That looks good
Anything we are here that's what kind of weird
No I don't mind if this is weird right here that's weird
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
Remember that's the one we got
Communities tutorials on on the One metal that too much
You look good here nothing is really confusing
That's a little weird artist
Save that
Good
Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1
Scared
And by the way guys are keeping these in here
Does a probably need them in the future
Scared
It's fine
Alex fine
Ok
Clean that describes the last thing we're going to do is just add comments to things that
Please and clarification ok
It's really important to add comments
Two things that you might forget in the future
So for example right now if we look at the gate script that we created
We might want to comment above this and say what actually happening
So they are future self isn't confused when we forget or if we start working with a team they know what this
What is actually doing ok
So check
To see if he
Players
Inventory
Contains the required inventory item
Ok
The thing
Personally I don't really think I need this comment here out I'll keep it there just in case but
Is kind of obvious when you see this condition here
That's what this actually is
So sometimes comments are really necessary in fact a good coder
Will be so good at writing code
And naming variables
They don't really need to write a tonne of comments for the scripts because
They're so good at writing variables that it self-evident to their team and to their future selves
Ok
Enemy script is there anything that we need to clarify here
What sometimes you need to clarify what a variable actually does
So confused by my raycast layer mask so that's just type which layer
Do we want
The rake cast
To interact with
So that clarifies with the raycast layer mask is
What are the offset
Offset
From the centre
Other raycast origin
Everything else seems good here I can't think of anything else that we might need
To clarify
Is clarified pretty good
Clarify here
Two player
Then update
TUI
Ellis Jean to the new player here and see if there's any clarification that needs to be done here
Look for any variables here that might
Potentially confuse you
Or your team members in the future
Let's see here
Attributes attack duration
Maybe we can clarify what that is
How long is the attackbox
Active
When attacking
That's perfect
These are seem self-evident
This we can clarify dictionary storing all inventory Ireland strings
N values
Is definitely probably need some clarification
The default
Inventory
Item slot
Sprite
The key
Inventory
Adam
And then this one is the
Genki inventory
Adam
To see how a Clarifying things that might be a little bit confusing in the future
This is great for you and it's also great for your team
Anything else here that needs clarification remind me to clarify what this condition is
If the health bar Ridge size has not been set yet
Match it to the
Health bar
Wrecked
Transform size
It seems good
That's about all the commons I think I need for the new player
Does Olly Murs skip still in add comments to things that might confuse you in the future or confused varies team members
Once you're done
Comments to clean your scripts
What does compile
Anime sure everything is saved
In your project
Save Your Scene
And guys
We have
You're very first 2D game kit
What score is we can use this to create a prototype
Even better we can't use this
When trading multiple games this is a great foundation for pretty much any 2D platformer game you want
Create
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.