Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Will i ever be able to learn how to code by myself?

Discussion in 'Getting Started' started by mushey, Nov 13, 2016.

  1. mushey

    mushey

    Joined:
    Nov 13, 2016
    Posts:
    39
    has or is anyone having the same problem as me , i dnt know if i'll ever be able to code by myself :[:[:[:[.....
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,647
    Hard work and practice.
     
    Martin_H likes this.
  3. mushey

    mushey

    Joined:
    Nov 13, 2016
    Posts:
    39
    i totally understand but it seems like i just cant put the pieces of the puzzle together.
    thanks anyways
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    No.

    Even the best coders amongst us constantly have google, msdn and the scripting reference open. No one codes on their own.

    So just relax and enjoy the ride. Google everything you need to know as you need it.
     
  5. SarfaraazAlladin

    SarfaraazAlladin

    Joined:
    Dec 20, 2013
    Posts:
    280
    If you're having trouble with how abstract and overwhelming it all is, I would suggest using something like playmaker to wrap your head around inputs, outputs and variables. I learn visually, so knowing a node-based 'language' was invaluable for me when I finally broke into c#.

    This is a bit of a detour, but if you want to, check out Stencyl as well. it's a simple game engine for flash development, but th
     
  6. absolute_disgrace

    absolute_disgrace

    Joined:
    Aug 28, 2016
    Posts:
    253
    Programming is like building with lego. There are some lego pieces you use all the time. You can just visualize how the clip together and the shapes you can make with them. When you first start, try to reduce the types of lego pieces you are using and just practice. If statements, loops and methods are the backbone of programming. Find simple challenges to complete and just get a handle on those pieces. Once comfortable add in a new piece and see what you can do with it.

    As other posters have said, you will use google alot. After a while it becomes more about knowing what you need to do to solve a problem, rather than always knowing the exact method to solve a problem. "I know i need to get from A to B" rather than knowing "I need to take 5 steps north, 2 steps east and 6 steps Northeast".

    Lastly, becoming overwhelmed by the sheer size of a challenge is normal. Getting used to breaking down a challenge into manageable chunks takes a bit of skill. How do you eat an entire whale? One bite at a time.
     
    Konizumi and Farelle like this.
  7. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    630
    I don't know if you have tried this, but you could learn programming without the Unity part first. If you don't have much experience, it could be overwhelming to learn Unity + C# at the same time. Have you been on the website CodeAcademy? There is a lot of guided tutorial / content to help you get started with the basics. From there you can try small exercises and projects.
     
    jhocking likes this.
  8. Farelle

    Farelle

    Joined:
    Feb 20, 2015
    Posts:
    504
    khan academy has also a javascript part :) It helped me alot to just get started first, because they have a browser inbuild solution for coding.
     
  9. Spectre321

    Spectre321

    Joined:
    Nov 27, 2016
    Posts:
    2
    Xijon, thanks for the Codeacademy recommendation but I can't find a section on their site for c#, isn't this what I want to learn for game development?
     
  10. Deleted User

    Deleted User

    Guest

    This is a sound advice. ;)

    Through practice though you will learn at least the basics you'll need and you'll be able to write your own simple scripts. The best way to learn is practice, practice and practice again; copy (manually, do not use copy and paste) scripts and study their content until you really understand what they do.
     
    Ryiah likes this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,937
    Additionally helping people on the forums is great because it often requires researching topics you're not familiar with.
     
    SarfaraazAlladin and Kiwasi like this.
  12. boxhallowed

    boxhallowed

    Joined:
    Mar 31, 2015
    Posts:
    513
    I've been coding since I was nine, and at 29 I'm still a beginner. To be a good programmer, you have to love the challenge. So your first hurdle isn't learning how to code, it's enjoying trying to figure out the puzzle of programming. Without that drive, it doesn't matter how much you "know".
     
    Ryiah, absolute_disgrace and Kiwasi like this.
  13. Deleted User

    Deleted User

    Guest

    It's a common question, although I've rarely seen anywhere that explains the "art" of coding properly. Apologies in advance if this is long winded but hopefully it will help.

    @absolute_disgrace started out on the right lines. Syntax should be relatively simple (especially in C#), where I see most coders struggle is understanding concepts and how to complete the journey to achieve a specific task.

    Back when I was learning code, I was told to lay out steps in pseudo-code. In short computers are pretty dumb, many tasks humans take for granted but we subconsciously skip steps to achieve a goal. Computers won't allow you to get away with that, so laying out steps in a logical fashion can help.. You may / may not have heard of the question, how would you make a cup of tea? Which starts off by you getting off the sofa, walking towards the kettle etc.

    Secondly and what I believe to be most important, understanding concepts. For e.g. let's say I'm building an engine, I require a .obj loader. I know from experience that if I opened up a .obj in notepad, I'd see a list of vertices and faces.. In a graphics api, you could code a mesh by specifying locations of verticed and indices (vectors). Although that's not a very efficient way of doing things, so you'd want to load the file format and "parse" all these indices and vertices locations added to an array which allows you to build a mesh in a 3D package, export and import it into your game engine.

    If I didn't understand basic concepts of how .OBJ's work then the code is irrelevant, I wouldn't know what to do with it. As for the API to make the .OBJ loader, well it's specific to whatever engine / API you're using which as @BoredMormon says requires documentation to be open and a bit of searching.

    Thirdly, understanding how to fix what dumb stuff the computer will throw at you and user error.. This goes back to point one, but you can't always account for everything. So let's use the .OBJ example, what if somebody loads a .FBX file? Well you'd use a regex with a string array to find anything after the "." and then an if statement to throw a print exception / exit the meshloader. There's other things as well like .obj has "gubbins" in it like #'s that could be picked up and cause issues, there's line spaces between vert's which would show up empty in your array.

    Finally, understand the tools that are available to you.. Like when you'd use a case switch, when singletons are applicable and most of it is available via Unity Learn. As much as we do just re-direct people to Unity learn, there is a reason for it.. It does cover the basis of what you need, it's all based on the same concepts you just have to learn how to apply it to your goals.

    To summarise, whether building engines or making games (in any engine) the core concepts generally remain the same, it's just dependant on how much you need to know / will actually use dependant on what you want you want to achieve. In C++ might be more involved due to dealing with headers / memory management / garbage collection / pointers etc. but most of the principles are still exactly the same, for e.g. if you want to use collision data as a trigger function you wouldn't approach it differently in either UE or Unity.

    If you learn concepts / approach's properly you'll be able to get through it (with a lot of trial and error of course).
     
    Last edited by a moderator: Nov 28, 2016
    absolute_disgrace and Ryiah like this.
  14. Croomraider

    Croomraider

    Joined:
    Sep 14, 2016
    Posts:
    28
    For what's it worth. I'm new to programming also. I signed up for udemy courses and the programming stuff was overwhelming. I paused the courses.

    Signed up for an intro to programming course at my local community college. I'm almost finished with the class and it's been a night and day learning experience. Having a real life teacher helped big time, nothing against the internet learning but real people can answer real questions. The class taught us pseudocode first then went back to chapter one but in c++. It's been great.

    Now I'm finally revisiting the udemy courses with a much better understanding of inputs/outputs/variables/syntax/logic/loops/decisions/ etc etc...
     
    Ryiah and mushey like this.
  15. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    It does get easier as you go. I've been programming for a while now. Last night I decided I needed a backend system to store my data. So I learned php and MySQL in a couple of hours.

    The first script you write, and the first game you make, will probably be the hardest one you'll ever do.
     
    Ryiah and mushey like this.
  16. whynot660

    whynot660

    Joined:
    Dec 4, 2016
    Posts:
    3
    You can think of programming as explaining what you expect to the machine or the engine in this case
    a good programmer is the programmer who is able to do much with the clearest, easiest and shortest amount of code
    to achieve this you have to study the problem you want to solve, I suggest you to do this on paper, with drawings and diagrams, before moving to code.

    try to divide the problem into sub problems by asking your self simple questions like :
    what is the final result i'am expecting from this script (then note it )
    that result implies (here you note the vars) witch will interact this way (you write the process)
    this was just an algorithmic example but it's the general idea :].
    (this should be hard if you are not familiar with programming languages, and POO concepts, if this is the case you can look for some tutorials)
    once this done the rest would be easier, since you will only need to put things together, all I can suggest for this step is to read codes as much as you can to get more coding reflexes and to know where to find things faster.

    good luck
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,937
    Unless you're like me and learn a programming language separately. Guess the number didn't take long at all. :p
     
    Kiwasi likes this.