One thing I would suggest when learning how to code is if you use a tutorial try and break the code down to try and figure out how it works and how you could use different bits of it for different uses. When I started that was a pretty easy way to find things I didn’t understand so I could go research them and figure it out.
Another great tip for debugging is to use breakpoints in code, allows you to step through code one line at a time. This is a great way to figure out when something breaks, also saves you having to write Debug.Log everywhere in your code.
Here’s a few tips I have; If you want to learn code, the best way is to write everything down you need to know in a note, making notes outside of coding which details information like how code behaves on its own, how it interacts with other code, and so on, can be somewhat helpful. Another thing is to learn a game engine, something I am pulling from another person, Binzu Dev, another person on TH-cam, is “Make a game to learn the system, don’t learn the system to make a game” which basically means if you want to learn a system, make a simple game in it as your learning it, without using tutorials to tell you exactly how to do things preferably as tutorials are generally not helpful if you view them as something to copy paste.
Neat video! Identifying your shortcomings as a dev and learning how to improve is always key. I'd like to suggest looking into automated testing to help your debugging process. Being able to run a suite of tests to confirm everything is working is much faster and easier than having to manually play test. For example if you have a test for your DoExplode function. One test passes in Big explode and one test passes in Explode, you'd find out that code isn't working as expected. After some inspection you'll realise the parameter isn't being used.
Don't repeat yourself is a given, but what you really should keep an eye on is a program in a way that the thing you are changing the value of can only be done in one way (preferably a functional pipeline). Following this rule, you will be able to get the complete response from an error, from the point an action originated, through every function it passed through, and what it ended up breaking. Example: Firing a gun can only be done in the Gun script. Once the bullet in whatever way reaches a target, what you want to do is make the health script detect it was shot at, decreasing the object's health. You must not allow the Gun script to access any of the health script properties and you must not allow the Health script to access any property of the gun script. Also, try to use functions for every variable change. Try to not make anything accessible globally, you really don't need global access to anything. It may be easier until you develop a certain way of thinking, it is an old concept that is fine to use in embedded systems but not in any of the new programming languages.
@@kidmosey "If you require the health script to know every type of object or interface that can affect health" It doesn't need to be in a health script, but yeah you should have everything written down somewhere, preferably in the code. Or if you want to change it afterward without building the whole game, in a JSON or similar...
Unity tips: Try to use Unity API code instructions as less as possible. You only really need it to interact with the physics engine. Challenge yourself to use the least amount of update calls.
here's another simple tip: write your code in a way that a human can understand it. on top of splitting things off for re-use, use proper naming for variables, functions and classes. this way you don't have to traverse the code to see what this dothing(int something) does and why, it's also a lot clearer for others if you ask them for help and show them your code.
This video needs a section on breakpoints. You can literally mark a part of your code and when the debugger gets there, it will help you step through your code and see what's really happening and even peek at the values of variables. It's insanely useful and I didn't know about it for years.
Already a developer so I knew most of that. I use JavaScript and getting into Godot's GDScript though. Code is different but fundamental do not change.
Its important to write relevant, efficient code too. Also only write objects in Pascal Case and in python its snake. In compiler languages its typically camel case. I am doing a degree and i watch the other students write the same code over and over and i die of crippling dispair lol 😂
I'm going through the unity beginner scripting for like the 3rd time, and I was wounding. what am I meant to remember, I'm trying to understand literally anything and I don't know how to practice, and I'm worried about forgetting things that i might need to know later and I'm worried that if I can understand what to do, whenever I watch a tutorial, that I will be afraid that I can put my own spin on things or really understand what people are teaching me. so, what do I do?
So, the best advice i can give for this. 1) Don't be afraid of forgetting things. the things you might forget are going to be things you can always google up. there is no punishment other than time spent relearning things. so there's nothing to be afraid of. 2) for learning how to put your own spin on things. rather than following the tutorial directly, what i have done is only look up tutorials for things i'm needing in my current project and looking into how they worked on it. because my systems are different. so i *have* to adjust things. 3) practice is actually quite easy. you remember how math class always started you with the easy stuff and built it up over the year? same thing here. pick a random shitty mobile game that you can think of that has the least ammount of depth you can think of, and just recreate those to start with. and you can slowly build up your familiarity with both unity and c# and by the time you've got like 5-10 of those done, you probably picked up enough to move onto more interesting projects.
I would say that when you learn anything with code you should probably stop thinking about the application at first and focus on the idea of what you need, then focus on the application
When looking for bugs, more often than not, if the game was stable before you added a new feature, and now it’s buggy, the bug is in some way related to the feature. This would seem obvious, but…
I inherited a massive unity project on my job that has thousands of lines of code and literally not one line of documentation. My frustration level is through the roof.
One things i learned is that you can't just learn something just like that let me explain for example you wanna learn scriptable object you go and watch some video and you forgot everything but suppose you working on game and you need scriptable object but you don't know about it so you just type something like how to reduce memory footprint in unity and you'll end up to scriptable object you implement it in your project and you just learned scriptable object in such way that you will be able to use it many time in many other projects you would have understood it very very well
bro I have become very very much confused by seeing very much tutorials on my screen. I don't know which video should I watch. I know how to use unity but i am trying to become professional in C# with unity so please help me how could I learn C# UNITY ? PLEASE 🥺
Hi ButWhyLevin, I think the issues with me isn't programming, been programming with JavaScript and Kotlin for Android for almost 2years now. Made a couple of crappy little projects and now working creating an Android app. Most people aim at creating a ToDo app. But I figured why not try and make a game on Android? As a hobby I would really like to create a 2D action fighting game. But the biggest challenge for me isn't coding the hard part is I can't draw! I figured maybe I could create pixel game character sprites? Or does Unity come with free available characters? Lastly, for Android should I go with Unity or Unreal? Or maybe Godot? Which would you recommend for a simple 2D indie action fighting game?
JUST LOOK GYUS any one can learn how to code and also any can learn any thing but u just give a tray don't glow in thing if you don't like I don't know why every one say go and learn programming if there is a good person on some thing doesn't mean it good for u just give a tray don't glow also don't fkn sleep
@@ButWhyLevin what if I don't know where to start. Like in not a compleat noob at c# I know the basics like int, float, if statements, and transform.position but I have a hard time puting them into actual practice and making them better at it goes on. For example, I can code basic movement, with the player rigidbody, or their transform but I can't properly expand on to have things like drag, and max speed and double jump. Like I have a vague idea of how to do them. Like if I did double jump I would check key input, and for max speed, I might use a function that adds speed overtime until the player stops things like that but no clear vision.
I feel like you really just want to make an open-world taxpayer game and write your story (and prob everyone's story) about how you struggle with taxes and the "epic" journey it takes to get the money to pay them and just the paperwork in general. lol.
OKAY advice from a noob for fellow noobs and even devs GET GREPPER for fuck sakes get it most of your problems can and will be solved with it and it's free, like I was having trouble trying to set up a scene swap through a button press code script couldn't find anything that works and boom Grepper instantly gave me the answer to my problem instantly. Like wholly shit I was stuck on this problem for a while and youtube tutorials and even unity API did jackshit for it.
I'm sorry, but how does a programmer not know that an API stands for "Application Programming Interface". That should be one of the most basic things any programmer should know.
Honestly, I can be empathetic sometimes, but I swear I fail to understand why programming is so hard to some people. The core concepts are so simple to grasp, but maybe people are lacking experience…? I genuinely can’t get it. The only things I find relatively difficult are coming up with solutions to problems or remembering enough library stuff to do what I need. But programming, like understanding the language? Nope. Incredibly easy. I think the ones not getting it are lacking functional experience, as in seeing their code do what the want it to do. They might actually be afraid of errors, but errors are how you learn how to figure out how to do what you need. Errors and mistakes can (typically _are_) the best mentors.
Go to my sponsor snhu.edu/levin if you’re interested in starting a career in game development!
One thing I would suggest when learning how to code is if you use a tutorial try and break the code down to try and figure out how it works and how you could use different bits of it for different uses. When I started that was a pretty easy way to find things I didn’t understand so I could go research them and figure it out.
Suggestion 2: chemical enhancements? Might help motivation for all that research
Another great tip for debugging is to use breakpoints in code, allows you to step through code one line at a time. This is a great way to figure out when something breaks, also saves you having to write Debug.Log everywhere in your code.
Here’s a few tips I have;
If you want to learn code, the best way is to write everything down you need to know in a note, making notes outside of coding which details information like how code behaves on its own, how it interacts with other code, and so on, can be somewhat helpful.
Another thing is to learn a game engine, something I am pulling from another person, Binzu Dev, another person on TH-cam, is “Make a game to learn the system, don’t learn the system to make a game” which basically means if you want to learn a system, make a simple game in it as your learning it, without using tutorials to tell you exactly how to do things preferably as tutorials are generally not helpful if you view them as something to copy paste.
Good video. Learning how to learn really IS so important. It took a few gos for Unity to really click with me but now I’m hooked!
I used to want to learn unity but as a kid with free time it’s be better if i learn normal C sharp then unity
Neat video! Identifying your shortcomings as a dev and learning how to improve is always key.
I'd like to suggest looking into automated testing to help your debugging process. Being able to run a suite of tests to confirm everything is working is much faster and easier than having to manually play test. For example if you have a test for your DoExplode function. One test passes in Big explode and one test passes in Explode, you'd find out that code isn't working as expected. After some inspection you'll realise the parameter isn't being used.
Don't repeat yourself is a given, but what you really should keep an eye on is a program in a way that the thing you are changing the value of can only be done in one way (preferably a functional pipeline).
Following this rule, you will be able to get the complete response from an error, from the point an action originated, through every function it passed through, and what it ended up breaking.
Example: Firing a gun can only be done in the Gun script. Once the bullet in whatever way reaches a target, what you want to do is make the health script detect it was shot at, decreasing the object's health. You must not allow the Gun script to access any of the health script properties and you must not allow the Health script to access any property of the gun script. Also, try to use functions for every variable change.
Try to not make anything accessible globally, you really don't need global access to anything. It may be easier until you develop a certain way of thinking, it is an old concept that is fine to use in embedded systems but not in any of the new programming languages.
@@kidmosey "If you require the health script to know every type of object or interface that can affect health"
It doesn't need to be in a health script, but yeah you should have everything written down somewhere, preferably in the code. Or if you want to change it afterward without building the whole game, in a JSON or similar...
6:42 Well said
Unity tips:
Try to use Unity API code instructions as less as possible. You only really need it to interact with the physics engine.
Challenge yourself to use the least amount of update calls.
Keep in mind that enter Trigger and similar functions are almost the same as an update. Preferably work without them, use events.
I mean you probably want the most amount of update calls possible if you look at that way
here's another simple tip: write your code in a way that a human can understand it. on top of splitting things off for re-use, use proper naming for variables, functions and classes. this way you don't have to traverse the code to see what this dothing(int something) does and why, it's also a lot clearer for others if you ask them for help and show them your code.
I start learning Unity and C# one month ago, and the best way i took to learn, are the gameJams.
Great video!
Sorry bro I had to bring it up. Please use serialized fields. Its sorta bugging me. Sorry!
This video needs a section on breakpoints. You can literally mark a part of your code and when the debugger gets there, it will help you step through your code and see what's really happening and even peek at the values of variables. It's insanely useful and I didn't know about it for years.
Thank you!
Already a developer so I knew most of that. I use JavaScript and getting into Godot's GDScript though. Code is different but fundamental do not change.
Adam C Younis is my best advice
My only problem is finding an actual good video to learn Unity
The problem is you
if theres one thing ive learned its that brackeys is THE KEY
You just won a subscriber
Liked, subscribed, and commented.
Its important to write relevant, efficient code too. Also only write objects in Pascal Case and in python its snake. In compiler languages its typically camel case. I am doing a degree and i watch the other students write the same code over and over and i die of crippling dispair lol 😂
Excellent video
I'm going through the unity beginner scripting for like the 3rd time, and I was wounding. what am I meant to remember, I'm trying to understand literally anything and I don't know how to practice, and I'm worried about forgetting things that i might need to know later and I'm worried that if I can understand what to do, whenever I watch a tutorial, that I will be afraid that I can put my own spin on things or really understand what people are teaching me. so, what do I do?
So, the best advice i can give for this.
1) Don't be afraid of forgetting things. the things you might forget are going to be things you can always google up. there is no punishment other than time spent relearning things. so there's nothing to be afraid of.
2) for learning how to put your own spin on things. rather than following the tutorial directly, what i have done is only look up tutorials for things i'm needing in my current project and looking into how they worked on it. because my systems are different. so i *have* to adjust things.
3) practice is actually quite easy. you remember how math class always started you with the easy stuff and built it up over the year? same thing here. pick a random shitty mobile game that you can think of that has the least ammount of depth you can think of, and just recreate those to start with. and you can slowly build up your familiarity with both unity and c# and by the time you've got like 5-10 of those done, you probably picked up enough to move onto more interesting projects.
I would say that when you learn anything with code you should probably stop thinking about the application at first and focus on the idea of what you need, then focus on the application
Nice pfp
When looking for bugs, more often than not, if the game was stable before you added a new feature, and now it’s buggy, the bug is in some way related to the feature. This would seem obvious, but…
i have given up on learning engined other from scratch since unity dint work for me and it wont let me instal unreal
Try out Godot, it’s free and really easy to run, and probably the best 2d engine out there
@@ButWhyLevin will do! Thanks
you're the man!
I inherited a massive unity project on my job that has thousands of lines of code and literally not one line of documentation. My frustration level is through the roof.
One things i learned is that you can't just learn something just like that let me explain for example you wanna learn scriptable object you go and watch some video and you forgot everything but suppose you working on game and you need scriptable object but you don't know about it so you just type something like how to reduce memory footprint in unity and you'll end up to scriptable object you implement it in your project and you just learned scriptable object in such way that you will be able to use it many time in many other projects you would have understood it very very well
Learn the basics of the program and understand the api of the game engine .
1:37 you don’t even use the radius parameter…
How to identify which code we should use to do what we want in unity
Why when I update my unity it says error on my game codes
It’s pretty crazy that a university is sponsoring TH-cam videos.
He’s just that good
@@RedCroissantGames And now in his next video the entire state of New Hampshire is going to sponsor him as the logical next step.
@@HoodedOlive nah, you arent thinking big enough
not only will this man sponsor himself, so will all 49 us states
@@RedCroissantGames there are 50 states
@@HoodedOlive south carolina isnt real
bro I have become very very much confused by seeing very much tutorials on my screen. I don't know which video should I watch. I know how to use unity but i am trying to become professional in C# with unity so please help me how could I learn C# UNITY ? PLEASE 🥺
Hi ButWhyLevin, I think the issues with me isn't programming, been programming with JavaScript and Kotlin for Android for almost 2years now. Made a couple of crappy little projects and now working creating an Android app. Most people aim at creating a ToDo app. But I figured why not try and make a game on Android?
As a hobby I would really like to create a 2D action fighting game. But the biggest challenge for me isn't coding the hard part is I can't draw! I figured maybe I could create pixel game character sprites? Or does Unity come with free available characters?
Lastly, for Android should I go with Unity or Unreal? Or maybe Godot? Which would you recommend for a simple 2D indie action fighting game?
The Biggest Problem in the world is understanding the terminology AND having the terminology remain consistent over multiple sources.
BriefWhyLevin
Can I use python on unity in some way
JUST LOOK GYUS any one can learn how to code and also any can learn any thing but u just give a tray don't glow in thing if you don't like I don't know why every one say go and learn programming if there is a good person on some thing doesn't mean it good for u just give a tray don't glow also don't fkn sleep
cool
How do I use Google. I know I'm not supposed to copy from Google but then how to people use it
Copying is fine, just try to make sure you know what the code that you just copied actually does
@@ButWhyLevin ohhhhhhhhhhhhhhhhhhhhh. That makes more sense
@@ButWhyLevin what if I don't know where to start. Like in not a compleat noob at c# I know the basics like int, float, if statements, and transform.position but I have a hard time puting them into actual practice and making them better at it goes on.
For example, I can code basic movement, with the player rigidbody, or their transform but I can't properly expand on to have things like drag, and max speed and double jump. Like I have a vague idea of how to do them. Like if I did double jump I would check key input, and for max speed, I might use a function that adds speed overtime until the player stops things like that but no clear vision.
This video is 99% filler don't waste your time
No, this video actually teaches you how to learn. Don’t follow tutorials blindly but actually learn the programming language by searching up the api.
Agreed @@Krullenbol010
@@Krullenbol010Yep, filler as he said, anyone with more than 2 IQ knows everything he said, it's just common sense
I feel like you really just want to make an open-world taxpayer game and write your story (and prob everyone's story) about how you struggle with taxes and the "epic" journey it takes to get the money to pay them and just the paperwork in general. lol.
OKAY advice from a noob for fellow noobs and even devs GET GREPPER for fuck sakes get it most of your problems can and will be solved with it and it's free, like I was having trouble trying to set up a scene swap through a button press code script couldn't find anything that works and boom Grepper instantly gave me the answer to my problem instantly. Like wholly shit I was stuck on this problem for a while and youtube tutorials and even unity API did jackshit for it.
One of my comments got removed 🤷♀
Is it because of his thumbnail😂
@@humadi2001 em no?
Call me racist bigot if you want but do you know who you dont see saying "i cant learn to code its hard"
Asians.
Let that sink in.
Racist bigot
I'm sorry, but how does a programmer not know that an API stands for "Application Programming Interface". That should be one of the most basic things any programmer should know.
Lol
Honestly, I can be empathetic sometimes, but I swear I fail to understand why programming is so hard to some people. The core concepts are so simple to grasp, but maybe people are lacking experience…? I genuinely can’t get it. The only things I find relatively difficult are coming up with solutions to problems or remembering enough library stuff to do what I need. But programming, like understanding the language? Nope. Incredibly easy. I think the ones not getting it are lacking functional experience, as in seeing their code do what the want it to do. They might actually be afraid of errors, but errors are how you learn how to figure out how to do what you need. Errors and mistakes can (typically _are_) the best mentors.
Some of us have never coded a bug dummy